Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Anthropic-origin PR review toolkit with bundled agents and commands for portable installs across Codex, OpenClaw, and Claude workflows.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
README.md
1# PR Review Toolkit23A comprehensive collection of specialized agents for thorough pull request review, covering code comments, test coverage, error handling, type design, code quality, and code simplification.45## Overview67This plugin bundles 6 expert review agents that each focus on a specific aspect of code quality. Use them individually for targeted reviews or together for comprehensive PR analysis.89## Agents1011### 1. comment-analyzer12**Focus**: Code comment accuracy and maintainability1314**Analyzes:**15- Comment accuracy vs actual code16- Documentation completeness17- Comment rot and technical debt18- Misleading or outdated comments1920**When to use:**21- After adding documentation22- Before finalizing PRs with comment changes23- When reviewing existing comments2425**Triggers:**26```27"Check if the comments are accurate"28"Review the documentation I added"29"Analyze comments for technical debt"30```3132### 2. pr-test-analyzer33**Focus**: Test coverage quality and completeness3435**Analyzes:**36- Behavioral vs line coverage37- Critical gaps in test coverage38- Test quality and resilience39- Edge cases and error conditions4041**When to use:**42- After creating a PR43- When adding new functionality44- To verify test thoroughness4546**Triggers:**47```48"Check if the tests are thorough"49"Review test coverage for this PR"50"Are there any critical test gaps?"51```5253### 3. silent-failure-hunter54**Focus**: Error handling and silent failures5556**Analyzes:**57- Silent failures in catch blocks58- Inadequate error handling59- Inappropriate fallback behavior60- Missing error logging6162**When to use:**63- After implementing error handling64- When reviewing try/catch blocks65- Before finalizing PRs with error handling6667**Triggers:**68```69"Review the error handling"70"Check for silent failures"71"Analyze catch blocks in this PR"72```7374### 4. type-design-analyzer75**Focus**: Type design quality and invariants7677**Analyzes:**78- Type encapsulation (rated 1-10)79- Invariant expression (rated 1-10)80- Type usefulness (rated 1-10)81- Invariant enforcement (rated 1-10)8283**When to use:**84- When introducing new types85- During PR creation with data models86- When refactoring type designs8788**Triggers:**89```90"Review the UserAccount type design"91"Analyze type design in this PR"92"Check if this type has strong invariants"93```9495### 5. code-reviewer96**Focus**: General code review for project guidelines9798**Analyzes:**99- CLAUDE.md compliance100- Style violations101- Bug detection102- Code quality issues103104**When to use:**105- After writing or modifying code106- Before committing changes107- Before creating pull requests108109**Triggers:**110```111"Review my recent changes"112"Check if everything looks good"113"Review this code before I commit"114```115116### 6. code-simplifier117**Focus**: Code simplification and refactoring118119**Analyzes:**120- Code clarity and readability121- Unnecessary complexity and nesting122- Redundant code and abstractions123- Consistency with project standards124- Overly compact or clever code125126**When to use:**127- After writing or modifying code128- After passing code review129- When code works but feels complex130131**Triggers:**132```133"Simplify this code"134"Make this clearer"135"Refine this implementation"136```137138**Note**: This agent preserves functionality while improving code structure and maintainability.139140## Usage Patterns141142### Individual Agent Usage143144Simply ask questions that match an agent's focus area, and Claude will automatically trigger the appropriate agent:145146```147"Can you check if the tests cover all edge cases?"148→ Triggers pr-test-analyzer149150"Review the error handling in the API client"151→ Triggers silent-failure-hunter152153"I've added documentation - is it accurate?"154→ Triggers comment-analyzer155```156157### Comprehensive PR Review158159For thorough PR review, ask for multiple aspects:160161```162"I'm ready to create this PR. Please:1631. Review test coverage1642. Check for silent failures1653. Verify code comments are accurate1664. Review any new types1675. General code review"168```169170This will trigger all relevant agents to analyze different aspects of your PR.171172### Proactive Review173174Claude may proactively use these agents based on context:175176- **After writing code** → code-reviewer177- **After adding docs** → comment-analyzer178- **Before creating PR** → Multiple agents as appropriate179- **After adding types** → type-design-analyzer180181## Installation182183Install from your personal marketplace:184185```bash186/plugins187# Find "pr-review-toolkit"188# Install189```190191Or add manually to settings if needed.192193## Agent Details194195### Confidence Scoring196197Agents provide confidence scores for their findings:198199**comment-analyzer**: Identifies issues with high confidence in accuracy checks200201**pr-test-analyzer**: Rates test gaps 1-10 (10 = critical, must add)202203**silent-failure-hunter**: Flags severity of error handling issues204205**type-design-analyzer**: Rates 4 dimensions on 1-10 scale206207**code-reviewer**: Scores issues 0-100 (91-100 = critical)208209**code-simplifier**: Identifies complexity and suggests simplifications210211### Output Formats212213All agents provide structured, actionable output:214- Clear issue identification215- Specific file and line references216- Explanation of why it's a problem217- Suggestions for improvement218- Prioritized by severity219220## Best Practices221222### When to Use Each Agent223224**Before Committing:**225- code-reviewer (general quality)226- silent-failure-hunter (if changed error handling)227228**Before Creating PR:**229- pr-test-analyzer (test coverage check)230- comment-analyzer (if added/modified comments)231- type-design-analyzer (if added/modified types)232- code-reviewer (final sweep)233234**After Passing Review:**235- code-simplifier (improve clarity and maintainability)236237**During PR Review:**238- Any agent for specific concerns raised239- Targeted re-review after fixes240241### Running Multiple Agents242243You can request multiple agents to run in parallel or sequentially:244245**Parallel** (faster):246```247"Run pr-test-analyzer and comment-analyzer in parallel"248```249250**Sequential** (when one informs the other):251```252"First review test coverage, then check code quality"253```254255## Tips256257- **Be specific**: Target specific agents for focused review258- **Use proactively**: Run before creating PRs, not after259- **Address critical issues first**: Agents prioritize findings260- **Iterate**: Run again after fixes to verify261- **Don't over-use**: Focus on changed code, not entire codebase262263## Troubleshooting264265### Agent Not Triggering266267**Issue**: Asked for review but agent didn't run268269**Solution**:270- Be more specific in your request271- Mention the agent type explicitly272- Reference the specific concern (e.g., "test coverage")273274### Agent Analyzing Wrong Files275276**Issue**: Agent reviewing too much or wrong files277278**Solution**:279- Specify which files to focus on280- Reference the PR number or branch281- Mention "recent changes" or "git diff"282283## Integration with Workflow284285This plugin works great with:286- **build-validator**: Run build/tests before review287- **Project-specific agents**: Combine with your custom agents288289**Recommended workflow:**2901. Write code → **code-reviewer**2912. Fix issues → **silent-failure-hunter** (if error handling)2923. Add tests → **pr-test-analyzer**2934. Document → **comment-analyzer**2945. Review passes → **code-simplifier** (polish)2956. Create PR296297## Contributing298299Found issues or have suggestions? These agents are maintained in:300- User agents: `~/.claude/agents/`301- Project agents: `.claude/agents/` in claude-cli-internal302303## License304305MIT306307## Author308309Daisy ([email protected])310311---312313**Quick Start**: Just ask for review and the right agent will trigger automatically!314