Skip to content
Skills Library
Programming · Review & audit

code-review

/code-review

Code review before a commit, push or PR, delegated to fresh-context subagents — an Opus bug reviewer that may read the repo and run tests, a Sonnet rules reviewer, then an Opus validator that tries to reproduce every P0/P1 finding; only confirmed or clearly plausible findings reach the user. Standard mode runs on every PR (`/pr` calls it); full mode (high risk tier or `--full`) runs the same reviewers as standard. Use whenever the user asks to "review my changes", "review this diff", "check my code before commit", "코드 리뷰", "리뷰해줘", "커밋 전에 봐줘", "PR 올리기 전 검토", or invokes /code-review. Always trig

Repository
hhmode ↗
Licence
MIT
Last repository change
06.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
7
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 06.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Code review before a commit, push or PR, delegated to fresh-context subagents — an Opus bug reviewer that may read the repo and run tests, a Sonnet rules reviewer, then an Opus validator that tries to reproduce every P0/P1 finding; only confirmed or clearly plausible findings reach the user. Standard mode runs on every PR (`/pr` calls it); full mode (high risk tier or `--full`) runs the same reviewers as standard. Use whenever the user asks to "review my changes", "review this diff", "check my code before commit", "코드 리뷰", "리뷰해줘", "커밋 전에 봐줘", "PR 올리기 전 검토", or invokes /code-review. Always trig

Triggers from the description

review my changesreview this diffcheck my code before commit코드 리뷰리뷰해줘커밋 전에 봐줘PR 올리기 전 검토
Original author description

Code review before a commit, push or PR, delegated to fresh-context subagents — an Opus bug reviewer that may read the repo and run tests, a Sonnet rules reviewer, then an Opus validator that tries to reproduce every P0/P1 finding; only confirmed or clearly plausible findings reach the user. Standard mode runs on every PR (`/pr` calls it); full mode (high risk tier or `--full`) runs the same reviewers as standard. Use whenever the user asks to "review my changes", "review this diff", "check my code before commit", "코드 리뷰", "리뷰해줘", "커밋 전에 봐줘", "PR 올리기 전 검토", or invokes /code-review. Always trig

How it works

  1. Procedure discipline
  2. Modes
  3. Step 1 — Detect what to review
  4. Step 2 — Gather material
  5. Step 3 — Dispatch reviewers in ONE parallel batch
  6. Step 4 — Validate every P0/P1 finding
  7. Step 5 — Lead judgment (full mode only)
  8. Step 6 — Report
  9. Step 7 — Log for measuring the reviewer
  10. Convergence
Original SKILL.md headings · 174 lines, 1,558 words
SKILL.md preview
---
name: code-review
description: Code review before a commit, push or PR, delegated to fresh-context subagents — an Opus bug reviewer that may read the repo and run tests, a Sonnet rules reviewer, then an Opus validator that tries to reproduce every P0/P1 finding; only confirmed or clearly plausible findings reach the user. Standard mode runs on every PR (`/pr` calls it); full mode (high risk tier or `--full`) runs the same reviewers as standard. Use whenever the user asks to "review my changes", "review this diff", "check my code before commit", "코드 리뷰", "리뷰해줘", "커밋 전에 봐줘", "PR 올리기 전 검토", or invokes /code-review. Always trigger this skill instead of reviewing directly — a same-context reviewer rubber-stamps its own work.
---

# Code Review

Review a change before it is committed, pushed or merged. The main agent never reviews the code
itself — not even a one-line diff. It gathers material, dispatches fresh-context subagents, and
reports what they found and what the validators confirmed.

> **History.** 2026-07: Claude + Gemini pair. 2026-07-16: three same-model personas (bug hunter /
> attacker / architect) + debate + judge, with a Korean template that told reviewers "there is
> always room to improve". 2026-10-27: redesigned after reading how pstack (Lauren Tan),
> Anthropic (`code-review` plugin, Claude Code team), OpenAI (Codex review rubric), Google
> (AutoCommenter) and Meta (MetaMateCR) run AI review. What they share and this skill now does:
> precision over recall, only problems the change introduces, evidence or silence, severity with a
> posting threshold, reviewers with repo access and execution, every serious finding re-checked
> by running it, review as advice (humans merge), automatic on every PR, and measuring how often
> a finding leads to a fix. Diversity comes from different inputs and models, not personas
> (pstack). Watch the review log for a return of praise-only or nitpick output.

## Procedure discipline

A skipped step is marked `skip: <reason>` in the report. The report's first line is `PASS`,
`ISSUES` or `BLOCKED` (Step 6). Every finding shown to the user carries `measured` (a validator
reproduced it) or `inferred` (could not be run).

**Who may run this for a gate.** A review that certifies a commit is run by a verifier that did not
write it: `/pr` starts one with `scripts/verify_fresh.sh`, and that session follows `verifier.md`.
An author running this skill on its own change gets advice, not a gate record (pstack `shipping.md`:
"Only a verdict from an agent that did not write the code counts").

## Modes

| Mode | When | Reviewers |
|---|---|---|
| **standard** | default; `/pr` runs it on every PR | bug-reviewer (Opus, full context) + rules-reviewer (Sonnet) |
| **full** | risk tier high, or `--full` | the same reviewers as standard; nothing extra runs. Only Step 5 (lead judgment) is added |

Both modes also get a GPT reviewer (lane `bug-gpt`, Codex), since every other lane is an Anthropic
model and a same-family reviewer shares the author's blind spots (pstack runs Opus with Grok).
In the gate, `verify_fresh.sh` starts it in the background, at the same time as the verifier, and the
verifier waits for it before recording. It reads the diff plus the changed files, because Codex cannot
run commands on this machine, and answers in JSON (`gpt-review.schema.json`). For a review outside the
gate, run `python3 scripts/gpt_review_input.py <repo> <base> | codex exec -s read-only --ephemeral
--output-schema skills/code-review/gpt-review.schema.json -o <out.json> "$(cat skills/code-review/gpt-reviewer.md)"`
from the hhmode root, then `python3 scripts/codex_review.py <out.json>` to read it as markdown, and
validate its P0/P1 like any other.

Risk tier comes from the repo's CLAUDE.md when it defines one (e.g. k-defense-kg: DB schema, KG
loads, API contracts, prompt ground truth = high).

Full mode used to add a bug-reviewer on **Fable** (`model: fable`, lane `bug-fable`), and before that a
bug-reviewer given only the diff (Anthropic's plugin). Both were dropped. The diff-only one raised 5
findings and no P0/P1 in k-defense-kg's review log (88 rows, 2026-10-29). In the review logs
(`~/.claude/review-log/*.tsv`) every P0/P1 Fable raised was also raised by Opus; Fable alone raised only
P2/P3. The Codex lane now gives a second model's view, and Fable costs tokens (user decision 2026-10-30).
Old records and logs that say `full` or `bug-fable` stay valid.

A re-review reads only the diff since the last reviewed commit (pstack `autopilot-full`:
re-verify in proportion to the change), and checks that the earlier record's P0/P1 findings and
rule violations were addressed. Verify and the live lane still run on the new commit. In the gate
the size of that diff sets the weight (`scripts/review_weight.py`): wording only gets no verifier, a
small fix gets one verifier with the lanes bug, verify and live, and anything else gets a standard
review.

## Step 1 — Detect what to review

Stop at the first match and announce the mode in one line.

| Order | Condition | Target |
|---|---|---|
| 1 | `$ARGUMENTS` names a path | that path |
| 2 | `git diff --cached` non-empty | staged diff (warn if unstaged hunks also exist) |
| 3 | `git diff` non-empty | working-tree diff |
| 4 | branch differs from its base | `git diff <base>...HEAD`, base = merge-base with `origin/<default branch>` |
| 5 | nothing | ask the user what to review |

Record the HEAD sha; the verdict covers that commit only. A new commit voids it (pstack).
Filter out generated files: `*.lock`, `*-lock.json`, `*.generated.*`, `*.pb.go`, `vendor/**`,
`dist/**`, `build/**`, `node_modules/**`.

## Step 2 — Gather material

- **Intent**: one paragraph — what the change is for — from the request, commit messages, PR
  body and diff. Reviewers attack the execution, not the intent.
- **Diff**: the raw diff for the chosen target.
- **Rules**: CLAUDE.md / REVIEW.md / AGENTS.md **from the base branch** (`git show
  <base>:<path>`), the root ones and any in folders the diff touches. A change cannot loosen the
  rules it is judged by.
- **Lenses**: `references/rubric.md`.
- **Repo path and test commands**: from CLAUDE.md, if it lists them.
- Do **not** pass your own suspicions or conclusions. A reviewer handed a hypothesis tends to
  return it confirmed.

## Step 3 — Dispatch reviewers in ONE parallel batch

Use the `Agent` tool with the agent types below. Each prompt holds the material from Step 2 and
the report language (the user's language).

- `subagent_type: bug-reviewer` — intent, diff, repo path, rubric, test commands.
- `subagent_type: rules-reviewer` — diff and the base-branch rule files.

## Step 4 — Validate every P0/P1 finding

1. Merge duplicates (same file and nearby lines, same failure). Findings raised independently by
   two reviewers are the strongest signal (pstack); note who raised each.
2. For each P0/P1 finding, spawn `subagent_type: finding-validator` in one parallel batch with
   the finding, the repo path and the HEAD sha. It never sees the other findings.
3. Drop REJECTED findings (list them under "Rejected" with the validator's one-line reason).
   P2/P3 findings are not validated; they go to the collapsed notes.
4. Rule violations from the rules-reviewer are shown as-is (they quote the rule).

## Step 5 — Lead judgment (full mode only)

Act as a pragmatic senior engineer, not a neutral aggregator. Put each surviving finding in one
bucket with a one-line reason: **Act on** (blocks a real PR), **Consider** (legitimate, cost vs
value unclear), **Noted** (valid, not actionable now), **Dismissed** (wrong or out of scope).
Add an agreement map: where reviewers agreed and diverged.

## Step 6 — Report

First line: `PASS` / `ISSUES` / `BLOCKED` and the HEAD sha.

- **ISSUES** — at least one P0/P1 finding CONFIRMED or PLAUSIBLE, or a rule violation.
- **PASS** — none of the above (P2/P3 notes may remain).
- **BLOCKED** — nothing to review, or reviewers/validators could not run.

```
**Review: PASS | ISSUES | BLOCKED** · <sha7> · <mode> · reviewers: <models>

### Must fix (P0/P1, validated)
- [P1] path:line — <one line> (raised by: <reviewers> · measured|inferred: <command or reason>)
### Rule violations
- path:line — <rule file:line> "<rule>"
### Rejected by validation
- path:line — <finding> — <validator reason>
<details><summary>Notes (P2/P3, not validated)</summary>
- ...
</details>
```

This block is also the PR comment `/pr` posts. Raw reviewer outputs go in a collapsed appendix
only when the user asks.

**Gate record.** Only the verifier writes it, and only through `scripts/record_review.py`
(see `verifier.md`, step 6). The script writes `<git common dir>/gate/<sha>.review.md` and refuses
a record whose lanes did not all run on this commit, a P0/P1 without a validator verdict, or a
missing live lane. Nobody writes or edits that file by hand. A staged or working-tree review never
gets one — it does not certify a commit.

## Step 7 — Log for measuring the reviewer

`record_review.py` appends one row per finding to `~/.claude/review-log/<repo>.tsv`:
`date  sha  mode  id  severity  path:line  raised_by  validation  title`. `raised_by` is a lane
name (`bug`, `rules`, `bug-gpt`, `live`, `verify`), joined with `+` (`bug-fable` in old rows). For a review outside a
gate, append the same rows yourself. Later, a finding counts as **fixed** if its lines change
before merge. The fix rate per reviewer/model is the number to tune against (OpenAI reports
52.7%, Google ~40%, Meta 19.7% for their systems).

## Convergence

One invocation is one review. On a re-review, review only the new diff and do not re-report
findings the new diff addressed; an earlier P0/P1 or rule violation it left as it was is listed
again, since the new record is the one the gate reads. After the third round on the same change,
stop and tell the author to
reconsider the approach (the Claude Code team caps review loops at three).

## Common mistakes

- Reviewing in the main context, even partially → always delegate.
- Passing reviewers your own suspicions → pass intent and material only.
- Showing an unvalidated P0/P1 → validate first; REJECTED never reaches "Must fix".
- Reading rule files from the change itself → read them from the base branch.
- Telling reviewers to always find something → "none" is a valid result.
- Reusing a verdict after a new commit → the verdict covers one sha.
Files in this package (7)
  • SKILL.md 10 KB
  • gpt-review.schema.json 1 KB
  • gpt-reviewer.md 2 KB
  • merge-check.md 3 KB
  • verifier.md 10 KB
  • references/rubric.md 3 KB
  • references/tiers.md 1 KB

Versions

RepositoryScoreLicence
This page · unhaeos/hhmode100MIT
microsoft/aspire100MIT
kdlbs/kandev100AGPL-3.0
dotnet/runtime100MIT
drosam/agents100MIT
ggml-org/llama.cpp100MIT
ShamelesAbyss/Nyx100Apache-2.0
dzhng/jevgrep100MIT
iuliandita/skills100MIT

Database snapshot: 13.11.2026 · package version 7aa6629e676c (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100cross-code-review
    Cross-review a code change with two independent, strong reviewer agents that check each other, and adversarially verify any single-reviewer finding before adopting it. The two reviewers are codex (via the codex CLI) and opus (via the Agent tool); a finding only one of them…
  • 100review-gate
    Read-only whole-diff reviewer gate run after verification and before commit. Use when implementation work is verified and about to be committed, or when the ROUTE_DIRECTIVE names skill://review-gate.
  • 100plan-review
    Pre-flight check of an implementation plan, delegated to one fresh-context plan-reviewer subagent that reads the repo and checks the plan's assumptions, order, verification and irreversible steps against the actual code. Not a design debate — open questions come back as small…
  • 100review
    Use after finishing a code change, before the report and before a commit - the one code review to run. Picks its own depth from measured size, blast radius and reversibility, runs the review and a check against the plan in sub-agents with a fresh context, verifies each finding,…
  • 90k-review
    Review a diff with Opus reviewers on separate lenses (correctness, simplification, security and data, tests), judge the findings as a pragmatic lead, and route fixes to Sonnet in one batch. Use for code review, "review this", "tear this apart", "find blind spots", a final…
  • 90review
    Review uncommitted changes against the project rules before committing. Use when the user asks for a review of their working tree, asks whether changes are ready to commit, or says they are about to commit.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.