Comprehensive PR Review
Run a comprehensive pull request review using multiple specialized agents, each focusing on a different aspect of code quality.
Review Aspects (optional): "$ARGUMENTS"
Review Workflow:
Determine Review Scope
- Check git status to identify changed files
- Parse arguments to see if user requested specific review aspects
- Default: Run all applicable reviews
Available Review Aspects:
- comments - Analyze code comment accuracy and maintainability
- tests - Review test coverage quality and completeness
- errors - Check error handling for silent failures
- types - Analyze type design and invariants (if new types added)
- code - General code review for project guidelines
- simplify - Simplify code for clarity and maintainability
- all - Run all applicable reviews (default)
Identify Changed Files
- Run
git diff --name-only to see modified files
- Check if PR already exists:
gh pr view
- Identify file types and what reviews apply
Determine Applicable Reviews
Based on changes:
- Always applicable: code-reviewer (general quality)
- If test files changed: pr-test-analyzer
- If comments/docs added: comment-analyzer
- If error handling changed: silent-failure-hunter
- If types added/modified: type-design-analyzer
- After passing review: code-simplifier (polish and refine)
Launch Review Agents
Sequential approach (one at a time):
- Easier to understand and act on
- Each report is complete before next
- Good for interactive review
Parallel approach (user can request):
- Launch all agents simultaneously
- Faster for comprehensive review
- Results come back together
Aggregate Results
After agents complete, summarize:
- Critical Issues (must fix before merge)
- Important Issues (should fix)
- Suggestions (nice to have)
- Positive Observations (what's good)
Provide Action Plan
Organize findings:
# PR Review Summary
## Critical Issues (X found)
- [agent-name]: Issue description [file:line]
## Important Issues (X found)
- [agent-name]: Issue description [file:line]
## Suggestions (X found)
- [agent-name]: Suggestion [file:line]
## Strengths
- What's well-done in this PR
## Recommended Action
1. Fix critical issues first
2. Address important issues
3. Consider suggestions
4. Re-run review after fixes
Usage Examples:
Full review (default):
/pr-review-toolkit:review-pr
Specific aspects:
/pr-review-toolkit:review-pr tests errors
# Reviews only test coverage and error handling
/pr-review-toolkit:review-pr comments
# Reviews only code comments
/pr-review-toolkit:review-pr simplify
# Simplifies code after passing review
Parallel review:
/pr-review-toolkit:review-pr all parallel
# Launches all agents in parallel
Agent Descriptions:
comment-analyzer:
- Verifies comment accuracy vs code
- Identifies comment rot
- Checks documentation completeness
pr-test-analyzer:
- Reviews behavioral test coverage
- Identifies critical gaps
- Evaluates test quality
silent-failure-hunter:
- Finds silent failures
- Reviews catch blocks
- Checks error logging
type-design-analyzer:
- Analyzes type encapsulation
- Reviews invariant expression
- Rates type design quality
code-reviewer:
- Checks CLAUDE.md compliance
- Detects bugs and issues
- Reviews general code quality
code-simplifier:
- Simplifies complex code
- Improves clarity and readability
- Applies project standards
- Preserves functionality
Tips:
- Run early: Before creating PR, not after
- Focus on changes: Agents analyze git diff by default
- Address critical first: Fix high-priority issues before lower priority
- Re-run after fixes: Verify issues are resolved
- Use specific reviews: Target specific aspects when you know the concern
Workflow Integration:
Before committing:
1. Write code
2. Run: /pr-review-toolkit:review-pr code errors
3. Fix any critical issues
4. Commit
Before creating PR:
1. Stage all changes
2. Run: /pr-review-toolkit:review-pr all
3. Address all critical and important issues
4. Run specific reviews again to verify
5. Create PR
After PR feedback:
1. Make requested changes
2. Run targeted reviews based on feedback
3. Verify issues are resolved
4. Push updates
Notes:
- Agents run autonomously and return detailed reports
- Each agent focuses on its specialty for deep analysis
- Results are actionable with specific file:line references
- Agents use appropriate models for their complexity
- All agents available in
/agents list
This repository (Asymmetric-al/core)
Adapted from Anthropic's pr-review-toolkit plugin (Apache-2.0). Modified by Asymmetric-al/core: the plugin's /review-pr command became this skill (new frontmatter, no allowed-tools), and this overlay was added. The workflow above is otherwise the upstream command text with Prettier formatting. Provenance is in references/upstream.md, and LICENSE is the upstream Apache-2.0 text.
On conflict, the current user request, root AGENTS.md, the nearest nested AGENTS.md, and the matching docs/ai/rules/* rulebook win over this skill.
Triggers
- The user invokes
/review-pr (Claude Code, Cursor, T3 Code) or $review-pr (Codex), optionally with aspects such as tests errors or all parallel. The upstream examples spell it /pr-review-toolkit:review-pr.
- A request that names one of the six reviewer agents. Other review requests keep their usual routes, such as
code-review, council, or review-and-ship.
Workflow
- Scope. Use the PR or files the user named (
gh pr diff <number>). Otherwise review the current branch against origin/develop plus staged, unstaged, and untracked changes (git status --porcelain lists untracked files; read them in full), not only git diff.
- Reviewers. The six reviewer prompts are in
references/agents/. Dispatch them by client:
- Claude Code and Cursor: the project subagents
pr-code-reviewer (upstream code-reviewer, renamed because Cursor already registers a different code-reviewer), code-simplifier, comment-analyzer, pr-test-analyzer, silent-failure-hunter, and type-design-analyzer, published from .cursor/agents/ to .claude/agents/.
- Codex: a subagent per reviewer whose brief is that reviewer's prompt, the scope, and this overlay, when the session has subagent tools. Otherwise run each reviewer yourself, one at a time.
- T3 Code: one
delegate_task per reviewer with the same self-contained brief.
- Applicable reviewers. Run
pr-test-analyzer whenever the change alters behavior, even when no test file changed, because missing coverage is itself a finding under Core's TDD rule.
- Read-only reviewers. Every reviewer except
code-simplifier only reports. Run code-simplifier only when the user asked for the simplify aspect and authorized edits. Never run it beside another writer. After it edits, run the checks for the touched packages and report what changed.
- Project rules. Where a reviewer prompt says
CLAUDE.md, read root AGENTS.md (CLAUDE.md imports it), the nearest nested AGENTS.md, and the matching rulebooks under docs/ai/rules/. Tests follow docs/ai/rules/testing.md and Core's TDD rule. Types follow docs/ai/rules/typescript-future-proofing.md.
- Upstream-only conventions.
silent-failure-hunter names logForDebugging, logError, logEvent, and constants/errorIds.ts. They come from the upstream project and do not exist in Core. Judge error handling against the touched package's existing logging and Sentry use and Core's product-safety invariants. code-simplifier lists example standards (the function keyword, explicit return types, avoiding try/catch). Apply Core's ESLint, Prettier, and rulebook conventions instead of that list.
- Severity. Classify every finding with the rubric in
docs/ai/rules/review-bots.md by its actual impact. Treat the reviewers' own labels and scores (Critical, Important, 1-10 ratings, confidence) as inputs, not as the P-level. P0 is only for data loss, a security, auth, or permission bypass, a payment or webhook error, a migration hazard, a crash, or a broken core flow. A misleading comment or a broad catch is P1 or P2 unless its impact meets that bar. Every behavior finding needs file:line evidence.
- Output. Report locally. Post PR comments or reviews only when the user asks. Never put secrets,
.env values, or tokens in a reviewer brief.
Checklist
Edit this canonical copy in docs/ai/skills/review-pr/, then run bun run skills:sync and bun run skills:verify. Edit the native subagents in .cursor/agents/, never in .claude/agents/.
1---2name: review-pr3description: Use only when the user explicitly invokes review-pr (Anthropic pr-review-toolkit) for a multi-agent review of a pull request or local diff by aspect - comments, tests, errors, types, code, simplify, or all.4disable-model-invocation: true5argument-hint: "[review-aspects]"6metadata:7 source: https://skillmd.com/skills/asymmetric-al/review-pr8---910# Comprehensive PR Review1112Run a comprehensive pull request review using multiple specialized agents, each focusing on a different aspect of code quality.1314**Review Aspects (optional):** "$ARGUMENTS"1516## Review Workflow:17181. **Determine Review Scope**19 - Check git status to identify changed files20 - Parse arguments to see if user requested specific review aspects21 - Default: Run all applicable reviews22232. **Available Review Aspects:**2425 - **comments** - Analyze code comment accuracy and maintainability26 - **tests** - Review test coverage quality and completeness27 - **errors** - Check error handling for silent failures28 - **types** - Analyze type design and invariants (if new types added)29 - **code** - General code review for project guidelines30 - **simplify** - Simplify code for clarity and maintainability31 - **all** - Run all applicable reviews (default)32333. **Identify Changed Files**34 - Run `git diff --name-only` to see modified files35 - Check if PR already exists: `gh pr view`36 - Identify file types and what reviews apply37384. **Determine Applicable Reviews**3940 Based on changes:41 - **Always applicable**: code-reviewer (general quality)42 - **If test files changed**: pr-test-analyzer43 - **If comments/docs added**: comment-analyzer44 - **If error handling changed**: silent-failure-hunter45 - **If types added/modified**: type-design-analyzer46 - **After passing review**: code-simplifier (polish and refine)47485. **Launch Review Agents**4950 **Sequential approach** (one at a time):51 - Easier to understand and act on52 - Each report is complete before next53 - Good for interactive review5455 **Parallel approach** (user can request):56 - Launch all agents simultaneously57 - Faster for comprehensive review58 - Results come back together59606. **Aggregate Results**6162 After agents complete, summarize:63 - **Critical Issues** (must fix before merge)64 - **Important Issues** (should fix)65 - **Suggestions** (nice to have)66 - **Positive Observations** (what's good)67687. **Provide Action Plan**6970 Organize findings:7172 ```markdown73 # PR Review Summary7475 ## Critical Issues (X found)7677 - [agent-name]: Issue description [file:line]7879 ## Important Issues (X found)8081 - [agent-name]: Issue description [file:line]8283 ## Suggestions (X found)8485 - [agent-name]: Suggestion [file:line]8687 ## Strengths8889 - What's well-done in this PR9091 ## Recommended Action9293 1. Fix critical issues first94 2. Address important issues95 3. Consider suggestions96 4. Re-run review after fixes97 ```9899## Usage Examples:100101**Full review (default):**102103```104/pr-review-toolkit:review-pr105```106107**Specific aspects:**108109```110/pr-review-toolkit:review-pr tests errors111# Reviews only test coverage and error handling112113/pr-review-toolkit:review-pr comments114# Reviews only code comments115116/pr-review-toolkit:review-pr simplify117# Simplifies code after passing review118```119120**Parallel review:**121122```123/pr-review-toolkit:review-pr all parallel124# Launches all agents in parallel125```126127## Agent Descriptions:128129**comment-analyzer**:130131- Verifies comment accuracy vs code132- Identifies comment rot133- Checks documentation completeness134135**pr-test-analyzer**:136137- Reviews behavioral test coverage138- Identifies critical gaps139- Evaluates test quality140141**silent-failure-hunter**:142143- Finds silent failures144- Reviews catch blocks145- Checks error logging146147**type-design-analyzer**:148149- Analyzes type encapsulation150- Reviews invariant expression151- Rates type design quality152153**code-reviewer**:154155- Checks CLAUDE.md compliance156- Detects bugs and issues157- Reviews general code quality158159**code-simplifier**:160161- Simplifies complex code162- Improves clarity and readability163- Applies project standards164- Preserves functionality165166## Tips:167168- **Run early**: Before creating PR, not after169- **Focus on changes**: Agents analyze git diff by default170- **Address critical first**: Fix high-priority issues before lower priority171- **Re-run after fixes**: Verify issues are resolved172- **Use specific reviews**: Target specific aspects when you know the concern173174## Workflow Integration:175176**Before committing:**177178```1791. Write code1802. Run: /pr-review-toolkit:review-pr code errors1813. Fix any critical issues1824. Commit183```184185**Before creating PR:**186187```1881. Stage all changes1892. Run: /pr-review-toolkit:review-pr all1903. Address all critical and important issues1914. Run specific reviews again to verify1925. Create PR193```194195**After PR feedback:**196197```1981. Make requested changes1992. Run targeted reviews based on feedback2003. Verify issues are resolved2014. Push updates202```203204## Notes:205206- Agents run autonomously and return detailed reports207- Each agent focuses on its specialty for deep analysis208- Results are actionable with specific file:line references209- Agents use appropriate models for their complexity210- All agents available in `/agents` list211212<!-- CORE-OVERLAY-START -->213214## This repository (Asymmetric-al/core)215216Adapted from Anthropic's [pr-review-toolkit](https://github.com/anthropics/claude-plugins-official/tree/0412be76f50ab4f4f8abff3753efa9269fbbca5b/plugins/pr-review-toolkit) plugin (Apache-2.0). Modified by Asymmetric-al/core: the plugin's `/review-pr` command became this skill (new frontmatter, no `allowed-tools`), and this overlay was added. The workflow above is otherwise the upstream command text with Prettier formatting. Provenance is in `references/upstream.md`, and `LICENSE` is the upstream Apache-2.0 text.217218On conflict, the current user request, root `AGENTS.md`, the nearest nested `AGENTS.md`, and the matching `docs/ai/rules/*` rulebook win over this skill.219220### Triggers221222- The user invokes `/review-pr` (Claude Code, Cursor, T3 Code) or `$review-pr` (Codex), optionally with aspects such as `tests errors` or `all parallel`. The upstream examples spell it `/pr-review-toolkit:review-pr`.223- A request that names one of the six reviewer agents. Other review requests keep their usual routes, such as `code-review`, `council`, or `review-and-ship`.224225### Workflow2262271. **Scope.** Use the PR or files the user named (`gh pr diff <number>`). Otherwise review the current branch against `origin/develop` plus staged, unstaged, and untracked changes (`git status --porcelain` lists untracked files; read them in full), not only `git diff`.2282. **Reviewers.** The six reviewer prompts are in `references/agents/`. Dispatch them by client:229 - Claude Code and Cursor: the project subagents `pr-code-reviewer` (upstream `code-reviewer`, renamed because Cursor already registers a different `code-reviewer`), `code-simplifier`, `comment-analyzer`, `pr-test-analyzer`, `silent-failure-hunter`, and `type-design-analyzer`, published from `.cursor/agents/` to `.claude/agents/`.230 - Codex: a subagent per reviewer whose brief is that reviewer's prompt, the scope, and this overlay, when the session has subagent tools. Otherwise run each reviewer yourself, one at a time.231 - T3 Code: one `delegate_task` per reviewer with the same self-contained brief.2323. **Applicable reviewers.** Run `pr-test-analyzer` whenever the change alters behavior, even when no test file changed, because missing coverage is itself a finding under Core's TDD rule.2334. **Read-only reviewers.** Every reviewer except `code-simplifier` only reports. Run `code-simplifier` only when the user asked for the `simplify` aspect and authorized edits. Never run it beside another writer. After it edits, run the checks for the touched packages and report what changed.2345. **Project rules.** Where a reviewer prompt says `CLAUDE.md`, read root `AGENTS.md` (`CLAUDE.md` imports it), the nearest nested `AGENTS.md`, and the matching rulebooks under `docs/ai/rules/`. Tests follow `docs/ai/rules/testing.md` and Core's TDD rule. Types follow `docs/ai/rules/typescript-future-proofing.md`.2356. **Upstream-only conventions.** `silent-failure-hunter` names `logForDebugging`, `logError`, `logEvent`, and `constants/errorIds.ts`. They come from the upstream project and do not exist in Core. Judge error handling against the touched package's existing logging and Sentry use and Core's product-safety invariants. `code-simplifier` lists example standards (the `function` keyword, explicit return types, avoiding `try`/`catch`). Apply Core's ESLint, Prettier, and rulebook conventions instead of that list.2367. **Severity.** Classify every finding with the rubric in `docs/ai/rules/review-bots.md` by its actual impact. Treat the reviewers' own labels and scores (Critical, Important, 1-10 ratings, confidence) as inputs, not as the P-level. P0 is only for data loss, a security, auth, or permission bypass, a payment or webhook error, a migration hazard, a crash, or a broken core flow. A misleading comment or a broad `catch` is P1 or P2 unless its impact meets that bar. Every behavior finding needs `file:line` evidence.2378. **Output.** Report locally. Post PR comments or reviews only when the user asks. Never put secrets, `.env` values, or tokens in a reviewer brief.238239### Checklist240241- [ ] Scope covers the branch against `origin/develop` or the named PR242- [ ] Reviewers stayed read-only, except an authorized `code-simplifier` run243- [ ] Findings carry a Core P-level judged by impact and `file:line` evidence244- [ ] Nothing was posted, pushed, or committed without the user's request245246Edit this canonical copy in `docs/ai/skills/review-pr/`, then run `bun run skills:sync` and `bun run skills:verify`. Edit the native subagents in `.cursor/agents/`, never in `.claude/agents/`.247248<!-- CORE-OVERLAY-END -->