From pr-review-triage
Use when addressing PR review comments — especially from bots like Copilot, CodeRabbit, or Greptile that can be wrong or out-of-scope. Triggers on "address the PR comments", "look at the Copilot review", "fix the review feedback on PR
How this skill is triggered — by the user, by Claude, or both
Slash command
/pr-review-triage:pr-review-triageThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Reviewer comments are *suggestions to evaluate, not orders to follow*. Bots produce 20–30% noise; a 100% fix rate means you're not pushing back enough. A clean dismissal with evidence is a successful outcome.
Reviewer comments are suggestions to evaluate, not orders to follow. Bots produce 20–30% noise; a 100% fix rate means you're not pushing back enough. A clean dismissal with evidence is a successful outcome.
Run as two specialised passes with a user checkpoint in between:
The split exists because verification and implementation pull in different directions: a single agent verifying its own future work tends to rationalize fixes it half-wants to make. Keeping the executor blind to the original comment prose (it sees only the verdict + what to change) preserves that independence.
Spawn a read-only subagent (Read, Grep, Glob, plus Bash for gh). Give it roughly this brief — adapt the PR coordinates and any project-specific verification hints:
Triage PR review comments on
<owner>/<repo>#<num>.Fetch comments as Markdown blocks — much easier to read than JSON, and lets the user skim them too:
gh api repos/<owner>/<repo>/pulls/<num>/comments \ --jq '.[] | "### `\(.path):\(.line)` — @\(.user.login) (id \(.id))\n\n\(.body)\n\n---"'Each comment renders as a section: file/line/author as the heading, the body as a paragraph, separator between entries. Append
\(.diff_hunk)to the template if you want the diff context the reviewer was looking at.If the inline result is empty, also check review-level summaries:
gh api repos/<owner>/<repo>/pulls/<num>/reviews \ --jq '.[] | select(.body != "") | "### review by @\(.user.login) (\(.state))\n\n\(.body)\n\n---"'For each comment, open the cited file and verify the premise. Bots pattern-match snippets against common bug shapes and sometimes get it wrong. Don't trust the reviewer's claim about what the code does — read the code.
Return two things:
- The raw Markdown-block dump from the fetch above (so the orchestrator can show the user what the reviewers actually said).
- A verdict table:
# File:line Verdict One-line rationale (with evidence) Verdicts:
- Fix — Real issue, in scope for this PR.
- Dismiss — wrong — Bug doesn't exist; reviewer misread. Cite the exact code that proves it ("
formatValueat card.ts:101 only appends the unit whenunit === "%"; for"other"it renders bare numbers").- Dismiss — out of scope — Real but already deferred (issue, design doc, PR description). Note where it lives.
- Defer — Real and in-scope but too large for this PR — flag for a follow-up issue.
Do not edit files. Do not commit. Do not push. You are a verifier, not a fixer.
When the triage subagent returns, relay both deliverables to the user — the raw comment dump (so they can sanity-check the triager's framing against what the reviewer actually wrote) and the verdict table — followed by a one-line summary:
Of 7 comments: 5 to fix (#2–#4, #6, #7), 2 to dismiss (#1 deferred per PR description; #5 Copilot misread — verified at card.ts:101). Proceeding with fixes unless you push back.
Wait for the user. Wrong dismissals and scope disagreements surface here, before any code changes — that's the whole point of the gate. If everything triages to dismissal, report and stop; there's nothing for Phase 3 to do.
Only spawn this if there's at least one Fix verdict. Brief it with:
package.json, pyproject.toml, Makefile, or ask the user.CLAUDE.md/memory and recent git log usually have these.Then:
Apply these fixes one at a time:
- Smallest change that addresses the verdict. No drive-by refactors.
- If the fix changes behaviour, add a test locking in the new behaviour. Doc/comment/label-only edits don't need tests.
- Do not fix more than the verdict says. Scope creep is a failure mode — it's how a "fix one comment" turns into a 400-line diff that needs its own review.
After all fixes are in:
- Run the full verification suite (lint + typecheck + tests). A fix in one file can break a test elsewhere; only running new/changed tests misses regressions.
- Commit in logical groups — typically 2–3 commits grouped by theme (e.g., backend fixes / harness fixes / docs). One mega-commit kills bisect and blame; one commit per fix is too granular and loses the grouping.
- Push to the same branch. No force-push. No
--no-verify/ hook-skipping unless the user has explicitly authorized it.Report back: commit SHAs, test counts (before → after if any were added), one-line rationale per fix.
Summarise what the executor did, plus the triager's dismissals:
Don't reply in the PR thread by default. The user owns that conversation; if they later want replies drafted, the verdict rationales are exactly what's needed.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub frasalvi/claude-plugins-frasalvi --plugin pr-review-triage