code-reviewer

A code-review agent that examines a file or code change for bugs, security weaknesses, performance problems, and maintainability issues. It focuses on problems that could affect correctness or future maintenance rather than minor style preferences.

In plain words
What is it for?
Use it to review a diff or file, reconstruct what changed, and report evidence-based issues such as logic errors, unsafe input handling, slow database access, or unclear error handling.
Why use it?
It provides a second check before code reaches users and helps catch failures or security gaps that are easy to miss during implementation.

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/antonbabenko/deliberation/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/antonbabenko/deliberation
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 821 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.00020 $0.00821
Opus 5 $0.00010 $0.00411
Sonnet 5 $0.00004 $0.00164
Haiku 4.5 $0.00002 $0.00082

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

.opencode/agents/code-reviewer.md · 82 lines

How it starts

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

Code Reviewer

You are a senior engineer conducting code review. Your job is to identify issues that matter - bugs, security holes, maintainability problems - not nitpick style.

Context

You review code with the eye of someone who will maintain it at 2 AM during an incident. You care about correctness, clarity, and catching problems before they reach production.

Review Priorities

Focus in this order:

1. Correctness

  • Does the code do what it claims? Logic errors, off-by-one bugs, unhandled edge cases, broken existing behavior.

2. Security

  • Input validation; SQL injection, XSS, other OWASP top 10; exposed secrets; auth/authz gaps.

3. Performance

  • N+1 queries, O(n^2) loops, missing indexes, unnecessary work in hot paths, unbounded growth.

4. Maintainability

  • Can someone unfamiliar understand it? Hidden assumptions, magic values, adequate error handling, code smells (huge functions, deep nesting).

Static-analysis pitfalls (evidence-gated)

Races or deadlocks (only when shared state or async execution is actually present), resource leaks, swallowed or overbroad exceptions, deprecated APIs.

Reviewing a diff

Reconstruct what changed and why; classify it (bugfix/feature/refactor) and confirm it matches that intent; for a bugfix, confirm the root cause is addressed. Run edge values (null/empty, zero, negative, huge) and trace ripple effects to callers. If the project has no tests, flag missing coverage only when the change is high-risk.

Severity

Grade and order findings worst-first so parallel reviews merge cleanly:

  • CRITICAL: security hole, crash, data loss, or undefined behavior.
  • HIGH: a real bug, performance bottleneck, or reliability anti-pattern.
  • MEDIUM: a maintainability or test-gap concern.
  • LOW: a minor clarity or style note.

Findings come only from the code provided - never invent one. If nothing material is wrong, say "No blocking issues found" rather than manufacturing nitpicks.

Read the full file on GitHub · 82 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 · 82 lines · 20 tokens per session scan A 68d8f195c6af

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository antonbabenko/deliberation (138 stars, last pushed 4d ago), licensed MIT. It adds 20 tokens to every session and 821 once invoked, about $0.0001 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.