Overview
This plugin provides specialized agents for:- Code comment accuracy and maintainability
- Test coverage quality and completeness
- Error handling and silent failures
- Type design quality and invariants
- General code review for project guidelines
- Code simplification and refactoring
Agents
1. comment-analyzer
Focus: Code comment accuracy and maintainability Analyzes:- Comment accuracy vs actual code
- Documentation completeness
- Comment rot and technical debt
- Misleading or outdated comments
- After adding documentation
- Before finalizing PRs with comment changes
- When reviewing existing comments
2. pr-test-analyzer
Focus: Test coverage quality and completeness Analyzes:- Behavioral vs line coverage
- Critical gaps in test coverage
- Test quality and resilience
- Edge cases and error conditions
- After creating a PR
- When adding new functionality
- To verify test thoroughness
3. silent-failure-hunter
Focus: Error handling and silent failures Analyzes:- Silent failures in catch blocks
- Inadequate error handling
- Inappropriate fallback behavior
- Missing error logging
- After implementing error handling
- When reviewing try/catch blocks
- Before finalizing PRs with error handling
4. type-design-analyzer
Focus: Type design quality and invariants Analyzes:- Type encapsulation (rated 1-10)
- Invariant expression (rated 1-10)
- Type usefulness (rated 1-10)
- Invariant enforcement (rated 1-10)
- When introducing new types
- During PR creation with data models
- When refactoring type designs
5. code-reviewer
Focus: General code review for project guidelines Analyzes:- CLAUDE.md compliance
- Style violations
- Bug detection
- Code quality issues
- After writing or modifying code
- Before committing changes
- Before creating pull requests
6. code-simplifier
Focus: Code simplification and refactoring Analyzes:- Code clarity and readability
- Unnecessary complexity and nesting
- Redundant code and abstractions
- Consistency with project standards
- Overly compact or clever code
- After writing or modifying code
- After passing code review
- When code works but feels complex
This agent preserves functionality while improving code structure and maintainability.
Usage Patterns
Individual Agent Usage
Simply ask questions that match an agent’s focus area:Comprehensive PR Review
For thorough PR review, ask for multiple aspects:Proactive Review
Claude may proactively use these agents based on context:- After writing code → code-reviewer
- After adding docs → comment-analyzer
- Before creating PR → Multiple agents as appropriate
- After adding types → type-design-analyzer
Command: /pr-review-toolkit:review-pr
Run a comprehensive PR review with optional focus areas.Usage
comments- Run comment-analyzertests- Run pr-test-analyzererrors- Run silent-failure-huntertypes- Run type-design-analyzercode- Run code-reviewersimplify- Run code-simplifierall- Run all agents
Best Practices
When to Use Each Agent
Before Committing:- code-reviewer (general quality)
- silent-failure-hunter (if changed error handling)
- pr-test-analyzer (test coverage check)
- comment-analyzer (if added/modified comments)
- type-design-analyzer (if added/modified types)
- code-reviewer (final sweep)
- code-simplifier (improve clarity and maintainability)
- Any agent for specific concerns raised
- Targeted re-review after fixes
Running Multiple Agents
Parallel (faster):Output Formats
All agents provide structured, actionable output:- Clear issue identification
- Specific file and line references
- Explanation of why it’s a problem
- Suggestions for improvement
- Prioritized by severity
Confidence Scoring
comment-analyzer: Identifies issues with high confidence in accuracy checks pr-test-analyzer: Rates test gaps 1-10 (10 = critical, must add) silent-failure-hunter: Flags severity of error handling issues type-design-analyzer: Rates 4 dimensions on 1-10 scale code-reviewer: Scores issues 0-100 (91-100 = critical) code-simplifier: Identifies complexity and suggests simplificationsWorkflow Integration
This plugin works great with other tools:Tips
Be Specific
Target specific agents for focused review
Use Proactively
Run before creating PRs, not after
Address Critical First
Agents prioritize findings by severity
Iterate
Run again after fixes to verify
Troubleshooting
Agent Not Triggering
Issue: Asked for review but agent didn’t run Solution:- Be more specific in your request
- Mention the agent type explicitly
- Reference the specific concern (e.g., “test coverage”)
Agent Analyzing Wrong Files
Issue: Agent reviewing too much or wrong files Solution:- Specify which files to focus on
- Reference the PR number or branch
- Mention “recent changes” or “git diff”
Plugin Information
Author: Daisy ([email protected])License: MIT