Review a pull request for code quality, test coverage, and architectural alignment. Use when asked to review a PR, check code quality, provide feedback on changes, or audit a diff. Do NOT use for creating PRs (use pr:create) or for merging (use pr:merge).
Perform a structured code review on a GitHub pull request, covering correctness, test coverage, security, performance, and architectural fit.
Code reviews catch bugs before they reach production, but review quality varies wildly. Junior reviewers miss security issues; senior reviewers skip test coverage. This skill applies a consistent checklist so nothing falls through the cracks, while leaving subjective design decisions to the human reviewer.
gh pr diff ${pr_number}Read the diff. If --brief is set, summarize the changes in 3-5 sentences and skip to Step 5.
Gotcha: Large diffs (>2000 lines) should be reviewed file-by-file. If the diff exceeds this threshold, switch to per-file review mode automatically and note this in the output.
Review each changed file for:
Correctness:
Security (prioritize if --focus security):
Performance (prioritize if --focus performance):
Check if the PR includes tests for:
gh pr checks ${pr_number}Note any failing CI checks.
Compare the changes against:
docs/ or ARCHITECTURE.md)Output a structured review:
## PR #${pr_number} Review
### Summary
<2-3 sentence summary of what the PR does>
### Findings
| Severity | File | Line | Issue |
|----------|------|------|-------|
| ... | ... | ... | ... |
### Test Coverage
<Assessment of test adequacy>
### Recommendation
<APPROVE | REQUEST_CHANGES | COMMENT>
<Brief justification>Why this format? The table makes it easy to address findings one by one. The recommendation gives a clear signal. The summary helps other reviewers who arrive late.
| Condition | Action |
|---|---|
| PR number not found | Stop: "PR #${pr_number} not found. Check the number and repo." |
| No diff available | Stop: "PR has no changes or is already merged." |
| CI checks still running | Note in review: "CI checks in progress, results may change." |
| Diff too large (>2000 lines) | Switch to per-file mode, note in output |
LuminairPrime/git-worktrees-prime
49d6ae2
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.