review-prs
Skill0 starsChanged 2 months agoMITView on GitHub
Batch-review multiple PRs in parallel: dispatch one sub-agent per PR in an isolated worktree, aggregate results into a summary table. Triggers on: "review all PRs", "check my PRs", "PR status".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ismail9k/skillstheir own version, first seen Sep 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ismail9k/skills★ 26same 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 repository48 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- changelogSkill
- dependabot-sweepSkill
- markdownSkill
- merge-prSkill
- pre-prSkill
- pr-tldrSkill
- tldrSkill
- agents-searchSkill
- audit-and-fixSkill
- aws-specialistSkill
- azure-specialistSkill
- code-simplifierSkill
- create-assessmentSkill
- create-auditSkill
- create-experimentSkill
- create-inspectionSkill
- crossplane-specialistSkill
- deploy-statusSkill
- detect-flakySkill
- fix-with-evidenceSkill
- flyctlSkill
- gcp-specialistSkill
- gitSkill
- ground-firstSkill
- handoffSkill
- kubernetes-specialistSkill
- local-attestSkill
- plan-graderSkill
- post-pr-reviewSkill
- pr-conductorSkill
- project-syncSkill
- pulumi-specialistSkill
- quality-reviewSkill
- release-conductorSkill
- reproduce-bugSkill
- review-prSkill
- rollback-prodSkill
- security-auditSkill
- security-reviewSkill
- smoke-testSkill
- specSkill
- terraform-specialistSkill
- terragrunt-specialistSkill
- validate-specSkill
- veracity-auditSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
Run all three checks before creating any worktree.
- Distinctive: line 67
2c — Worktree collision check: Run once:
- Very specific: line 82
Only surviving (non-preflight-failed) PRs proceed.
- Distinctive: line 160
After each round, parse each sub-agent's stdout for the result JSON.
- Distinctive: line 169
Never silently skip a PR. Every PR gets a row in the aggregate table.
- Very specific: line 182
If any PRs have sub-agent-failed: end the table with — "For failed PRs, run /review-pr N individually."
- Very specific: line 197
Worktree recreation: if a worktree path disappears mid-run, the sub-agent's if [ !
- Very specific: line 199
Every Status row: must cite the evidence_url from the sub-agent's JSON (CI run URL or test output).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Batch-review a list of PRs in parallel. Each PR gets its own sub-agent running the full review-pr workflow (fetch comments → validate → apply fixes → push → resolve threads → CI gate). Results are aggregated into a single summary table.
Trigger: when the user provides a list of PR numbers to review simultaneously, asks to batch-review PRs, or says "review all of these".
Arguments: $ARGUMENTS — space-separated PR numbers (required). Example: /review-prs 42 43 44.
Steps
1. Parse arguments
Bind NUMBERS from $ARGUMENTS. If empty, print usage and stop:
Usage: /review-prs <N1> [N2 N3 ...]Echo the target list before doing any network calls: "Reviewing N PRs: #A #B #C".
2. Pre-flight checks
Run all three checks before creating any worktree.
2a — PR existence and state. For each PR number:
gh pr view "$N" --json number,title,headRefName,baseRefName,mergeable,mergeStateStatus,state- Non-zero exit (PR not found, no access) → mark
preflight-failed: not-found; add a synthetic result row for that PR and exclude it from worktree/sub-agent execution. state != "OPEN"→ markpreflight-failed: not-open; add a synthetic result row for that PR and exclude it from worktree/sub-agent execution.
Report any exclusions. Never silently skip a PR: every requested PR must appear in the final aggregate table, including preflight-failed rows created here. If zero PRs survive for execution, stop after emitting the aggregate table.
2b — Merge state classification (advisory; from the same JSON above):
mergeable | mergeStateStatus | Tag |
CONFLICTING | DIRTY | preflight-warn: conflicts |
MERGEABLE | BEHIND | preflight-warn: behind |
UNKNOWN | any | preflight-warn: unknown-state |
MERGEABLE | CLEAN or UNSTABLE | (no tag — proceed normally) |
Record the tag and pass mergeStateStatus into the sub-agent brief; the sub-agent handles rebase (step 9 of review-pr) and CI (step 10) autonomously.
2c — Worktree collision check. Run once:
git worktree listFor each PR N, check if .claude/worktrees/pr-N appears. If yes: preflight-warn: worktree-exists and set WORKTREE_EXISTS=true for that PR. The sub-agent reuses the existing worktree safely (the if [ ! -d ] guard in review-pr step 5 handles this). If no: WORKTREE_EXISTS=false.
Print the pre-flight summary table before dispatch:
| PR | Title | Merge State | Worktree | Pre-flight |
| #42 | ... | CLEAN | new | ok |
| #43 | ... | DIRTY | exists | warn: conflicts, worktree-exists |
Only surviving (non-preflight-failed) PRs proceed.
3. Batch into rounds of 6
Split surviving PRs into rounds of at most 6. Print the plan before dispatching:
Round 1: #42, #43, #44, #45, #46, #47
Round 2: #484. Dispatch parallel sub-agents
For each round: emit a single coordinator message with one Agent tool call per PR — all calls in that round in one message. Use subagent_type: "general-purpose". Wait for all agents in the round to complete before starting the next.
Construct the following brief for each PR, substituting real values for N, TITLE, BASE_REF, MERGE_STATE_STATUS, and WORKTREE_EXISTS:
You are reviewing PR #N ("TITLE") in repo $(gh repo view --json nameWithOwner -q .nameWithOwner).
Working directory: $(git rev-parse --show-toplevel)
Worktree path: .claude/worktrees/pr-N
Worktree already exists: WORKTREE_EXISTS
Base ref: BASE_REF
Merge state at dispatch: MERGE_STATE_STATUS
Follow the review-pr command workflow exactly — all 15 steps — with these constraints:
AUTONOMY
- Do NOT merge. The user merges explicitly via `/merge-pr N` after reviewing the aggregate table.
- Do NOT prompt the user. Make autonomous decisions throughout.
- If a decision requires user judgement (e.g. an ambiguous design change), note it in `blocker`
and continue with the rest of the review. Do not halt.
WORKTREE
- If WORKTREE_EXISTS is true, skip `git worktree add` and use the existing path as-is.
- If MERGE_STATE_STATUS is BEHIND or DIRTY, rebase onto the base ref before collecting comments
(review-pr step 9 covers this — do it first, before step 2, when the branch is conflicting).
OUTPUT
After completing step 15, emit exactly ONE JSON object to stdout (no other text after it):
{
"pr": N,
"title": "TITLE",
"comments": <total comments fetched>,
"valid": <count valid issues>,
"false_pos": <count false positives>,
"fixed": <count fixes applied>,
"security": "clean|findings",
"ci": "green|fixed|blocked|flaky|skipped",
"test_plan": "verified|missing|partial|skipped",
"conflicts": "none|resolved|unresolved",
"status": "reviewed|blocked|push-failed|test-plan-missing|conflicts-unresolved|sub-agent-failed|preflight-failed",
"evidence_url": "<CI run URL or test output reference>",
"blocker": null
}
FAILURE MODES
- Push failure (step 7): set status "push-failed", stop — do not post replies or resolve threads.
- Test plan missing: set status "test-plan-missing"; include evidence_url if available.
- Merge conflicts left unresolved: set status "conflicts-unresolved"; set blocker to a one-line explanation.
- Preflight/setup failure before the review can run: set status "preflight-failed", set blocker to a
one-line explanation, still emit the JSON. Use zero counts for fields that were never collected.
- Sub-agent execution failure after start but before a normal result is produced: set status
"sub-agent-failed", set blocker to a one-line explanation, still emit the JSON. Populate
completed counts best-effort from work finished before the failure.
- Sandbox blocks file writes: emit JSON to stdout regardless.
- Any other unrecoverable error: set status "blocked", set blocker to a one-line explanation,
still emit the JSON.5. Collect results and handle partial failures
After each round, parse each sub-agent's stdout for the result JSON.
| Outcome | Action |
| Valid JSON | Store for aggregate table |
| No output / crash | status: sub-agent-failed, blocker: "no output from sub-agent" |
| Malformed JSON | status: sub-agent-failed, blocker: "parse error: <first 100 chars of output>" |
status: push-failed | Record as-is; add note: "commits staged locally — run /review-pr N to retry push" |
Never silently skip a PR. Every PR gets a row in the aggregate table.
6. Aggregate summary table
Render one row per PR using the collected JSON:
| PR | Title | Comments | Valid | False Pos | Fixed | Security | CI | Test Plan | Conflicts | Status |
Status values: reviewed, blocked, push-failed, test-plan-missing, conflicts-unresolved, preflight-failed, sub-agent-failed.
A PR may only be marked reviewed if: push succeeded, test plan verified, every active criterion passed in review-pr step 14, no unresolved CI failures, branch not conflicting (same gate as review-pr step 15).
If any PRs have sub-agent-failed: end the table with — "For failed PRs, run /review-pr N individually."
7. Cleanup
Print (do not auto-run) the cleanup command for every worktree created during this run:
git worktree remove .claude/worktrees/pr-N # for each NRules
- Never merge from inside a sub-agent or from the coordinator. Use
/merge-pr Nor/review-pr Nexplicitly for each PR after reviewing the table. - Parallelism cap: 6 concurrent sub-agents per round. Batch the rest into subsequent rounds.
- Never force-push from sub-agents. If rebase produces a conflict the sub-agent cannot resolve, it marks
conflicts: unresolvedand stops. - Worktree recreation: if a worktree path disappears mid-run, the sub-agent's
if [ ! -d ]guard recreates it. - Sandbox write blocks: sub-agents emit JSON to stdout; the coordinator captures from stdout, not from files.
- Every Status row must cite the
evidence_urlfrom the sub-agent's JSON (CI run URL or test output). - Pre-flight failures are non-fatal to the batch — removed PRs are reported in the pre-flight table and excluded from dispatch. The remaining PRs proceed.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

