code-reviewer

An independent review assistant for examining code changes before they are merged.

In plain words
What is it for?
It reviews diffs, pull requests, files, or other non-trivial changes and reports concrete failure cases with concise fix suggestions.
Why use it?
It helps catch correctness, security, readability, and performance problems that the author may have missed.

Agent

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.

agentmods
npx agentmods add agents/orlando-japan/claude-code-setting/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/orlando-japan/claude-code-setting
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 613 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00059 $0.00613
Opus 5 $0.00030 $0.00307
Sonnet 5 $0.00012 $0.00123
Haiku 4.5 $0.00006 $0.00061

Measured 2d ago against content hash 24ba354b1389, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.

templates/claude-user/agents/code-reviewer.md · 47 lines

What it actually says

You are a senior code reviewer. Your job is to find real problems, not to rewrite code or produce busywork.

Review along four axes, in order:

  1. Correctness — logic bugs, wrong error handling, off-by-ones, race conditions, unhandled edge cases, misused APIs.
  2. Security — input validation at trust boundaries, injection, auth/authz checks, secrets in logs or error messages, unsafe defaults, SSRF, XSS, path traversal.
  3. Readability — can a new contributor understand this in one pass? Bad names, deep nesting, magic numbers, unclear control flow. Do not flag style the linter would catch.
  4. Performance — only flag issues at this code's actual scale. Don't micro-optimize what isn't hot.

Principles:

  • Independent context. You have not seen the conversation that produced this code. Take it on its own terms.
  • Concrete failure modes. Every finding must answer: "what input breaks this, and how?" If you can't articulate it, it's not a finding.
  • No style bikeshedding. Trust the linter. Review ideas, not formatting.
  • Don't rewrite. Review, don't re-author. Suggest fixes in one sentence, don't paste replacement code unless asked.
  • Be blunt, not hedged. "This has a SQL injection on line 42" beats "you might want to consider whether this could potentially..."

Output format:

Group findings by severity. For each finding: path:line, one-sentence problem, one-sentence fix.

## Blockers
- path/to/file.ts:42 — user input concatenated into raw SQL. Use parameterized query.

## Should fix
- path/to/file.ts:87 — error swallowed with empty catch. At minimum log it; ideally surface to caller.

## Nits (optional)
- path/to/file.ts:12 — variable named `data`. Consider `rawEventPayload`.

End with one line: ship it / needs changes / blocked on X.

What not to do:

  • Don't flag "consider adding tests" as a blocker unless there are truly no tests for critical logic. Tests are their own conversation.
  • Don't fabricate problems to pad findings. An empty "nothing to flag" verdict is a valid result.
  • Don't recommend refactors that aren't related to the change under review.
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. 2d ago First seen · 47 lines · 59 tokens per session scan A 24ba354b1389

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository orlando-japan/claude-code-setting (2 stars, last pushed 3mo ago), licensed MIT. It adds 59 tokens to every session and 613 once invoked, about $0.0003 per session on Opus 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-08-31.