triage-pr
Skill57 starsChanged 44 days agoApache-2.0View on GitHub
Triage a pull request — fetch metadata, check status, summarize failing CI logs, ingest reviewer comments, and propose next steps.
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
When passing pr_ref to a shell command, ALWAYS double-quote it (gh pr view "$pr_ref", not gh pr view $pr_ref).
- Very specific: line 58
Pull and triage reviewer feedback: Use the JSON-derived owner, repo, and number from step 2:
- Distinctive: line 84
Do NOT push a fix, post a reply, or rerun checks.
- Very specific: line 85
If the PR is in another repo, pass the URL form to gh pr view.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Triage the PR number or URL supplied with the skill invocation. Save it as
pr_ref. Goal: give the user a one-screen status read so
they can decide what to do next without reading the GitHub UI.
Steps
Validate
pr_refbefore any shell call. The argument must match exactly one of:- Bare PR number:
^[0-9]+$ - Canonical GitHub PR URL:
^https://github\.com/[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})/[A-Za-z0-9._-]+/pull/[0-9]+$
The URL pattern matches GitHub's actual username/repo charset (owners are 1–39 chars from
[A-Za-z0-9-]with no leading hyphen; repos are[A-Za-z0-9._-]). If neither matches, stop and ask the user for a clean identifier.When passing
pr_refto a shell command, ALWAYS double-quote it (gh pr view "$pr_ref", notgh pr view $pr_ref). The regex is the first defense; the quote is the second. After step 2, prefer JSON-derived values (number, parsedowner/repofrom theurlfield) over re-usingpr_reffor any further API call.- Bare PR number:
Fetch PR metadata:
gh pr view "$pr_ref" --json number,title,state,isDraft,mergeable,mergeStateStatus,headRefName,baseRefName,author,reviewDecision,statusCheckRollup,urlCapture from the response:
number— the canonical PR number (use this, notpr_ref, in URL paths going forward)ownerandrepo— parsed from theurlfield (which ishttps://github.com/<owner>/<repo>/pull/<n>). The URL is gh's output, not user input, so it's safe to parse via shell parameter expansion orsed.
- Fetch check status:
gh pr checks "$pr_ref" - Summarize in this shape:
- PR: number, title, author, branch
- State: open/closed/merged, draft, mergeable status
- Reviews: approval state
- CI: count of pending / failing / passing checks. Name the failing ones explicitly.
- For each failing check, fetch logs:
- Get the run URL via
gh pr checks "$pr_ref" --json name,state,linkand filter wherestate == "FAILURE". The integer after/runs/in thelinkURL is the run ID. - Fetch failing logs:
gh run view <run-id> --log-failed. Identify the root-cause line — test name, lint rule, or compile error. Surface that, not the full log.
- Get the run URL via
- Map failing checks to likely culprit areas using the PR diff:
gh pr diff "$pr_ref" --name-only— match against the workflow that failed (e.g.protofleet-server-checks.ymlfailing withserver/diffs is straightforward; failing withoutserver/diffs is suspicious). Pull and triage reviewer feedback. Use the JSON-derived
owner,repo, andnumberfrom step 2:- Line comments:
gh api "repos/$owner/$repo/pulls/$number/comments" - Issue comments:
gh api "repos/$owner/$repo/issues/$number/comments" - Reviews:
gh pr view "$pr_ref" --json reviews
Dedupe findings that appear from multiple sources (the same path:line flagged by both Copilot and Codex is one finding, not two). For each unique finding, classify:
- Priority — use the comment's own badge (
P0/P1/P2, low/medium/high) if present; otherwise infer from severity language. - Status —
valid(real, needs fix),already-addressed(fixed in a later commit on the branch — re-check the current code on disk),invalid(false positive, with a brief reason), orneeds-discussion.
Output a punch-list table: file:line | source | priority | finding | status. Skip purely informational bot output (e.g. "auto-formatted N files"). Group the table after the CI section in the final summary.
- Line comments:
- Propose the next concrete action based on the CI summary AND the
comment triage. Examples: "Fix the failing test in X", "Address the
P1 from Codex re:
<thing>", "Rerun CI (probably flaky)", "This needs a rebase against main", "Approval is the only blocker".
Notes
- Do NOT push a fix, post a reply, or rerun checks. Triage is read-only.
- If the PR is in another repo, pass the URL form to
gh pr view.
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- PinW/whisper-key-local★ 200same name
- syamaner/roastpilot-agent★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- client/AGENTS.mdAGENTS.md
- proto/AGENTS.mdAGENTS.md
- server/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- asicrs-buildSkill
- code-generationSkill
- docker-compose-devSkill
- fake-rig-fixturesSkill
- hermit-toolingSkill
- migration-immutabilitySkill
- planSkill
- plugin-contract-testsSkill
- pr-describeSkill
- proto-fleet-playwright-e2eSkill
- pr-readySkill
- python-gen-tarballSkill
- regenSkill
- release-notesSkill
- code-reviewSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

