pr
Skill2 starsChanged 5 months agoMITView on GitHub
Lists, reviews, and merges GitHub pull requests (maintainer workflow). Fast-track docs/test-only PRs skip heavy gates; code PRs run full local gates. Use when the user invokes /pr, /pr list, /pr review, /pr approve, /pr sweep, /pr fast-approve, or /pr green.
In this repository16 other files it gives its agents.
- backlogSkill
- commitSkill
- copySkill
- coverageSkill
- deslopSkill
- fixSkill
- global-code-reviewSkill
- grand-syncSkill
- implementSkill
- interviewSkill
- prod-error-fixSkill
- raptorSkill
- soakSkill
- testsSkill
- verify-thisSkill
- worktreeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 8 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 49
Read the PR body carefully.
- Very specific: line 53
Prefer gh pr update-branch <n> --rebase.
- Very specific: line 57
After sync, check for non-git collisions the project cares about (duplicate ticket ids, migration version overlaps).
- Very specific: line 65
Fast track: when every path is docs and/or tests only (discover allowlists from project /pr.local or contributing docs).
- Very specific: line 73
--fast: if not fast track → FAIL (list offending paths). - Very specific: line 96
If the body has no Test plan / validation section, say so in the verdict (Description validation: none stated) — do not invent requirements.
- Distinctive: line 97
When the description and the diff disagree (e.g.
- Very specific: line 103
Run project gates (scoped + full tests per /tests, lint/typecheck, UI/i18n/copy if UI touched, optional /deslop).
- Very specific: line 130
Only when review PASS (or accepted warnings), every §3b agent-verifiable item is met, every Needs-user item is confirmed or waived by the …
- Distinctive: line 132
If Needs-user items remain unconfirmed → stop, re-list them, and ask the user to confirm or waive before merging.
- Very specific: line 138
If not mergeable (conflicts) → stop.
- Distinctive: line 153
Never force-push the default branch.
- Very specific: line 213
Run /pr review <n> on the fast track only — §0–§1b, §2 (confirm fast), §3, §3b, §8.
- Distinctive: line 215
If §3b has unmet Needs user items: do not merge — record under Failed (or a separate "Blocked — needs user" section) with the explicit list.
- Very specific: line 224
After the loop, git pull --ff-only origin <default-branch> once more, then:
- Distinctive: line 265
If nothing was fast-track eligible: say so, still list Remaining open PRs.
- Distinctive: line 287
If the worktree is dirty, stop.
- Distinctive: line 313
Draft, or not green: Do not check it out. Record it under needs attention, with the draft flag or the check that is failing or still …
- Very specific: line 314
Green: Run /pr review <n>. Fast-track when §2 says so.
≈ “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
Pull request workflow
Requires: gh authenticated for the repo.
Discover repo conventions first: default branch, whether CI runs on PRs or only post-merge, merge permissions, and any semantic-collision checks (ticket ids, migrations). Prefer project /pr.local or contributing docs for repo-specific fast-track allowlists and collision scripts.
Subcommands
| Invoke | Action |
/pr list | Open PRs targeting the default branch |
/pr review <n> | Checkout, sync, run review gates, verdict — do not merge |
/pr review <n> --fast | Require fast-track classification |
/pr review <n> --docs | Require docs-only |
/pr review <n> --full | Force full code gates |
/pr approve <n> | Merge after a clean review (user must explicitly approve) |
/pr sweep | Maintainer batch: serially fast-review + merge every docs/tests-only PR; skip code PRs — see § sweep |
/pr fast-approve | Alias for /pr sweep |
/pr green | Serially review every open PR and merge the clean ones; explain the rest — see § green |
<n> may be #52 or 52. /pr review auto-selects fast track when every changed file matches the project allowlist; use --full to override.
/pr sweep (and /pr fast-approve) counts as explicit approval for every fast-track PR that passes review in the loop. Invoke it directly — do not merge code PRs in the same pass.
/pr green counts as explicit approval to merge every PR that is green on GitHub and PASS (or accepted warnings) after review. It includes code PRs. It does not merge drafts, red or pending checks, or review failures.
/pr list
gh pr list --base <default-branch> --state openSummarize number, title, author, branch, updated. Optional: tag fast (docs / tests / docs+tests) vs code from changed paths (gh pr diff <n> --name-only). When several PRs touch shared id namespaces or migrations, note semantic-collision risk — serial oldest-first + rebase mitigates most cases.
/pr review <n>
0. Load
gh pr view <n> --json number,title,author,headRefName,baseRefName,url,mergeable,mergeStateStatus,body
gh pr checkout <n>Read the PR body carefully. Extract any Test plan, checklist items, manual QA steps, staging/preview requirements, env flags, feature-flag toggles, data setup, or other validation hints. Carry those into §3b and the verdict — do not treat the description as optional flavor text.
1. Sync with default branch
Prefer gh pr update-branch <n> --rebase; else rebase/merge origin/<default-branch> and push. Resolve conflicts when straightforward.
1b. Semantic collisions (if the repo uses them)
After sync, check for non-git collisions the project cares about (duplicate ticket ids, migration version overlaps). Fail review until resolved. Skip when the diff has no relevant paths. Prefer project /pr.local or backlog docs for exact commands.
2. Diff + classify
git diff origin/<default-branch>...HEAD --name-onlyFast track when every path is docs and/or tests only (discover allowlists from project /pr.local or contributing docs). Otherwise code full.
| Sub-tag | Condition |
docs | Every changed file is docs-only |
tests | Every changed file is test-only |
docs+tests | Mix of docs and test paths |
--fast: if not fast track → FAIL (list offending paths). --docs: if any non-doc path → FAIL.
3. Self-review
- Critical → FAIL
- Warning → FAIL unless explicitly accepted
- Note → non-blocking
Fast track: light docs/test hygiene only — no full test suite unless the project requires it.
3b. Description validation + user action items
From the PR body (and any linked issue notes quoted there), build two lists:
| Bucket | What belongs |
| Agent-verifiable | Checklist / Test plan items you can satisfy with local gates, automated tests, lint, code inspection, or gh/API checks |
| Needs user | Manual UI clicks, visual QA, staging/preview sign-off, production config, secrets, credentials you lack, product judgment, or any step that requires a human |
Rules:
- Meet every agent-verifiable item before PASS. Unchecked or unmet description requirements → FAIL (or block approve) until done or explicitly waived by the user.
- Never approve/merge while any Needs-user item is unmet, unless the user explicitly confirms each one (or waives it). Listing them is not enough — wait for confirmation.
- If the body has no Test plan / validation section, say so in the verdict (
Description validation: none stated) — do not invent requirements. - When the description and the diff disagree (e.g. Test plan mentions a path not in the PR), call that out; do not silently skip.
Fast track still applies §3b when the description asks for validation beyond docs/test hygiene.
4–7. Code PRs only
Run project gates (scoped + full tests per /tests, lint/typecheck, UI/i18n/copy if UI touched, optional /deslop). Follow AGENTS.md / /commit for the smallest typed gate.
Also run or confirm any agent-verifiable items from §3b that fall under these gates (scoped tests named in the Test plan, copy checks, etc.).
Fast track: skip §4–§7 unless §3b requires a specific automated check — then run only that check. Record Tests/Lint/UI/Deslop: skipped (fast track) when fully skipped.
8. Verdict
PR #<n>: <title>
Track: fast (docs | tests | docs+tests) | code
Sync: <ok | updated | blocked>
Semantic collisions: <none | resolved | FAIL>
Description validation: <none stated | all agent items met | unmet: …>
Needs user (do not approve until confirmed):
- <explicit checklist item or manual step from the PR body>
- … (or "none")
Agent-verified from description:
- <item>: done
- … (or "none")
Verdict: PASS | FAIL | PASS WITH WARNINGSAlways print the Needs user list explicitly in chat — even when empty (none). A PASS that still has unmet Needs-user items is not merge-ready; treat approve as blocked until the user confirms or waives each line.
/pr approve <n>
Only when review PASS (or accepted warnings), every §3b agent-verifiable item is met, every Needs-user item is confirmed or waived by the user, and the user explicitly asks to approve/merge — including via /pr sweep / /pr fast-approve for each PR in that batch.
If Needs-user items remain unconfirmed → stop, re-list them, and ask the user to confirm or waive before merging.
gh pr view <n> --json mergeable,mergeStateStatus,headRefNameIf not mergeable (conflicts) → stop. Mark draft PRs ready first (gh pr ready <n>).
gh pr merge <n> --merge --delete-branch
# --admin only when branch policy blocks solely due to missing PR CI and local gates passedThen update local default branch:
git fetch origin
git checkout <default-branch>
git pull --ff-only origin <default-branch>Never force-push the default branch.
/pr sweep
Aliases: /pr fast-approve, /pr fast approve.
Maintainer routine: clear the fast-track queue in one pass. Lists all open PRs targeting <default-branch>, classifies each per §2, and for every fast track PR runs the accelerated path (§1 → §1b → §3 → §8) then § approve — without §4–§7.
Code PRs are skipped — listed in the closing summary for a later /pr review <n> --full.
Flags
| Flag | Effect |
--dry-run | Classify and report what would merge; no checkout, no merge |
--oldest-first | Default — ascending PR number (safer when several PRs share id namespaces) |
--newest-first | Descending PR number |
Serial only — never parallel
Each merge updates the default branch; the next PR must rebase on fresh origin/<default-branch> (especially for §1b semantic collisions). Do not check out or review multiple PRs in parallel.
Between every PR in the loop:
git fetch origin
git checkout <default-branch>
git pull --ff-only origin <default-branch>Workflow
0. Start on default branch
git fetch origin
git checkout <default-branch>
git pull --ff-only origin <default-branch>1. List and classify (no checkout yet)
gh pr list --base <default-branch> --state open --json number,title,headRefName,author,createdAt,isDraftSort by PR number per flag (default oldest-first). For each PR, classify from the remote diff:
gh pr diff <n> --name-onlyTag each row fast (docs / tests / docs+tests) or code. Note semantic-collision risk when several fast-track PRs touch shared id or migration paths.
--dry-run: print the classified table and stop.
2. Process fast-track PRs one at a time
For each PR classified fast (in sort order):
- Run
/pr review <n>on the fast track only — §0–§1b, §2 (confirm fast), §3, §3b, §8. Do not run §4–§7 unless §3b requires a specific automated check. - On PASS or PASS WITH WARNINGS (warnings documented) and no unmet Needs-user items: run § approve for that
<n>. - If §3b has unmet Needs user items: do not merge — record under Failed (or a separate "Blocked — needs user" section) with the explicit list; continue the loop.
- Record: PR number, title, URL,
headRefName, merge commit sha (if available), remote branch deleted (yes/no). - On FAIL: record failure reason; continue the loop.
- Always end the iteration on fresh default branch before the next PR.
Skip PRs classified code without checkout.
3. Closing summary (required)
After the loop, git pull --ff-only origin <default-branch> once more, then:
gh pr list --base <default-branch> --state openReport in chat:
## /pr sweep complete
### Merged (<count>)
| PR | Title | Branch | Merge commit | Branch deleted |
|----|-------|--------|--------------|----------------|
| #<n> | <title> | <headRefName> | <sha or n/a> | yes / no |
### Failed fast-track (<count>)
| PR | Title | Reason |
|----|-------|--------|
| #<n> | <title> | <§8 FAIL summary> |
### Blocked — needs user (<count>)
| PR | Title | User action required |
|----|-------|----------------------|
| #<n> | <title> | <explicit Needs-user bullets> |
(Omit sections when count is 0.)
### Skipped — code PRs (<count>)
| PR | Title | Branch | Track |
|----|-------|--------|-------|
| #<n> | <title> | <headRefName> | code (full review required) |
### Remaining open PRs (<count>)
| PR | Title | Author | Branch | Updated |
|----|-------|--------|--------|---------|
| … | … | … | … | … |
Local default branch: <ff-only ok | note>If nothing was fast-track eligible: say so, still list Remaining open PRs.
Typical invocations
/pr sweep
/pr fast-approve
/pr sweep --dry-runPair with automation output (docs triage, coverage-gap agents) — run /pr sweep after those PRs land, not in parallel with other PR checkouts.
/pr green
Review every open pull request one at a time. Merge the ones that are clean. At the end, explain which ones still need a person.
This is not /pr sweep. Sweep skips code. Green reviews code PRs with the full gates in § review §4–§7, and fast-track PRs on the fast path.
Serial only
Each merge updates the default branch. Finish one PR, return to a fresh default branch, then start the next. Do not check out two PRs at once.
If the worktree is dirty, stop. Do not stash, reset, or discard local work.
Between every PR:
git fetch origin
git checkout <default-branch>
git pull --ff-only origin <default-branch>0. Start on the default branch
Same fetch, checkout, and fast-forward as above.
1. List, oldest first
gh pr list --base <default-branch> --state open --limit 50 --json number,title,author,headRefName,isDraft,updatedAt,url,statusCheckRollupSort by ascending PR number. A pull request is green when it is not a draft and every check in statusCheckRollup has completed with success (SUCCESS, NEUTRAL, or SKIPPED). Pending, queued, failing, or missing required checks are not green.
2. One PR at a time
For each pull request, in order:
- Draft, or not green. Do not check it out. Record it under needs attention, with the draft flag or the check that is failing or still running. Continue.
- Green. Run
/pr review <n>. Fast-track when §2 says so; otherwise run the code gates. Sync with the default branch before the verdict. - PASS or PASS WITH WARNINGS (warnings written down): run § approve. Record the PR, title, URL, branch, merge commit, and whether the remote branch was deleted.
- FAIL or not mergeable after sync: do not merge. Record why, in a sentence a reviewer can act on. Continue.
- End the iteration on a fresh default branch.
3. Closing summary
Fast-forward the local default branch once more, then gh pr list --base <default-branch> --state open.
## /pr green complete
### Merged (<count>)
| PR | Title | Branch | Merge commit | Branch deleted |
|----|-------|--------|--------------|----------------|
| #<n> | <title> | <headRefName> | <sha or n/a> | yes / no |
### Needs attention (<count>)
| PR | Title | Why |
|----|-------|-----|
| #<n> | <title> | <draft, failing check, pending check, or review FAIL in one or two sentences> |
Local default branch: <ff-only ok | note>Omit a section when its count is 0. The needs-attention rows are the point of the command: say what is wrong and what a follow-up review would have to decide. Do not leave that as "needs review" with no reason.
Related
/commit·/deslop·/tests·/backlog·/copy· project/pr.localwhen present
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.

