Loading...
Loading...
Guided, file-by-file PR review where the user controls the pace. Fetches the PR diff and metadata (using gh CLI, GitHub MCP, or local git fallbacks), sorts all changed files by number of lines (smallest first), and reviews them one-by-one as the user says "next". For each file it shows the diff, reads relevant surrounding context from the codebase (callers, schemas, tests) only when needed to confirm a bug, then gives a concise analysis and verdict. Flags real defects inline with exact fix proposals. Respects project-specific PR_REVIEW_INSTRUCTIONS.md rules when present. Use this skill whenever someone wants to review a GitHub PR interactively, step through a PR file by file, or do a guided code review of a pull request. Also triggers on "review pr", "sequential review", "file by file review", or "let's review this PR together".
npx skill4agent add kolyasya/skills pr-review-guidedfind . -name "PR_REVIEW_INSTRUCTIONS.md"code-reviewercode-reviewcaveman-reviewreviewpr-review| Provider | Path |
|---|---|
| Universal (all providers) | |
| Antigravity / Gemini | |
| Claude Code | |
| Cursor (global) | |
| Cursor (project) | |
ghgh pr view <PR_NUMBER> --json baseRefName,headRefName,title,bodyget_pull_requestgithubgit branch --show-currentgit log -n 1 --pretty=format:"%H"mainmastergit log -n 5ghgh pr view <PR_NUMBER> --json files --jq '.files | sort_by(.additions + .deletions) | .[] | "\(.path) (+\(.additions) / -\(.deletions))"'get_pull_request_fileschangesadditionsdeletionsgit diff --stat origin/<base>...HEADgh pr diff <PR_NUMBER>git diffcat .meteor/release # or equivalent version fileask_question---
📄 File N/M · path/to/file.ts (+A / -D)
```diff
<diff content>line Nexact fixline N
Keep **What it does** to one sentence. For trivial files (type alias, import reorder) that sentence is the entire analysis — omit Issues and use `✅ Correct`.
### Navigation menu
After outputting the block, call `ask_question` with:
If the user writes a free-text comment instead of selecting, acknowledge it, apply any requested changes to the verdict, then show the menu again.
### Gather context — only if needed
Read surrounding code only to confirm a **real defect**, not for curiosity. Good triggers:
- Return type changed and a caller consumes it
- Guard condition removed — is there another?
- Schema field added — is it populated everywhere returned?
- New DB query — does the project enforce async?
Read the minimum: the specific caller, schema, or related file. Don't explore.
### Severity labels
Follow any labels defined in `PR_REVIEW_INSTRUCTIONS.md`. As defaults:
| Label | Meaning |
|-------|---------|
| **[BUG]** | Logic error, missing field, wrong condition — must fix |
| **[WARNING]** | Potential issue that may or may not be a problem in practice |
| **[SUGGESTION]** | Identifier naming, code smell, minor improvement |
| **[NIT]** | Cosmetic, docs, trivial — report only if 3+ in same file |
---
## Phase 3: End of Review
When the user selects **🏁 Done** or all files are reviewed, do the following **in order**:
### Step 1: Offer to revisit skipped files
If any files were skipped, call `ask_question` before the summary:
If yes: run the per-file block for each skipped file in original order. Update their verdict.
If no: mark them as `⏭️ Intentionally skipped` in the summary.
### Step 2: Show the summary
Once all decisions are made (including skipped file disposition):
1. Show a **summary table**: file → verdict
2. List open defects that need addressing before merge
3. If `PR_REVIEW_INSTRUCTIONS.md` or the fallback skill has GitHub submission rules, remind the user — don't post comments to GitHub unless they explicitly ask
### Summary format
| File | Verdict |
|---|---|
| types/common.ts | ✅ Correct |
| api/documents/helpers.ts | ⚠️ Minor issues |
| api/documentTypes/utils/getRefinementState.ts | 🔴 Defect — brand missing from active/ready state return |
| api/some/skipped-file.ts | ⏭️ Intentionally skipped |
getRefinementState.tsbrandapi/some/skipped-file.ts
---
## Notes on efficiency
- The sorted-ascending order is not just UX — it builds your own context incrementally. Trivial files (type additions, test registrations) tell you what concepts the PR introduces before you hit the meaty service files.
- When you spot a defect in an early file, keep track of it. It often shows up again (correctly or incorrectly) in later files.
- If the PR description has acceptance criteria, use them as a checklist. Note which are covered and which aren't as you go.