The checks that must already be true before a PR is pushed and anyone is asked to look. Use before every push of a branch that touches a service, job, chokepoint, or user-facing copy; produces the Self-review, Product walk, Size and Gate sections of the PR body.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Pre Push Review?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/shishir10-pre-push-review)
---
name: pre-push-review
description: The checks that must already be true before a PR is pushed and anyone is asked to look. Use before every push of a branch that touches a service, job, chokepoint, or user-facing copy; produces the Self-review, Product walk, Size and Gate sections of the PR body.
---
# pre-push-review
Glossary: a *chokepoint* is a shared function every path must call (permission check, usage-limit check, feature gate). A *sweep* is a loop over many items (a scheduled job). A *usage limit* caps spend or usage per user or per account.
Read `sous.config.md`. Rules are cited by NAME (e.g. "scope pairing"), not
number, so reordering never breaks the agents that reference them. Start-small
subset: convention match, claims carry their command, guarded recovery, red on
revert, self-review, size and spread; the rest apply "when relevant". Run every
applicable item; paste the command and its output into
the PR body where the template asks. Each rule names the failure that
produced it, generalised; the point is that the check is cheap and the
failure was not. Needs git and bash only; the ticket link in the PR body comes
from the `**Source:**` and `**Link:**` lines of `docs/specs/<ticket>/ticket.md`.
Also read `${CLAUDE_SKILL_DIR}/../sous-rules/evidence.md` and, if the diff adds a flag or a mutating endpoint, `${CLAUDE_SKILL_DIR}/../sous-rules/feature-gates.md`.
## 1. Convention match
For each new call into a shared service or chokepoint, cite one existing
caller (`path:line`) and match its shape, or say why this one differs.
*Example incident (replace with your own):* a new caller omitted the acting-user argument that every sibling caller passed; the per-user usage limit was never checked, and the user was still charged. Nothing in the diff looked wrong.
## 2. Scope pairing
Any flow with two resolution points (preview/commit, read/write, cron/button,
list/detail) gets a test placed where they would diverge: two scopes (for example two tenants), two backing resources, a non-default value. Name the test.
*Example incident (replace with your own):* preview ran unscoped, commit ran scoped; every fixture had one of
everything, so they agreed by construction. Fix a found divergence now; "latent"
is not a reason to carry a one-line fix (it was re-found two rounds later).
## 3. Claims carry their command
"Regression", "unreachable", "no other callers", "lockfile unchanged", "only
X moved": each appears with the command that establishes it and its output,
or is not written.
*Example incident (replace with your own):* a body said "fixes a regression" for code that had never shipped;
another said "two names moved" when the audit prints nine. Each cost a
reviewer a round.
## 4. Identity is keyed on what the user can edit
A lookup that can return an existing row instead of creating one is keyed on
a user-editable field and ships with a rename test (save, rename, save,
assert two rows).
*Example incident (replace with your own):* keyed on a hidden internal id, a rename returned another user's row as "already exists".
## 5. Copy vs role and control
Every message naming an action is checked against the role matrix (can the
reader do it?) and the UI (does the control exist?). Count files searched
before trusting a zero-hit grep.
*Example incident (replace with your own):* a message told its reader to "raise the limit", which only a different role can do; another named a control that exists for nobody.
## 6. Guarded recovery, counters on the right side
Any `catch` that does I/O wraps it in its own `try`. An ATTEMPT counter
increments before the await; a COMPLETION counter after.
*Example incident (replace with your own):* the failure-recording write inside the catch threw and ended the whole sweep; a completion counter (`evaluated++`) sat before the call that does the evaluating.
Comments explain behaviour; they never cite a commit sha (rebases rewrite it).
## 7. Red on revert, on content
For each fix, revert one dimension at a time and paste the test going red on
the wrong VALUE, not on a missing file. A test that stays green with the fix
removed is evidence about the fixture.
## 8. Blast radius, reviewer's eye, verified-by-reading
Every caller of every changed function, marked same/changed. Every
instruction the copy gives a user, with the test on each path. Anything
believed but not executed, named as such.
## 9. Self-review
Adversarial, per file, with commands; fix what it finds; paste the summary
under `## Self-review`. Docs/one-liners: two lines. The heading is always
present.
## 10. Size and spread
Run `bash "${CLAUDE_SKILL_DIR}/../../scripts/measure.sh" <branch> [base]` (source lines by allowlist, zeros on an
empty diff, plus spread: services, deployables) and paste its output. Over the config
budget: split, or paste the owner's decision from `decisions.md`. A warning that size, services and deployables are all zero means a docs-only change or patterns that do not match the repo; fix `sous.measure.env` before trusting the numbers.
*Example incident (replace with your own):* an exclude-list measure counted a docs-only PR as over the line.
## 11. Product walk
Roles x surfaces matrix, each cell a test or `n/a because`. Scope dimensions
and failure modes from the config. One Money & data line.
*Example incident (replace with your own):* the "notify fails" cell was empty; the run's record was already written when the notification enqueue threw, so the notification never re-sent.
## 12. External languages
Reading SQL, cron, dates, a file format: check for an existing parser first;
if you write one anyway, derive the test corpus from the SPEC (including
nesting depth) before the code.
*Example incident (replace with your own):* a hand-rolled table-reference scanner found new defect classes on
each of four review rounds; the cron parser next to it, a dependency, cost
none.
## Human review
If the diff is over the size budget, a human has not read all of it. Fill the
PR template's `## Human review` section honestly: who read what, the three
riskiest hunks traced, or "agent-only". Over budget without a `decisions.md`
entry fails this check; it is not waivable in prose.
## Gate statement
A PR that adds a mutating endpoint states its flag gate or `ungated: <why>`.
*Example incident (replace with your own):* "everything is behind the existing flags" was true of the UI and
false of the paid endpoint.