juicesharp/rpiv-mono/pr-triage
Claude Code and agent skill by juicesharp/rpiv-mono
- community
Checking that the SKILL.md file is still in the repository.
Triage a GitHub pull request before committing review effort — fetch the PR thread (description, review comments, linked issues, CI status), assess the diff against whatever architecture/standards the target repo actually carries, and emit a triage disposition (Review · Request changes · Hold · Decline) with security tier and convention drift. Use when the user wants a PR sized up, asks 'should I review/merge this PR', or wants a recommended next step on an incoming PR. Produces triage documents in .rpiv/artifacts/triage/. Read-only — never checks out or mutates the working tree. Stack-agnostic: works in any language or framework, with or without architecture docs.
Install
npx vskill@latest install juicesharp/rpiv-mono/pr-triageSKILL.md
The same SKILL.md was published earlier as juicesharp/rpiv-mono/pr-triage.
PR Triage
Size up a pull request before spending review effort: read the PR thread, compare the diff against whatever standard the target repo carries, and emit a routing verdict. Triage classifies and routes — it does not adjudicate line by line (that's code-review, which the routed workflow runs). Read-only: no checkout, no mutation.
Stack-agnostic by design. The skill hard-codes no language, build tool, directory layout, or standards file — it discovers what the repo has and degrades to the code itself when nothing richer exists.
Input
$ARGUMENTS — a PR number (128), a PR URL, or empty (= the open PR of the current branch). This value is substituted into the skill at render time; Step 1 reads it from here directly — it is already the user's argument, not a raw token to re-parse.
Metadata
PR resolution (ref normalisation, current-branch fallback, fuzzy disambiguation) is LLM-invoked at Step 1 via the bundled _helpers/pr-fetch.mjs — it depends on the substituted Input and on conversational clarification, which render-time substitution cannot capture.
Flow
- Resolve + fetch PR → 2. Discover standards → 3. Dispatch assessment agents →
- Triage checkpoint → 5. Write artifact → 6. Present + recommend
Read-only contract (load-bearing): every agent is dispatched with read-only tools. The skill MUST NOT git checkout, switch branches, or edit files — it reasons about the PR diff as text fetched through gh. The security gate runs on fetched diff text before any routed workflow touches the tree.
Steps
Step 1: Resolve the PR and Fetch the Thread
- Read the substituted Input above and reduce it to a concrete spec the helper
accepts — do not re-parse a raw token:
| Input shape | Pass to helper | |
|---|---|---|
| empty | auto (helper resolves the current branch's PR) | |
integer / #123 / a PR URL | the value verbatim | |
| prose / fuzzy ("the auth refactor PR") | do NOT pass it. First run gh pr list --json number,title,headRefName,author, present candidates via ask_user_question (one question; options = candidate titles + "restate"), then pass the chosen number verbatim. |
- Fetch via the bundled helper with the concrete spec:
``bash node "${SKILL_DIR}/_helpers/pr-fetch.mjs" "<spec>" ``
The helper shells gh and emits labelled key/value lines (strategy:, pr_number:, title:, url:, head_ref:, head_owner:, head_label:, base_ref:, author:, files_changed:, additions:, deletions:, linked_issues:, ci_state:, ci_failing:, context_path:, patch_path:) followed by a ---changed-files--- block. Read those as authoritative. It writes two files: context_path: — the prose PR context (description + linked issues + comments + reviews + diff) for the convention-drift and intent agents; and patch_path: — the raw unified diff alone, for the diff-auditor security scan. Hand each agent the right path in Step 3; never paste the raw thread.
- Branch on `strategy:` —
resolved→ continue.no-pr→ print the helper'snote:and STOP. Do not write an artifact.no-gh→ print:pr-triage needs the GitHub CLI: install gh and run 'gh auth login'.and STOP.
Step 2: Discover the Standards Source (stack-agnostic)
The standard a change is held to is whatever the repo actually carries. Walk from each changed file (the ---changed-files--- block) up to the repo root and resolve the strongest available source per touched module — first hit wins, but record all that exist into a StandardsMap:
- Explicit architecture/convention docs — any of:
ARCHITECTURE.md,
CONTRIBUTING.md, docs/adr/**, AGENTS.md, CLAUDE.md, .rpiv/guidance/**/architecture.md, or a repo-local conventions doc.
- Machine-enforced rules — any linter/formatter/analyzer config present in the
tree (.editorconfig, ESLint/Biome/Prettier, Ruff/Flake8/Black, Checkstyle/Spotless, golangci-lint, clippy/rustfmt, .NET analyzers, … — whatever the repo has).
- Peer code (universal floor) — when neither of the above covers a module, the
standard IS the surrounding code: the patterns, naming, and structure of sibling files in that module.
Emit StandardsMap: per touched module → { source: doc|linter|peer, ref }. A module resolving to source: peer is normal, not a gap. Record no-standard only when a module has neither docs, linters, NOR readable peers (e.g. a brand-new top-level dir) — a genuine coverage hole worth surfacing in the artifact.
Step 3: Dispatch Assessment — Security · Convention Drift · Intent
Spawn ALL three in parallel at T=0 in a single message with multiple Agent calls, read-only tools only, none checks out code. The security agent reads the raw patch at patch_path: (it walks a unified diff file-by-file — its contract); the convention drift and intent agents read the prose context_path: doc.
Agent — Security (diff-auditor, read-only). diff-auditor is a row-only patch auditor: it emits one row per surface match and assigns no severity and no summary — the SAFE/REVIEW/BLOCK tier is computed by the skill in Step 4 from these rows, NOT by the agent. Give it the patch and the numbered sink surface-list: ``` Walk the patch at <patch_path> file by file. Apply these numbered sink surfaces, matching the concept in whatever language the diff uses (no stack assumptions):
- Supply-chain — install/build hooks (post-install scripts, build-step network
fetch), a new dependency from an untrusted/unpinned source, lockfile swap to an untrusted registry.
- Secrets — credential/key/token/PEM/connection-string material added in the diff.
- CI/CD poisoning — workflow/pipeline config that runs PR-controlled input with
elevated scope or exposes long-lived secrets to fork PRs.
- Code execution / unsafe deserialization — shell/process spawn, eval/dynamic import,
or a deserializer that can execute code, reachable from user-controlled input.
- Injection — user input concatenated into a query/command interpreted by an engine
(SQL/NoSQL/LDAP/XPath/shell).
- Path traversal — user-controlled path into a filesystem API without normalization.
- SSRF — outbound request with user-controlled host or protocol.
Output: one pipe-delimited row per match, per diff-auditor's format — file:line | verbatim line | surface-id | note Put confidence: N/10 (that the surface is real and user-reachable) in the note, and drop any hit below 8. Rows only — no tier, no summary, no recommendations. ```
Agent — Convention drift (codebase-analyzer, read-only): ``` Read the PR context doc at <context_path>. StandardsMap (orchestrator-resolved): {paste StandardsMap — per module: source=doc|linter|peer + ref}
For each module, Read its resolved standard (doc → the relevant section; linter → the config's enforced rules; peer → 2–3 sibling files in the module) and the diff's changes there. Emit one row per deviation: file:line — \<verbatim line>\ — standard cited (doc§ / linter-rule / peer file:line) — drift: local|structural structural = the change crosses a boundary or breaks a pattern the RESOLVED STANDARD establishes; local = a contained convention slip. Name the violated concept in the module's own terms — no assumption of language, framework, or layout. A peer-sourced module with no readable siblings returns a single no-standard row. Evidence only. ```
Agent — Intent vs. diff (codebase-analyzer, read-only): `` Read the PR context doc at <context_path>. From the Description and Linked issues, enumerate the PR's STATED intent as checkable claims — things the AUTHOR said they would do. For each claim, cite whether the diff delivers it: claim — file:line evidence | <absent>` Then flag scope creep: substantial diff changes not traceable to any stated claim. Return two short lists: (A) stated-but-undelivered, (B) delivered-but-unstated.
A claim is something the author ASSERTED (in the description, a commit message, or the linked issue). Do NOT count ambient repo states — CI/build status, pre-existing test failures, lint output — as undelivered intent; they are observations, not claims, and belong in the artifact's Notes, not the intent tally. Evidence only. No checkout. ```
Wait for all three before Step 4.
Step 4: Tally, Rank, Checkpoint
1. Tally mechanically — count the agent rows ONCE, reuse the numbers verbatim in the artifact frontmatter and body (never re-count in prose; a recount drift is the failure mode this step exists to prevent):
security_flag— derive the SAFE/REVIEW/BLOCK tier from the security agent's rows
(the agent emits rows only, no tier): 2 (BLOCK) if any surviving row is surface 1 / 3 / 4 (supply-chain, CI poisoning, code-exec / unsafe deserialization) at confidence ≥ 8; else 1 (REVIEW) if any security rows remain; else 0 (SAFE)
structural_count= convention-drift rows taggeddrift: structurallocal_count= convention-drift rows taggeddrift: localintent_undelivered= stated-but-undelivered claims (NOT states — CI/build status and
pre-existing failures are observations, not claims; they go to Notes, never this count)
scope_creep_count= delivered-but-unstated itemsblockers_count=structural_count + intent_undelivered(minorlocaldrift is NOT a blocker)convention_drift=structuralifstructural_count > 0, elselocaliflocal_count > 0, elsenonefit=possibly-redundantwhen a maintainer comment flags overlap/redundancy with existing
functionality (common for a new top-level component from an outside contributor); needs-scope-decision when the change breaks a structural placement / naming / ownership or versioning convention (where and how it's packaged is in question); else in-scope
2. Rank the Top Blockers. From the structural-drift rows + undelivered-intent claims, pick the 3–5 that actually drive the decision, most-decisive first. A fit/scope concern (a new top-level component, an outside contributor, a maintainer comment flagging redundancy, a structural convention break in naming / placement / ownership) ranks at the TOP even when it isn't a single row — it is what the reader most needs. Minor (local) nits NEVER appear here.
3. Checkpoint. Run ONE developer checkpoint via ask_user_question (house one-question-at-a-time rule). Present:
- the security tier (derived in step 1 from the agent's rows),
- the counts with explicit arithmetic — `{blockers_count} blockers ({structural_count}
structural + {intent_undelivered} undelivered intent); {local_count} minor, non-blocking`. NEVER show structural / minor / blockers as a bare triple that looks like it should sum.
- the Top Blockers (ranked) and the fit judgment,
- the recommended action (below).
Disposition options. This is initial triage, a gate before review — the pipeline is triage → review → merge, and triage never merges. The positive outcome is proceed to review, never approve or merge. The next step is a plain action (open a review, send back to the author, comment, close). The rpiv review workflow vet is the review stage (review → repair → commit), the one optional mechanism a triage hands forward.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/rpiv-pi/skills/pr-triage/SKILL.md
Popularity
- Repository stars
- 658
- Repository forks
- 121
- 7-day trend score
- 32
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/juicesharp/rpiv-mono/pr-triage)