feat(skill): add triage-pr-review Claude Code skill (#35828)#35829
Conversation
Adds .claude/commands/review-pr.md — a skill that fetches ALL GitHub PR
review feedback from every source and surfaces only Critical/High findings.
Sources covered:
- pulls/{n}/comments — inline reviewer thread comments
- pulls/{n}/reviews — APPROVE/REQUEST_CHANGES summaries
- issues/{n}/comments — top-level PR comments (where review bots post)
Key behaviours:
- Auto-switches to the PR branch before reading files
- Detects already-fixed findings by matching recent commit messages and
reading the affected file in the current branch
- Classifies findings via explicit emoji markers (🔴 🟠) or keyword
inference for plain human comments
- Medium/Low findings are silently skipped; count shown at bottom
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ng (#35828) - New Step 1.5 reads the PR diff and description to capture what changed - New Step 6 evaluates each finding against three questions: code touched by this PR? fix aligned with PR goal? cosmetic/trivial? - Each finding now carries a Recommendation label (Must fix / Nice to have / Out of scope — skip) and a one-sentence Relevance note - Updated output template and rules section accordingly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Avoids ambiguity with "does a code review" — the skill triages existing reviewer comments, it does not produce new review feedback. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude finished @dsilvam's task in 1m 45s —— View job PR ReviewThe skill is well-iterated and the structure is sound. A few things worth a second look — most are correctness/clarity issues, not blockers. 1. PR description is stale vs. the skill it shipsThe PR body says:
But the skill (Step 1, line 28) explicitly says the opposite, which is the better design:
This was clearly changed during review iterations. Update the PR body or future readers will be confused about what the skill does. Also worth dropping the matching test-plan item: "Verify the skill switches to the PR branch automatically". 2.
|
- [🔴] Use gh pr checkout instead of manual fetch+checkout — handles fork PRs where head branch lives in contributor's repo, not origin - [🔴] Preserve working-tree state: record git status before stash, restore original branch and run git stash pop at end of session - [🟠] Tighten implicit severity inference: require context-aware matching (not bare substring), exclude negations and quoted blocks, flag all inferred findings with [severity: inferred], require Grep confirmation before inferring HIGH for dead code - [🟠] Remove --all flag reference from output template (flag does not exist) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
) - [🟠] Eliminate local working-tree mutation entirely: drop git stash/ checkout/fetch, use GitHub Contents API (gh api .../contents?ref=SHA) for all file reads — safe for forks, no state to restore, no stranding - [🟠] Fix stale line numbers: emit both .line and .original_line from Source A; use .line for reads (current position), fall back to .original_line labeled [outdated diff position] when .line is null - [🟠] Add --paginate to Source B (/reviews) — was silently dropping reviews >30 on long-lived PRs - [🟠] Remove agent: Explore (wrong subagent for cross-file analysis) and context: fork (undocumented, silently ignored) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
.claude/commands/review-pr.md, a new Claude Code skill (/review-pr) that fetches ALL GitHub PR review feedback from every source and surfaces only Critical 🔴 and High 🟠 findingspulls/{n}/comments), review summaries (pulls/{n}/reviews), and top-level bot/human comments (issues/{n}/comments)Must fix / Nice to have / Out of scope — skiprecommendation so developers don't waste time on pre-existing or cosmetic issuesCloses
Closes #35828
Test plan
/review-pr <any-pr-number>and verify output includes findings from all three GitHub sourcesRecommendationlabel andRelevance note🤖 Generated with Claude Code