Gives the non-author verdict on a diff, one result per axis: Spec (does it do what the slice SPEC asks), Standards (does it follow the repo's REVIEW.md and AGENTS.md), and Security when the change is Deep. Writes a verdict file bound to the exact diff (patch-id plus digest), with tagged finding ids. A verdict, not a bug hunt: it never fixes and never delegates. Use when asked to 'review this PR', 'review the diff', 'code review', 'give the verdict', 're-review after the fix', or '--refactor'.
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 Code Review?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vanducng-code-review)
---
name: code-review
description: "Gives the non-author verdict on a diff, one result per axis: Spec (does it do what the slice SPEC asks), Standards (does it follow the repo's REVIEW.md and AGENTS.md), and Security when the change is Deep. Writes a verdict file bound to the exact diff (patch-id plus digest), with tagged finding ids. A verdict, not a bug hunt: it never fixes and never delegates. Use when asked to 'review this PR', 'review the diff', 'code review', 'give the verdict', 're-review after the fix', or '--refactor'."
license: MIT
argument-hint: "[--base <ref>] [--post] [--refactor]"
metadata:
author: vanducng
version: "2.4.0"
---
# code-review
You judge someone else's diff. You never fix it and never delegate: do not invoke `code-review` again, spawn agents, or call another model's CLI.
`V=<this skill's directory>/scripts/verdict.cjs`; `<base>` is the PR's base.
## Steps
1. **Tier:** `node "$V" tier --base <base>` prints the tier and the axes it needs.
2. **Round:** `node "$V" round <record>/proof --pr <n>` (that PR's verdicts count, whatever seat wrote them; without a PR, `--seat <seat>` counts yours) exits 3 past round 3: stop and hand the approach to the lead. From round 2, read only `git diff <previous verdict head>..HEAD` and the open findings; repeat nothing.
3. **Read:**
- for Spec: the slice `SPEC.md` (intent, mini-requirements, proof contract). No SPEC (a plain PR or commit): write `--spec inconclusive` and judge Standards;
- for Standards: `REVIEW.md`, then `AGENTS.md`, else `references/checklist.md`;
- whole files, not hunks.
4. **Judge each axis alone:** `pass`, `fail` or `inconclusive`, which blocks.
- Spec fails on an unmet mini-requirement or contract item.
- Standards fails on a broken written rule; quote the rule. Without one, a comment the diff adds that restates the code, or one it leaves stale (it still describes the old behaviour), is a Standards finding.
- Security (Deep) covers injection, secrets, auth scope and migrations.
- Prove a `.gitignore` or config change (`git check-ignore`, a config read) in a checkout of the PR head, never the base.
5. **Findings:** ids `F1`, `F2`, each with an axis, a tag (`Important` blocks, `Nit`, `Pre-existing`) and a status (`open`, `fixed`, `declined`).
- Flag the class of bug, so every instance gets fixed.
- A deliberate product choice is a question, not a finding.
6. **Write:** `node "$V" write --base <base> --out <file> --spec R --standards R [--security R] --finding "F1|spec|Important|open|<one line>" --seat <seat> --family <vendor family> --round N --pr <n>`. `--family` takes the vendor family (`claude`, `gpt`, `grok`), not the model name (`opus`). It binds the file to the diff and refuses a blended or impossible verdict.
7. **Attach:**
- in a rig: `rig proof add --file <step 6's --out file> --artifact-type <artifact_type> --name <proof_name>` from step 2's output (round 1 is `rev1-r1`, every later round `rev1-r2`, the only types `rig proof` accepts; the name keeps each round's file) with the printed `verdict`;
- outside one: the workbench record's `proof add` with that file.
Attach the step 6 file itself: a free-text review body carries no verdict block, and the merge gate finds nothing (`NO_VERDICT`).
Then run `fleet verdict-check <record> --base <base>` if `fleet` is on PATH, else `node "$V" check <file> --base <base>`.
8. **Report:** axis results, findings by id, the file path.
## Tiers
| Tier | When | Adds |
|---|---|---|
| Quick | docs only, or under 50 lines with no risky path | diff and touched files |
| Standard | anything else | lenses by path (schema, API, UI) |
| Deep | auth, secrets, migrations, CI, money, infra, API routes and controllers, OpenAPI specs, a config change (any file under `configs/`, or a YAML, JSON, TOML, INI or .env file outside docs, tests, fixtures, lockfiles and manifests) that sets a message-writing key (one that starts with post, send or notify, or names a channel, thread, webhook or recipients) | `security` axis; run the failing case for each finding |
A `REVIEW.md` line `Security axis: always`, at the base or the head, adds the `security` axis at every tier.
## Other modes
- `--refactor`: does it fit the codebase? Local only: `references/refactor.md`.
- `--post`: also post on the PR: `references/pr-comments.md`.
- Real data or downstream readers: `references/live-verification.md`.
- Breakage outside the diff: `references/blast-radius.md`.