pre-merge-review
Gate an existing change for merge — run one skill that fires the whole production-readiness pass. First a deterministic mechanical gate (lint + typecheck + tests, via a script whose exit code decides), then the three-reviewer panel dispatched in parallel — devils-advocate (correctness), security-reviewer (exploitability), code-quality (craft) — then a single READY / NOT READY verdict. Use before opening a PR or merging, when you want the full review fleet run on a diff you already have. Do NOT use to implement a feature from a spec (that's feature-implement-loop) or to review a document (that's doc-critique).
Other ways to install
With the sibling skills it hands off to:
The whole pack it belongs to:
By hand, from a clone of the repo:
In Claude Code, with the dev-team plugin installed, invoke it as:
Try it
A realistic prompt from the skill's acceptance evals:
Run a pre-merge review on my branch that adds a /export endpoint. The project is Python; `pytest` currently fails on one new test, and the endpoint reads user_id from the query string.
What a good result looks like
Example output
a NOT READY verdict where the mechanical gate is decisive · the skill's own worked example, source
"Review my branch before I open the PR — it adds a
/exportendpoint that streams a user's records as CSV."
The change: a new export_handler + one new test.
Verdict: NOT READY — the mechanical gate is RED, and the panel adds one blocker.
Mechanical gate (scripts/gate.py, auto-detected)
| Command | Result |
|---|---|
ruff check . | PASS |
mypy . | PASS |
pytest -q | FAIL — test_export_empty errors: export_handler raises TypeError on a user with zero records |
GATE: RED — 1/3 command(s) failed. A red gate is NOT READY on its own; the review below can only add blockers, never clear this.
Review panel (merged, de-duped)
🟥 blocker — missing authorization (security-reviewer). export_handler reads user_id from the query string (handler.py:12) and returns that user's records with no check that the caller is that user — any authenticated user can export anyone's data (IDOR). Fix: derive user_id from the session, not the request; if an admin export is intended, gate it behind an explicit role check.
🟧 major — unbounded response (devils-advocate). The CSV is built in memory for the full record set (handler.py:20); a user with millions of rows OOMs the process. Fix: stream rows, or paginate/cap.
🟨 minor — craft (code-quality): export_handler mixes fetch, format, and HTTP concerns in one 60-line function (handler.py:8-68); extract rows_to_csv(). (listed, does not block.)
Must-fix before merge
- Gate: fix
export_handleron the empty-records case sopytestis green. - Blocker: derive
user_idfrom the session — close the IDOR. - Major: stream/cap the CSV to bound memory.
Why this passes the quality bar
The gate was run, not assumed, and its RED result decides the verdict regardless of the review; findings are merged across the three lenses (security, correctness, craft) with no triple-reporting; the verdict is one word plus an ordered must-fix list — gate failures first, then blocker/major. A no-victim security note wasn't inflated to a blocker; the IDOR — with a concrete attacker path — was.
How it's checked
Measured against plain Claude Code (2026-10-23): it met 44% of its checks, against 43% without it, and a blind judge preferred the agent without it. How skills are checked
23 assertions across 4 acceptance evals, and 9 trigger queries. Every skill's checks
What the output must do
When it should and shouldn't activate
Should activate:
- is this change ready to merge?
- run all the reviewers on my branch before I open the PR
- production-readiness review of this diff
- gate my PR — lint, tests, and a full review
- review this branch and tell me if it's safe to ship
Should leave to another skill:
- implement this feature from the ticket's acceptance criteria
- just find the bugs in this function
- critique this design doc
- should we use Postgres or DynamoDB for this?
Hands off to
- council-review — when the blocker is a design disagreement, not a defect. Adjudicate the disagreement outside the diff.
Related skills
feature-implement-loop, devils-advocate, doc-critique
Source
SKILL.md · the whole folder on GitHub.