agentsclimarketplace

Triage pr

Skill indrasvat/claude-code-skills/skills/triage-pr

Fetch, categorize, and address PR review comments in priority order. Classifies each comment as BLOCKER, QUESTION, SUGGESTION, or NITPICK and works through blockers first. Use when the user says "address PR comments", "fix review feedback", "respond to PR", "handle review comments", "triage PR", "what does the reviewer want", "address feedback", "PR comments", "review feedback", or needs to work through pull request review comments systematically.From its SKILL.md

Install
npx -y skills add indrasvat/claude-code-skills --skill triage-pr

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.7 KB, as published. Nobody here has run it

Triage PR

Fetch, categorize, and address pull request review comments in priority order.

Prerequisites

Fail immediately with an explicit error if any check fails: gh installed (command -v gh), authenticated (gh auth status), inside a git repo (git rev-parse --is-inside-work-tree).

Step 1 -- Identify PR

Use $ARGUMENTS as the PR number if provided. Otherwise detect from the current branch via gh pr view --json number --jq '.number'. Stop if no PR is found, or if the PR state is CLOSED or MERGED.

Step 2 -- Fetch

Get owner/repo: gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"'

Run all fetches in parallel:

  • PR metadata: gh pr view <num> --json title,body,baseRefName,headRefName,state,reviewDecision
  • Inline comments: gh api repos/{owner}/{repo}/pulls/{num}/comments
  • Top-level reviews: gh api repos/{owner}/{repo}/pulls/{num}/reviews
  • Resolved status (critical -- without this, resolved threads cannot be skipped):
gh api graphql -f query='
  query($owner:String!,$repo:String!,$num:Int!){
    repository(owner:$owner,name:$repo){
      pullRequest(number:$num){
        reviewThreads(first:100){nodes{id isResolved
          comments(first:10){nodes{id body author{login} path line createdAt}}
        }}
      }
    }
  }' -f owner=OWNER -f repo=REPO -F num=NUM

Discard all threads where isResolved is true. Only unresolved threads proceed.

Step 3 -- Categorize

For each unresolved comment, record: reviewer, file:line, full text, category. Assign exactly one category (first match wins):

CategorySignals
BLOCKERRequired change, bug, security issue, "must", "please fix", CHANGES_REQUESTED reviewer
QUESTIONAsks for clarification, "why", "can you explain", "what about", substantive ?
SUGGESTIONOptional improvement, "consider", "maybe", "might be nice", "what if", "could we"
NITPICKMinor style, starts with "nit:", "nitpick", "minor", formatting-only

Default to SUGGESTION if no pattern matches.

Step 4 -- Address in Order

Work through BLOCKERs, then QUESTIONs, then SUGGESTIONs, then NITPICKs.

  • BLOCKERs: Read the file and lines. Show the planned fix. WAIT for user confirmation before editing.
  • QUESTIONs: Draft reply text. Print it. Do NOT post via gh without user permission.
  • SUGGESTIONs/NITPICKs: Apply if quick and correct. Otherwise mark SKIPPED with reason.

Track each comment as: FIXED, DRAFTED, SKIPPED, or PENDING.

Step 5 -- Summary

| # | Category   | Reviewer | File:Line          | Status  |
|---|------------|----------|--------------------|---------|
| 1 | BLOCKER    | alice    | src/auth.ts:42     | FIXED   |
| 2 | QUESTION   | bob      | lib/utils.go:118   | DRAFTED |
| 3 | SUGGESTION | alice    | src/auth.ts:55     | SKIPPED |
| 4 | NITPICK    | carol    | README.md:12       | FIXED   |

Idempotency

Safe to re-run. Fetches fresh state each time. Resolved threads are automatically skipped via the GraphQL isResolved check.

Arguments

$ARGUMENTS -- PR number. If omitted, detected from the current branch.

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.