Skip to main content
The PR Review Toolkit 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.

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
Philosophy: Each agent is an expert in its domain, providing focused, actionable feedback.

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
When to use:
  • After adding documentation
  • Before finalizing PRs with comment changes
  • When reviewing existing comments
How to trigger:
"Check if the comments are accurate"
"Review the documentation I added"
"Analyze comments for technical debt"

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
When to use:
  • After creating a PR
  • When adding new functionality
  • To verify test thoroughness
How to trigger:
"Check if the tests are thorough"
"Review test coverage for this PR"
"Are there any critical test gaps?"
Output: Rates test gaps 1-10 (10 = critical, must add)

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
When to use:
  • After implementing error handling
  • When reviewing try/catch blocks
  • Before finalizing PRs with error handling
How to trigger:
"Review the error handling"
"Check for silent failures"
"Analyze catch blocks in this PR"
Output: Flags severity of error handling issues

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 to use:
  • When introducing new types
  • During PR creation with data models
  • When refactoring type designs
How to trigger:
"Review the UserAccount type design"
"Analyze type design in this PR"
"Check if this type has strong invariants"
Output: 4 dimensions rated on 1-10 scale with specific recommendations

5. code-reviewer

Focus: General code review for project guidelines Analyzes:
  • CLAUDE.md compliance
  • Style violations
  • Bug detection
  • Code quality issues
When to use:
  • After writing or modifying code
  • Before committing changes
  • Before creating pull requests
How to trigger:
"Review my recent changes"
"Check if everything looks good"
"Review this code before I commit"
Output: Scores issues 0-100 (91-100 = critical)

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
When to use:
  • After writing or modifying code
  • After passing code review
  • When code works but feels complex
How to trigger:
"Simplify this code"
"Make this clearer"
"Refine this implementation"
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:
"Can you check if the tests cover all edge cases?"
→ Triggers pr-test-analyzer

"Review the error handling in the API client"
→ Triggers silent-failure-hunter

"I've added documentation - is it accurate?"
→ Triggers comment-analyzer
Claude automatically triggers the appropriate agent based on your question.

Comprehensive PR Review

For thorough PR review, ask for multiple aspects:
"I'm ready to create this PR. Please:
1. Review test coverage
2. Check for silent failures
3. Verify code comments are accurate
4. Review any new types
5. General code review"
This triggers all relevant agents to analyze different aspects of your PR.

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

/pr-review-toolkit:review-pr [aspects]
Aspects (optional):
  • comments - Run comment-analyzer
  • tests - Run pr-test-analyzer
  • errors - Run silent-failure-hunter
  • types - Run type-design-analyzer
  • code - Run code-reviewer
  • simplify - Run code-simplifier
  • all - Run all agents
Examples:
# Review only tests and error handling
/pr-review-toolkit:review-pr tests errors

# Full comprehensive review
/pr-review-toolkit:review-pr all

# Review specific aspects
/pr-review-toolkit:review-pr comments types

Best Practices

When to Use Each Agent

Before Committing:
  • code-reviewer (general quality)
  • silent-failure-hunter (if changed error handling)
Before Creating PR:
  • pr-test-analyzer (test coverage check)
  • comment-analyzer (if added/modified comments)
  • type-design-analyzer (if added/modified types)
  • code-reviewer (final sweep)
After Passing Review:
  • code-simplifier (improve clarity and maintainability)
During PR Review:
  • Any agent for specific concerns raised
  • Targeted re-review after fixes

Running Multiple Agents

Parallel (faster):
"Run pr-test-analyzer and comment-analyzer in parallel"
Sequential (when one informs the other):
"First review test coverage, then check code quality"

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 simplifications

Workflow Integration

This plugin works great with other tools:
1

Write Code

Implement your feature or fix
2

Code Reviewer

Run code-reviewer for general quality check
3

Error Handling

If you changed error handling, run silent-failure-hunter
4

Add Tests

Write tests, then run pr-test-analyzer
5

Document

Add documentation, then run comment-analyzer
6

Polish

After review passes, run code-simplifier
7

Create PR

Submit your pull request

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
Quick Start: Just ask for review and the right agent will trigger automatically!

Build docs developers (and LLMs) love