A Code Review Skill for Claude Code: Catching What Agents Write and Humans Miss
12 October 2026 · Updated 28 November 2026 · 12 min read · by Yang Kai
How to build a code review skill that reviews agent-written code the way a senior reviewer would — scope checks, test evidence, security smells, and a findings format ranked by severity — plus the limits of reviewing code with the same model that wrote it.
Complete code-review skill structure: four review passes, severity format, the real review skills to start from, and the SKILL.md sections to copy
Contents
Agent-written code fails in characteristic ways. It solves the asked problem and quietly changes three unasked things. It declares success without running the tests. It reproduces a pattern from training data that your codebase deliberately avoids. A human reviewer catches some of this; a tired human reviewer, at the end of a long session of agent output, catches less of it every hour.
A code review skill turns the review you would do anyway into a repeatable pass with a fixed format: scope first, evidence second, findings ranked by severity. This article gives you both routes to one — the real, installable review skills verified in this site’s skills directory, and the structure for building your own, which is where the lasting value sits because a review skill can encode your codebase’s specific scar tissue.
It also states the limits plainly. The reviewing agent is usually the same model family as the authoring agent, and a skill cannot fix a wrong plan. What it can do is make the mechanical layer of review — the layer humans skip when tired — run every time.
The short version
| Layer | What runs it | What it catches |
|---|---|---|
| Scope and spec | The review skill, pass 1 | Changes nobody asked for; the brief half-implemented |
| Evidence | The review skill, pass 2 | “Tests pass” claims with no test output behind them |
| Smells and fit | The review skill, passes 3–4 | Security patterns, foreign style, banned local patterns |
| Mechanical analysis | CI, linters, static analysis tools | Known vulnerability patterns, type and syntax errors |
| Judgement | A human | A wrong plan, a wrong trade-off, a wrong priority |
Start from a real skill: five worth knowing
You do not have to build from zero. These five skills are listed in the skills directory, verified against their own repositories in November 2026, and each covers a different slice of the review job. All five are free and open source.
Code Review (Matt Pocock) — the two-axis split
Code Review reviews the diff since a fixed point along two axes run as parallel sub-agents: Standards — your repo’s conventions plus a Fowler smell baseline — and Spec — whether the change faithfully implements the originating issue or spec. Running the axes as separate agents keeps each verdict from contaminating the other.
Best for: teams whose recurring failure is drift — code that passes review while quietly departing from either the house style or the ticket. The spec axis is the one most home-built skills lack.
Code Review and Quality (Addy Osmani) — the five-axis pass
Code Review and Quality runs a five-axis review before merge, and adds the process discipline around the review itself: change sizing at roughly 100 lines, severity labels (Nit / Optional / FYI), review-speed norms and strategies for splitting oversized changes.
Best for: builders whose problem is review throughput rather than review depth. Its severity labels are deliberately softer than the blocker format below — pick the vocabulary your team will actually act on.
Differential Review (Trail of Bits) — the security pass
Differential Review is security-focused: it reviews code changes with git-history analysis and estimates the blast radius of a change. It is built for fix verification and security-sensitive pull requests, not style.
Best for: the changes where a style review is the wrong tool — authentication, parsing, anything touching user input or money. The same publisher’s Static Analysis plugin (CodeQL, Semgrep, SARIF parsing) is the mechanical layer that pairs with it.
Requesting Code Review (Superpowers) — review against the plan
Requesting Code Review, from the Superpowers library, activates between tasks: it reviews completed work against the plan, reports issues by severity, and treats critical issues as blocking — the next task does not start until they are resolved.
Best for: multi-step agent sessions, where drift accumulates across tasks and nobody re-reads the plan. Its sibling, Verification Before Completion, enforces the evidence habit from the other side: a fix is not “done” until the verification actually ran. That pairing — review the work, then verify the claim — is the cheapest trust upgrade in agent workflows.
Install any of these only after the safe-install audit: a review skill reads your whole codebase by design, which is exactly why its own instructions deserve reading first.
Or build your own: the four review passes
A public skill knows the category. Your own skill knows your codebase. The build below is the structure the directory skills converge on, stated as four passes.
Pass 1 — Scope. Diff the change against the request. Every file touched that the request did not imply gets flagged, not as a style point but as the review’s first question: why is this here? Scope creep is the highest-frequency agent failure and the cheapest to catch, because the diff either matches the brief or it does not. The brief discipline that makes this pass possible is in subagent briefs that get used.
Pass 2 — Evidence. Did the work actually run? The skill checks for test output, a build log, or a screenshot — evidence produced during the session, not a summary claiming it exists. “Tests pass” with no output shown is treated as “tests unknown”. This pass exists because the failure it catches — confident, unverified completion claims — is the one that erodes trust in agent work fastest.
Pass 3 — Correctness and security smells. The skill reads the changed code for the patterns agents reproduce uncritically: unvalidated input at boundaries, secrets in code or logs, error handling that swallows failures silently, SQL or shell built by string concatenation, permissions widened “temporarily”. It also checks the boring killers: off-by-one errors in new loops, timezone-naive dates, and null handling on paths the happy path never touches.
Pass 4 — Fit. Does the change follow the codebase’s own patterns — the ones in CLAUDE.md and the surrounding files — or did it import a foreign style? A foreign pattern is not automatically wrong, but the review names it so a human decides, instead of the codebase quietly forking into two dialects.
The findings format
Reviews fail socially when they return a wall of undifferentiated comments. The skill reports in three bands:
| Band | Meaning | Examples |
|---|---|---|
| Blocker | Merge would break, leak or corrupt | Failing tests, secret committed, migration without rollback |
| Should-fix | Real defect, not fatal today | Unhandled error path, scope creep into an unrelated module |
| Note | Worth knowing, author’s call | Pattern deviation, a test that would pin this behaviour |
Each finding carries the file, the line range, and a one-sentence consequence — what happens if it ships — because “consider refactoring” is a comment reviewers write and authors ignore, while “this retries forever when the API is down” gets fixed.
The SKILL.md sections
The skill body needs: the four passes as numbered steps with their checks; the severity table; an instruction to review the diff, not the whole repo (context is a budget — see the context budget audit); and an explicit rule that the skill reports findings and never edits the code under review.
That last rule matters. A reviewer that quietly fixes things destroys the evidence trail and the author’s chance to learn the pattern. Description wording follows the trigger rules: fire on “review this change / PR / diff”, stay quiet on “write code”. The general build walkthrough is in write your first Claude skill.
A review, as the skill returns it
Formats are easier to judge on output than on description. A skill run against a small agent-written change — “add a password reset endpoint” — should come back shaped like this:
| Band | Finding |
|---|---|
| Blocker | reset.ts:41 — the reset token is logged at info level; anyone with log access can take over accounts. Remove the log line and rotate the token format. |
| Blocker | No test output in the session for the new endpoint. Evidence pass: tests unknown, not passing. |
| Should-fix | session.ts was modified to add a helper, but the brief covered only the reset flow. Either justify the change or move it to its own commit. |
| Should-fix | reset.ts:88 — the error handler returns an empty 200 on mail failure, so users see “check your inbox” for an email that never sent. |
| Note | The handler follows the payments module’s structure rather than the auth module’s. Author’s call, but the codebase now has two shapes for the same job. |
Five findings, each with a file, a place, and a consequence. Notice what is absent: no praise, no style nits dressed as defects, no summary paragraph restating the diff. A review that reads like this takes a human about ninety seconds to act on — which is the entire point of fixing the format in a skill instead of re-explaining it per session.
Calibrating the reviewer: your codebase’s own rules
A generic review skill catches generic problems. The version that earns its keep encodes your codebase’s scar tissue: the three bugs your project has actually shipped, the patterns your team banned after the incident, the files that need a second pair of eyes by policy (auth, billing, migrations).
Add a project-level section to the skill — five to ten rules, each one line of rule and one line of why — and update it after every post-mortem, so the review pass literally learns from your history in the only way a static file can.
Keep the list short. A review skill with sixty project rules produces sixty-comment reviews that authors skim, which is worse than a ten-rule review they read. Retire rules the codebase has made impossible — a linter now catches it, the pattern was removed — because the skill is a checklist, and checklists rot by accumulation exactly like the skill libraries they live in. Ten live rules, each earned, reviewed quarterly: that is the calibration target.
The honest limits
The reviewing agent is usually the same model family as the authoring agent, and it shares blind spots: a wrong assumption baked into the brief will look correct to both. A review skill catches execution failures — scope, evidence, smells, fit. It does not catch a wrong plan, and it is not a substitute for running the software.
Pair it with the mechanical layer: tests that run in CI, static analysis where the stakes justify it, and browser QA with Playwright MCP for user-facing changes. Skill-based review is the middle layer of a three-layer defence, and it earns its place by being the layer that reads like a colleague.
It also has a cost worth naming: a review pass spends context and time on every change, including the trivial ones. Scope the trigger — substantive diffs, not version bumps and typo fixes — or the skill becomes a tax the team routes around, and a routed-around control catches nothing at all.
How we researched this
Desk research, stated plainly. The five named skills are listed in this site’s skills directory, verified against their own repositories and documentation in November 2026; their features and methods above are the projects’ own descriptions, reported as such.
The four-pass structure is this site’s synthesis of how those skills and standard review practice divide the job; it is presented as a buildable template, not as a benchmarked method. Nothing here claims measured catch rates. The honest test is the one the verdict below proposes: run a review skill on your own changes for a month and count the blockers you would have merged past.
The verdict
Start with one repository and one month. Install Code Review if drift from spec is your failure mode, Code Review and Quality if review discipline is, Differential Review for security-sensitive changes — or build the four-pass version and calibrate it with your own rules from day one. Run it on every agent-written change, keep the findings, and at month’s end count the blockers it caught that you would have merged past.
That count — not enthusiasm for the concept — decides whether the skill expands to the rest of your projects.
FAQ
Can the same model review its own code usefully? Yes, within limits. A fresh review pass with a fixed checklist catches execution failures the writing pass was not looking for: scope creep, missing evidence, known-bad patterns. It shares the author’s blind spots about the plan itself, which is why the human and mechanical layers stay in the stack.
Should the review skill fix what it finds? No. It should report findings and stop. A reviewer that edits destroys the evidence trail, hides the author’s recurring mistakes from the author, and makes the next review harder to trust. Fixes are a separate, visible step.
How is a review skill different from a linter or static analysis? Linters and tools like CodeQL or Semgrep match known patterns mechanically — fast, exact, and blind to intent. A review skill reads the diff against the brief, the spec and the codebase’s conventions: it can say “this file should not be in this change at all”, which no pattern matcher can. They are complements, not substitutes.
How big should a change be for a skill review to work well? Smaller than you think. The five-axis skill in the directory sizes changes at roughly 100 lines for a reason: review quality falls as diff size grows, for agents as for humans. If the skill’s reports get vague, the first fix is splitting the change, not lengthening the prompt.
Do I need a separate skill for receiving review feedback? For agent workflows, it helps. The Superpowers library ships Receiving Code Review alongside its requesting skill: it guides the agent to evaluate feedback technically rather than accept or reject it wholesale. Review loops fail on both ends, and the receiving end is the one nobody templates.
Learn more
- Claude Code skills explained
- Write your first Claude skill
- Install and audit Claude skills safely
- Subagent briefs that get used
- Browser automation with Playwright MCP
- Browse the skills directory
Category: AI Agent Skills · Tags: #skills #claude-code #testing #security
Next step: this article is part of AI Skills, which covers the full topic from first setup to advanced use.