review-pr
Skill0 starsChanged 3 days agoMITView on GitHub
Review code before it lands — the current branch, working diff, or a GitHub pull request. Use when asked to review a PR/diff/change, run a code review, do a pre-merge or pre-commit check, hunt for bugs, or gate a change before landing. Surfaces correctness bugs, removed behavior, cross-file breakage, security, performance, and cleanup, then verifies each candidate before reporting. Effort levels low|medium|high|xhigh|max (default medium; only an explicit human request runs above medium); --fix applies findings to the working tree, --comment posts inline PR comments. Claude Code /code-review pipeline with babysit semantic-decision integration.
185 other projects use a version of this.
Adopted by
Most recently taken up by
- torrust/torrust-trackertheir own version, first seen Nov 16, 2026
- Wendor/teapod-streamtheir own version, first seen Nov 16, 2026
- testcontainers/testcontainers-javatheir own version, first seen Nov 16, 2026
- chuckplayer/claude-agent-packtheir own version, first seen Nov 16, 2026
- ayoubben18/ab-methodtheir own version, first seen Nov 15, 2026
- connext-solutions/flowctltheir own version, first seen Nov 15, 2026
Used with
Projects with it also use diagnose-ci-failures, review-delta and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
zerx-labSkilldiagnose-ci-failures
Diagnose CI failures for a PR using the GitHub CLI, extract error logs, and generate a plan to fix them. Use when the user asks to check CI status, pull CI issues, triage test failures, or investigate PR build failures.
Also in 3 projects that use this
n24q02mSkillreview-delta
Review only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.
Also in 3 projects that use this
GeiserXSkilldocs-loop
Use when the user asks to audit docs, check documentation for stale claims, or verify docs against the code.
Also in 3 projects that use this
GeiserXSkillfull-loop
Drive a repository to done with sergio-loop, then keep improving it with refine-loop at a descending theta. Use only when the user explicitly invokes full-loop.
Also in 3 projects that use this
n24q02mSkillbuild-graph
Build or update the code review knowledge graph. Run this first to initialize, or let hooks keep it updated automatically.
Also in 3 projects that use this
- +7 more from GeiserX
Other versions185 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 185
- denoland/deno★ 109ksame name
- ToolJet/ToolJet★ 41ksame name
- remix-run/remix★ 33ksame name
- tirth8205/code-review-graph★ 33ksame name
- alpinejs/alpine★ 32ksame name
- nrwl/nx★ 29ksame name
- PrefectHQ/fastmcp★ 29ksame name
- jlowin/fastmcp★ 29ksame name
- livewire/livewire★ 24ksame name
- microsoft/fluentui★ 20ksame name
175 more not listed
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 repository30 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- agent-first-docsSkill
- analytics-reviewSkill
- architectSkill
- autopilotSkill
- browseSkill
- create-prSkill
- design-uiSkill
- foremanSkill
- harness-auditSkill
- humanizer-viSkill
- image-genSkill
- implementSkill
- investigateSkill
- marketing-videoSkill
- perf-auditSkill
- plan-draftSkill
- qaSkill
- reconSkill
- release-prdSkill
- releaseSkill
- semantic-decisionSkill
- setup-projectSkill
- teamSkill
- telemetry-reviewSkill
- testSkill
- token-auditSkill
- triageSkill
- ui-auditSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 178 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
No level given → use the session effort level, capped at medium.
“Common” is measured: kept by at least 6 in 10 of the 178 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
review-pr
How to execute:
- Resolve the effort level and flags from the invocation (§0).
- Take that level's template from §2 and expand every
<…>reference into the matching fragment from §1 (and the §3 appendix for each flag that was set). - Append §4's babysit decision adapter and §5's subagent model routing to the assembled prompt for medium effort and above (low keeps its two-turn hunk-only contract).
- Send the assembled prompt word for word — never paraphrase, summarize, reorder, or "improve" it. These strings are tuned; edits change behavior.
The parenthesized minified identifiers (IFl, H2o, P2o, …) are anchors
that map each region 1:1 to the extraction doc; keep them so the mirror can be
re-verified against a future dump.
0. Routing
Argument grammar: [low|medium|high|xhigh|max] [--fix] [--comment] [<target>]
- Parse
--comment/--fix. The first token is the level if it matches a known level name; everything after the level is the free-formtarget(a PR number, branch name, or file path to review instead of the diff). - No level given → use the session effort level, capped at
medium; if undefined →medium. Effort is capped atmediumunless the human typed the level themselves (/bbs:review-pr high): workflows, team specs and skills never passhigh,xhighormax. - Emit the level's inline template (§2), assembled from the shared fragments
(§1), plus the
--comment/--fixappendices (§3) when those flags are set.
Level table (drives the templates; the self-describing header is baked into each prompt):
| level | pipeline |
| low | 1 diff pass → no verify → ≤4 findings |
| medium | 3+5 angles × 6 candidates → 1-vote verify → ≤8 findings (precision) |
| high | 3+5 angles × 6 candidates → 1-vote verify (recall-biased) → ≤10 findings (recall) |
| xhigh | 5+5 angles × 8 candidates → 1-vote verify → sweep → ≤15 findings (recall) |
| max | same as xhigh; only the API reasoning effort differs, not the fan-out |
1. Shared prompt fragments
Phase 0 — Gather the diff (LAt)
## Phase 0 — Gather the diff
Run `git diff @{upstream}...HEAD` (or `git diff main...HEAD` / `git diff HEAD~1`
if there's no upstream) to get the unified diff under review. If there are
uncommitted changes, or the range diff is empty, also run `git diff HEAD` and
include the working-tree changes in scope — the review often runs before the
commit. If a PR number, branch name, or file path was passed as an argument,
review that target instead. Treat this diff as the review scope.Correctness angles (IFl = A–E; medium/high use A–C, xhigh/max use A–E)
### Angle A — line-by-line diff scan
Read every hunk in the diff, line by line. Then Read the enclosing function for
each hunk — bugs in unchanged lines of a touched function are in scope (the PR
re-exposes or fails to fix them). For every line ask: what input, state, timing,
or platform makes this line wrong? Look for inverted/wrong conditions,
off-by-one, null/undefined deref, missing `await`, falsy-zero checks,
wrong-variable copy-paste, error swallowed in catch, unescaped regex metachars.
### Angle B — removed-behavior auditor
For every line the diff DELETES or replaces, name the invariant or behavior it
enforced, then search the new code for where that invariant is re-established.
If you can't find it, that's a candidate: a removed guard, a dropped error
path, a narrowed validation, a deleted test that was covering a real case.
### Angle C — cross-file tracer
For each function the diff changes, find its callers (Grep for the symbol) and
check whether the change breaks any call site: a new precondition, a changed
return shape, a new exception, a timing/ordering dependency. Also check callees:
does a parallel change in the same PR make a call unsafe?
### Angle D — language-pitfall specialist
Scan for the classic pitfalls of the diff's language/framework — for example:
JS falsy-zero, `==` coercion, closure-captured loop var; Python mutable default
args, late-binding closures; Go nil-map write, range-var capture; SQL injection;
timezone/DST drift; float equality. Flag any instance the diff introduces.
### Angle E — wrapper/proxy correctness
When the PR adds or modifies a type that wraps another (cache, proxy, decorator,
adapter): check that every method routes to the wrapped instance and not back
through a registry/session/global — e.g. a caching provider holding a
`delegate` field that resolves IDs via `session.get(...)` instead of
`delegate.get(...)` will re-enter the cache or recurse. Also check that the
wrapper forwards all the methods the callers actually use.Cleanup angles (jFl: Reuse MAt, Simplification VFe, Efficiency KFe, Altitude zFe, Conventions NAt)
### Reuse
The angles above hunt for bugs; this one and the next two hunt for cleanup in
the changed code. Flag new code that re-implements something the codebase
already has — Grep shared/utility modules and files adjacent to the change,
and name the existing helper to call instead.
### Simplification
Flag unnecessary complexity the diff adds: redundant or derivable state,
copy-paste with slight variation, deep nesting, dead code left behind. Name
the simpler form that does the same job.
### Efficiency
Flag wasted work the diff introduces: redundant computation or repeated I/O,
independent operations run sequentially, blocking work added to startup or
hot paths. Also flag long-lived objects built from closures or captured
environments — they keep the entire enclosing scope alive for the object's
lifetime (a memory leak when that scope holds large values); prefer a
class/struct that copies only the fields it needs. Name the cheaper
alternative.
### Altitude
Check that each change is implemented at the right depth, not as a fragile
bandaid. Special cases layered on shared infrastructure are a sign the fix
isn't deep enough — prefer generalizing the underlying mechanism over adding
special cases.
### Conventions (CLAUDE.md)
Find the CLAUDE.md files that govern the changed code: the user-level
~/.claude/CLAUDE.md, the repo-root CLAUDE.md, plus any CLAUDE.md or
CLAUDE.local.md in a directory that is an ancestor of a changed file (a
directory's CLAUDE.md only applies to files at or below it). Read each one
that exists, then check the diff for clear violations of the rules they state.
Only flag a violation when you can quote the exact rule and the exact line
that breaks it — no style preferences, no vague "spirit of the doc"
inferences. In the finding, name the CLAUDE.md path and quote the rule so the
report can cite it. If no CLAUDE.md applies, return nothing for this angle.Cleanup precedence (HQt)
Cleanup, altitude, and conventions candidates use the same
`file`/`line`/`summary` shape; in `failure_scenario`, state the concrete
cost (what is duplicated, wasted, harder to maintain, or which CLAUDE.md rule
is broken) instead of a crash. Correctness bugs always outrank cleanup,
altitude, and conventions findings when the output cap forces a cut.Verdict ladder (H2o)
- **CONFIRMED** — can name the inputs/state that trigger it and the wrong
output or crash. Quote the line.
- **PLAUSIBLE** — mechanism is real, trigger is uncertain (timing, env,
config). State what would confirm it.
- **REFUTED** — factually wrong (code doesn't say that) or guarded elsewhere.
Quote the line that proves it.Recall-biased verdict ladder (D2o, high and above)
**PLAUSIBLE by default** — do not refute a candidate for being "speculative" or
"depends on runtime state" when the state is realistic: concurrency races,
nil/undefined on a rare-but-reachable path (error handler, cold cache, missing
optional field), falsy-zero treated as missing, off-by-one on a boundary the
code does not exclude, retry storms / partial failures, regex/allowlist that
lost an anchor. These are PLAUSIBLE.
**REFUTED** only when constructible from the code: factually wrong (quote the
actual line); provably impossible (type/constant/invariant — show it); already
handled in this diff (cite the guard); or pure style with no observable effect.Verify phase — precision variant (HFl, medium/xhigh/max)
## Phase 2 — Verify (1-vote, 3-state)
Dedup candidates that point at the same line/mechanism, keeping the one with
the most concrete failure scenario. For each remaining candidate, run **one
verifier** via the Task tool: give it the diff, the relevant
file(s), and the candidate, and have it return exactly one of:
<verdict ladder H2o>
Keep candidates where the vote is CONFIRMED or PLAUSIBLE.Verify phase — recall variant (w$m, high)
## Phase 2 — Verify (1-vote, recall-biased)
Dedup near-duplicates (same defect, same location, same reason → keep one). For
each remaining candidate, run **one verifier** via the Task tool:
give it the diff, the relevant file(s), and the candidate; it returns exactly
one of **CONFIRMED / PLAUSIBLE / REFUTED**.
<recall ladder D2o>
Keep **CONFIRMED and PLAUSIBLE**. Drop REFUTED.Sweep gap-focus list (P2o, xhigh/max)
moved/extracted code that dropped a guard
or anchor; second-tier footguns (dataclass default evaluated once, `hash()`
non-determinism, lock-scope shrink, predicate methods with side effects);
setup/teardown asymmetry in tests; config defaults flipped.Sweep phase (x$m, xhigh/max)
## Phase 3 — Sweep for gaps
Run **one more finder** as a fresh reviewer who has the verified list. Re-read
the diff and enclosing functions looking ONLY for defects not already listed.
Do not re-derive or re-confirm anything already there — the job is gaps. Focus
on what the first pass tends to miss: <gap-focus list P2o>
Surface **up to 8 additional candidates**, each naming a defect not already on
the list. If nothing new, return an empty sweep — do not pad.Output — JSON variant ($or(n), when ReportFindings is unavailable)
## Output
Return findings as a JSON array of at most <n> objects:
"file": "path/to/file.ext",
"line": 123,
"summary": "one-sentence statement of the bug",
"failure_scenario": "concrete inputs/state → wrong output/crash"
Ranked most-severe first. If more than <n> survive, keep the <n> most
severe. If nothing survives verification, return `[]`.Output — ReportFindings variant (PFl(n))
## Output
Call the ReportFindings tool once to report this review's results
with `{level, findings}`. `findings` is at most <n> entries ranked
most-severe first; each entry has `file`, `line`, `summary`,
`failure_scenario`, and `category` — a short kebab-case slug for the angle
that produced it (`correctness`, `simplification`, `efficiency`,
`reuse`, `altitude`, `conventions`, or a more specific slug like
`test-coverage` when one fits better) — plus `verdict` when a verify pass
produced one. If more than <n> survive, keep the <n> most severe. If
nothing survives verification, call it with an empty array. Do not also print
the findings as text.2. Inline level templates
low (OFl) — verbatim, self-contained
`low effort → 1 diff pass → no verify → ≤4 findings`
## Turn 1 — read
One tool call: read the unified diff (`git diff @{upstream}...HEAD; git diff HEAD`
to cover both committed and uncommitted changes, or `git diff main...HEAD` /
the target passed as an argument). Skip test/fixture
hunks (`test/`, `spec/`, `__tests__/`, `*_test.*`, `*.test.*`,
`fixtures/`, `testdata/`) — test-file changes are not reviewed at this level.
No subagents, no full-file reads.
## Turn 2 — findings
Flag runtime-correctness bugs visible from the hunk alone: inverted/wrong
condition, off-by-one, null/undefined deref where adjacent lines show the value
can be absent, removed guard, falsy-zero check, missing `await`,
wrong-variable copy-paste, error swallowed in a catch that should propagate.
Also flag — still from the hunk alone — new code that duplicates an existing
helper visible in the diff context, and dead code the diff leaves behind.
Do **not** flag style, naming, perf, missing tests, or anything outside the
hunk.
Output at most **4 findings**, most-severe first, one line each:
`path/to/file.ext:123 — what's wrong and the concrete failure`. If nothing
qualifies, output exactly `(none)`.medium (qor) — assembled from fragments
`medium effort → 3+5 angles × 6 candidates → 1-vote verify → ≤8 findings`
You are reviewing for **precision** at medium effort: every finding you surface
should be one a maintainer would act on.
<Phase 0: gather the diff>
## Phase 1 — Find candidates (3 correctness angles + 3 cleanup angles + 1 altitude angle + 1 conventions angle, up to 6 each)
Run **8 independent finder angles** via the Task tool. Each
surfaces **up to 6 candidate findings** with `file`, `line`, a one-line
`summary`, and a concrete `failure_scenario`.
<Angles A, B, C> <Reuse> <Simplification> <Efficiency> <Altitude> <Conventions>
<cleanup precedence>
Pass every candidate with a nameable failure scenario through — finders that
silently drop half-believed candidates bypass the verify step and are the
dominant cause of misses.
<Phase 2 — Verify (1-vote, 3-state), precision ladder>
<Output, cap 8>high (LFl) — same fan-out, recall posture
`high effort → 3+5 angles × 6 candidates → 1-vote verify (recall-biased) → ≤10 findings`
You are reviewing for **recall** at high effort: catch every real bug a careful
reviewer would catch in one sitting. At this level, catching real bugs matters
more than avoiding false positives. Err on the side of surfacing.
<Phase 0> <Phase 1 as medium> <cleanup precedence>
<pass-through instruction>
<Phase 2 — Verify (1-vote, recall-biased), PLAUSIBLE-by-default ladder>
<Output, cap 10>xhigh / max (MFl("xhigh"|"max")) — widest fan-out plus sweep
`xhigh|max effort → 5+5 angles × 8 candidates → 1-vote verify → sweep → ≤15 findings`
You are reviewing for **recall** at <extra-high|maximum> effort: catch every real bug. At
this level, catching real bugs matters more than avoiding false positives — a
missed bug ships. Err on the side of surfacing.
<Phase 0>
## Phase 1 — Find candidates (5 correctness angles + 3 cleanup angles + 1 altitude angle + 1 conventions angle, up to 8 each)
Run **10 independent finder angles** via the Task tool. Each
surfaces **up to 8 candidate findings**. Do NOT let one angle's conclusions
suppress another's — if two angles flag the same line for different reasons,
record both.
<Angles A–E> <cleanup angles> <cleanup precedence>
<Phase 2 — Verify (1-vote, 3-state)>
This is recall mode — a single non-REFUTED vote carries the finding. Do NOT
drop on uncertainty.
<Phase 3 — Sweep for gaps>
<Output, cap 15>3. Flag appendices
--comment (WBc)
## Posting to GitHub (--comment)
The `--comment` flag was passed. After producing the findings list, if the
review target is a GitHub PR, post each finding as an inline PR comment via
`mcp__github_inline_comment__create_inline_comment` (one call per finding;
include a suggestion block only when it fully fixes the issue). If that tool
is not available in this session, fall back to `gh api` (repos/{owner}/{repo}/pulls/{pr}/comments)
or print the findings instead. If the target is not a PR, print the findings
to the terminal and note that `--comment` was ignored.--fix (GBc)
## Applying fixes (--fix)
The `--fix` flag was passed. After producing the findings list, apply the
findings to the working tree instead of stopping at the report: fix each one
directly — correctness bugs and reuse/simplification/efficiency cleanups alike.
Skip any finding whose fix would change intended behavior, require changes well
outside the reviewed diff, or that you judge to be a false positive — note the
skip rather than arguing with it. Finish with a brief summary of what was fixed
and what was skipped.4. Babysit decision adapter (medium and above)
Append this policy after the level template and flag appendices:
At each verifier's verdict selection, read ../semantic-decision/SKILL.md.
After independently checking the candidate against code/callers/guards, use
kind review-finding with those citations and this effort's verdict ladder to
choose CONFIRMED/PLAUSIBLE/REFUTED. Keep verification evidence with the choice;
REFUTED without cited disproof goes to the calling LLM fallback. This adapter
does not replace the independent verifier or change the recall posture.
After the mandatory phases, use kind deep-review with remaining concrete risk
and verification gaps to choose deepen/sufficient. A deepen choice adds one
focused check for the named gap; unresolved material findings still block.
Use the calling LLM for the default provider and for Cloudflare failures or
uncertainty. Do not change user configuration or execution permissions.5. Subagent model routing (medium and above)
Append this policy after §4. It sets only the model the subagent tool runs each subagent on; the angle prompts stay word for word. Tiers are relative to the models the harness advertises, so the policy is harness-neutral.
Subagent model routing. Launch every subagent — every finder (correctness
angles A–E, Altitude, Reuse, Simplification, Efficiency, Conventions), every
Phase 2 verifier and the sweep finder — on the mid tier.
The final synthesis and any --fix edits stay in this session.
mid is the tier between the smallest model the subagent tool advertises and
the top tier (Claude Code: model "sonnet"). Never
route above this session's model: if the session already runs at or below a
tier, inherit. When the subagent tool has no model selector, or advertises a
single model, inherit for every role. Never let routing drop a finder or a
vote: if a routed model is unavailable, rerun that subagent on the inherited
model.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.

