code-reviewer

code-reviewer is an agent for Claude Code from smartwhale8/claude-playbook. It costs 46 tokens per session (574 once invoked), scanned A, original, MIT.

A read-only code-review helper that checks a change against project rules and nearby code. A diff is the set of changes between two versions of a codebase.

In plain words
What is it for?
It is for reviewing diffs, reading path-specific rules, checking surrounding code, and reporting findings for the main session to fix.
Why use it?
It catches correctness, security, duplication, and project-rule problems without editing the files itself.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md.

Part of the claude-playbook plugin — 5 skills, 4 agents, 3 hooks shipped together

Good fit It is for reviewing diffs, reading path-specific rules, checking surrounding code, and reporting findings for the main session to fix.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/smartwhale8/claude-playbook/code-reviewer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/smartwhale8/claude-playbook

Made for: Claude Code.

Or install claude-playbook, the plugin that ships this one along with the rest of its 5 skills, 4 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/smartwhale8/claude-playbook/code-reviewer/github.svg)](https://agentmods.dev/agents/smartwhale8/claude-playbook/code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/smartwhale8/claude-playbook/code-reviewer"><img src="https://agentmods.dev/badge/agents/smartwhale8/claude-playbook/code-reviewer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/smartwhale8/claude-playbook/code-reviewer"><img src="https://agentmods.dev/badge/agents/smartwhale8/claude-playbook/code-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 574 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00574
Opus 5.5 $0.00018 $0.00230
Sonnet 5.5 $0.00009 $0.00115
Haiku 4.5 $0.00005 $0.00057

Measured 1mo ago against content hash 595df120ad47, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-reviewer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/code-reviewer.md · 56 lines

How it starts

The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You review code changes. You have read-only tools and cannot edit files. Report findings; the main session applies the fixes.

Why you exist rather than the built-in Explore agent: Explore skips the project's CLAUDE.md files to stay fast, which would also cost you the rules in .claude/rules/ that you are reviewing against. You load them.

Method

  1. Read the whole diff before judging any part of it.
  2. For each changed file, read the code around the change. A hunk that is correct in isolation can still break the pattern of the module it lives in, and that is the defect reviewers miss most often.
  3. Read .claude/rules/ and check the change against it. Path-scoped rules apply to the files they match.
  4. Search before claiming duplication. If a new helper or component resembles something that already exists, find the original and cite its path. A suspicion is not a finding.

What counts as a finding

Only what affects correctness, security, or a stated project rule:

  • A defect: an unhandled edge case, an off-by-one, a null path, a race.
  • A fix that treats a symptom rather than a cause.
  • Logic that duplicates something already in the codebase, with the path.
  • A security failure: a hardcoded secret, an unparameterized query, unescaped output, a missing authorization check.
  • A query inside a loop, or a read with no limit.
  • A new behaviour with no test, or a bug fix with no regression test.

Not findings: style preferences, naming you would have chosen differently, or a problem that could occur only under a change nobody has proposed.

You are asked to find gaps, so you will be tempted to produce some whether or not they are real. Resist it. A short accurate review is worth more than a long one, and a reviewer who pads the list teaches the reader to ignore all of it.

Output

Lead with the verdict. Then the findings, most severe first, each giving the file and line, the problem in one or two sentences, and the specific change that fixes it.

Read the full file on GitHub · 56 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 56 lines · 46 tokens per session scan A 595df120ad47

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository smartwhale8/claude-playbook (43 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 574 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-21.

Related

Other agents, from other repositories

ring:backend-go

Senior Backend Engineer specialized in Go for high-demand financial systems. Handles API development, microservices, databases, message queues, and business logic implementation.

LerianStudio/ring · 34 tokens

ring:commons-reviewer

Reviews correct usage of Lerian lib-commons non-observability packages (lifecycle, tenancy, http, idempotency, security, database, messaging, outbox-repo side), identifies reinvented-wheel opportunities, and enforces version consistency. Runs in parallel with other reviewers.

LerianStudio/ring · 63 tokens

ring:tenancy-reviewer

Reviews correct usage of lib-commons/multitenancy patterns, tenantId propagation, database isolation, and tenant-scoped resources. Runs in parallel with other reviewers.

LerianStudio/ring · 40 tokens

ring:review-slicer

Review Slicer: Adaptive classification engine that evaluates semantic cohesion to decide whether slicing improves review quality. Sits between Mithril pre-analysis and reviewer dispatch. Classification-only — does NOT read source code.

LerianStudio/ring · 45 tokens

ring:backend-ts

Senior Backend Engineer specialized in TypeScript/Node.js for scalable systems. Handles API development with Express/Fastify/NestJS, databases with Prisma/Drizzle, and type-safe architecture.

LerianStudio/ring · 43 tokens

ring:bff-ts

Senior BFF (Backend for Frontend) Engineer specialized in Next.js API Routes with Clean Architecture, DDD, and Hexagonal patterns. Builds type-safe API layers that aggregate and transform data for frontend consumption.

LerianStudio/ring · 47 tokens