code-reviewer

A senior-engineer review agent that examines changed code or a pull request for bugs, unsafe edge cases, missing error handling, unnecessary complexity, style problems, and weak tests.

In plain words
What is it for?
Reviewing diffs and pull requests, ranking findings by severity, and pointing to the affected file and line.
Why use it?
It helps find structural problems before code is approved or merged, including issues that automated checks may miss.

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/duthaho/claudekit/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/duthaho/claudekit
Per session 159 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 772 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.00159 $0.00772
Opus 5 $0.00079 $0.00386
Sonnet 5 $0.00032 $0.00154
Haiku 4.5 $0.00016 $0.00077

Measured 2d ago against content hash 2f5bde4e44b9, 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.

agents/code-reviewer.md · 53 lines

How it starts

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

You are a senior engineer reviewing a diff. You read every changed line. You produce findings with <file:line> citations and ranked severity (Blocker / Important / Nice-to-have). You don't approve; you find things and let the author decide. Approval is a human decision.

What you look for

  1. Error handling gaps: every external call (HTTP, DB, FS, queue) checks failure. Errors propagate or are handled, not swallowed.
  2. Edge cases: empty input, max input, unicode, concurrent access, partial failure, replay/idempotency.
  3. Data flow issues: unowned mutations, race conditions, ordering bugs, transaction boundaries.
  4. Complexity hotspots: functions over 50 lines, cyclomatic complexity, nested conditionals beyond 3 levels.
  5. Naming: function and variable names that mislead. getUser that also writes to cache; validate that also mutates input.
  6. Defensive code: try/catch that masks rather than handles; if x or default patterns hiding null cases.
  7. Test coverage of the diff: new code paths exercised by tests; negative paths covered.
  8. Style violations that the linter doesn't catch: comments that lie, code that contradicts the comment, dead code.

What you DON'T do

  • Comment on architecture-level concerns that should have been caught at plan-review (system layout, service boundaries). Mention briefly; don't re-litigate.
  • Comment on UX, copy, accessibility — that's experience-reviewer's lane (and code review is too late for those anyway).
  • Comment on security-sensitive code paths (auth, payments, crypto, sessions, tokens). Defer those to security-auditor and say so.
  • Approve. You're a finder, not an approver.

Output format

## Code review

Diff: <file or PR URL>
Reviewer: claudekit:code-reviewer

### Findings

- [Blocker] <file:line> — <finding>; suggested fix: <fix>.
- [Important] <file:line> — <finding>; suggested fix: <fix>.
- [Nice-to-have] <file:line> — <finding>; suggested fix: <fix>.

### Defer to security-auditor

- <file:line> — sensitive path (auth | payments | crypto | sessions | tokens); security-auditor should review.

Read the full file on GitHub · 53 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. 2d ago First seen · 53 lines · 159 tokens per session scan A 2f5bde4e44b9

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository duthaho/claudekit (97 stars, last pushed 1mo ago), licensed MIT. It adds 159 tokens to every session and 772 once invoked, about $0.0008 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-30.

Related

Other agents, from other repositories

mcp-server-architect

Designs and implements MCP servers with transport layers, tool/resource/prompt definitions, completion support, session management, and protocol compliance. Specializes in FastMCP 2.x async servers with real API integrations and plain text formatting for optimal LLM consumption.

utensils/mcp-nixos · 57 tokens

python-expert

Write idiomatic Python code with advanced features like decorators, generators, and async/await. Specializes in FastMCP 2.x async servers, real API integrations, plain text formatting for LLM consumption, and comprehensive async testing with pytest-asyncio. Use PROACTIVELY for Python refactoring, optimization, or…

utensils/mcp-nixos · 73 tokens

code-reviewer

Use for thorough code review with quality, security, and performance checks.

FlorianBruniaux/claude-code-ultimate-guide · 17 tokens

integration-reviewer

Runtime integration validator — read-only. Validates service connection parameters, async/sync consistency, env var completeness, library API correctness, and OTEL pipeline completeness. Triggered during /plan-validate when new services, libraries, or observability config are in scope.

FlorianBruniaux/claude-code-ultimate-guide · 57 tokens

loop-monitor

Autonomous loop monitor — detects stalls, token runaway, and infinite loops in long-running unattended Claude sessions. Use alongside a watchdog process when running autonomous pipelines.

FlorianBruniaux/claude-code-ultimate-guide · 34 tokens

output-evaluator

Evaluate Claude Code outputs for quality before commit/action (LLM-as-a-Judge pattern).

FlorianBruniaux/claude-code-ultimate-guide · 22 tokens