skills/pr-review/SKILL.md
PR review with specialized agents and retro capture.
npx skillsauth add notque/claude-code-toolkit pr-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive PR review using specialized agents, with automatic knowledge capture.
This is a local fork of pr-review-toolkit:review-pr with a retro learning phase that records review patterns to the knowledge store.
This skill accepts either a PR reference or a local branch diff. You do not need an open PR to use it.
| Invocation form | What it reviews |
|----------------|-----------------|
| No argument | Uncommitted and committed local changes against the base branch (HEAD vs base) |
| PR number or URL | The diff of the specified open PR |
When no argument is provided, the skill reads git diff to determine changed files. When a PR number or URL is provided, it fetches the PR diff via gh pr view. All review phases and retro learning apply in both cases.
/do pr review # Full review (all aspects)
/do review pr tests errors # Specific aspects only
/do review pr all parallel # All agents in parallel
git diff --name-onlygh pr view 2>/dev/nullBased on changes:
Before launching agents, detect the primary language(s) of changed files:
.go files → Go domain.py files → Python domain.ts/.tsx files → TypeScript domain.md files → Documentation domainOrganization detection (run this when Go files are present): Check if this is an organization-specific Go project using ANY of:
go.mod contains organization-specific importsIf any check passes → org domain: add organization-specific reviewer to the agent list for Phase 4.
gopls MCP Integration (MANDATORY when .go files are in the diff):
When Go files are detected in the changed files, the review MUST use gopls MCP tools to provide type-aware context to all downstream review agents:
ToolSearch("gopls") to fetch gopls tool schemasgo_workspace to understand module structure, build configuration, and workspace layoutgo_file_context on EACH changed .go file to get intra-package dependency contextIf gopls MCP is unavailable (ToolSearch returns no results), fall back to Grep-based analysis but note the limitation in the review output.
Trigger: MANDATORY for Go projects when the diff modifies any of:
"*")Skip condition: If the diff only modifies function bodies without changing signatures, skip to Phase 4.
Steps:
go_symbol_references or GrepCritical finding rule: Any unvalidated caller passing user-controlled input to a security-sensitive parameter is a Critical finding.
Use the pr-review-toolkit plugin agents (they're already available):
Sequential approach (default): Easier to understand and act on
Parallel approach (when user passes "parallel"): Launch all agents simultaneously via Agent tool
Each review agent MUST write its findings to a file (e.g., pr-review-findings.md) before returning to prevent context compaction from losing review output.
After agents complete, summarize:
# PR Review Summary
## Critical Issues (X found)
- [agent-name]: Issue description [file:line]
## Important Issues (X found)
## Suggestions (X found)
## Strengths
## Recommended Action
If the user asks to fix issues, apply the fixes using the code-simplifier agent or direct edits.
After the review is complete, extract reusable patterns.
Step 1: Identify what was learned
Review the findings from all agents and ask:
If nothing reusable was learned, skip recording. Generic findings like "add more tests" are NOT worth recording.
Step 2: Record via retro-record-adhoc
For each reusable finding:
python3 ~/.claude/scripts/feature-state.py retro-record-adhoc TOPIC KEY "VALUE"
Where TOPIC matches the domain detected in Phase 3: go-patterns, python-patterns, typescript-patterns, testing, debugging, or code-review-patterns.
Quality gate for recordings:
| Record this | Don't record this | |-------------|-------------------| | "Missing defer rows.Close() in 3 of 5 SQL handlers" | "Close database resources" | | "Test assertions check status code but never response body" | "Add more assertions" |
Only record findings that are specific enough to be actionable guidance for future reviews.
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.
documentation
Document translation: quick/normal/refined modes with chunked parallel subagents and glossary support.
development
AI image generation: Gemini and Nano Banana backends; single/series/batch workflows with prompt-to-disk.
testing
Unified voice content generation pipeline with mandatory validation and joy-check. 13-phase pipeline: LOAD, GROUND, STATS-CHECKPOINT, GENERATE, HOOK-GATE, VALIDATE, REFINE, VARIETY-GATE, JOY-CHECK, ANTI-AI, CLOSE-GATE, OUTPUT, CLEANUP. Use when writing articles, blog posts, or any content that uses a voice profile. Use for "write article", "blog post", "write in voice", "generate content", "draft article", "write about".
documentation
Critique-and-rewrite loop for voice fidelity validation.