Skip to content

feat(skill): add triage-pr-review Claude Code skill #35828

@dsilvam

Description

@dsilvam

Description

Add a new Claude Code skill (.claude/commands/review-pr.md) that fetches all GitHub PR review feedback from every available source and surfaces only Critical 🔴 and High 🟠 findings with file:line pointers ready to act on.

Context

When reviewing a PR today, review feedback was missed because it was posted as a top-level issue comment by the backend-review bot — a different GitHub endpoint than the inline code review threads. The skill solves this by querying all three GitHub sources in parallel and deduplicating results.

A second pain point: reviewers sometimes flag code that the PR didn't touch (pre-existing issues) or raise cosmetic concerns that aren't worth a fix cycle. The skill addresses this by reading the PR diff and description and evaluating each finding for relevance and necessity before presenting it.

What the skill does

  • Accepts a PR number or URL as input
  • Fetches from all three GitHub review sources:
    • 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 structured findings)
  • Reads the PR description and diff to understand what the PR actually changed
  • Automatically switches to the PR branch (git stashgit fetchgit checkout) so file reads reflect actual PR code
  • Classifies findings by severity using explicit emoji markers (🔴, 🟠, 🟡) from bot comments and keyword inference for plain human comments
  • For each Critical/High finding, checks whether it is already fixed by scanning recent commit messages and reading the affected file
  • Evaluates relevance and necessity: was the flagged code touched by this PR? is the fix aligned with the PR's goal? is it just cosmetic?
  • Assigns a recommendation label per finding: Must fix / Nice to have / Out of scope — skip
  • Outputs a structured action list: ❌ Needs Action / ✅ Already Fixed / Skipped count

Acceptance Criteria

  • Skill file exists at .claude/commands/review-pr.md
  • Skill fetches from all three GitHub endpoints (inline comments, reviews, issue comments)
  • Skill fetches the PR diff and description to understand scope of changes
  • Skill switches to the PR branch before reading files
  • Only Critical 🔴 and High 🟠 findings are shown by default; Medium/Low are counted but skipped
  • Already-fixed findings are detected by reading the current branch files and matching recent commits
  • Each finding includes a Recommendation label: Must fix / Nice to have / Out of scope — skip
  • Each finding includes a Relevance note explaining why that label was assigned (e.g. "line is in a hunk added by this PR" vs. "file was not modified by this PR")
  • Output follows the structured format: Needs Action / Already Fixed / Skipped sections
  • Skill is invokable via /review-pr <pr-number|pr-url>

Additional Context

  • Skill format follows the existing .claude/commands/diagnose.md pattern used in this repo
  • Severity inference for plain human comments uses security/data-loss/correctness keywords
  • The --all flag (future) can be added to also show Medium/Low findings
  • "Out of scope — skip" findings should be logged as follow-up issues rather than blocking the current PR

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    In Review

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions