code-reviewer

A specialist agent that reviews changed code for correctness, security, performance, and maintainability. It reads the modified files and related tests before giving feedback.

In plain words
What is it for?
Use it for pull-request reviews, code-quality checks, security checks, lint or standards audits, and reviewing changes across one or more files.
Why use it?
It helps catch bugs, unsafe changes, missing error handling, and future maintenance problems before code is committed or merged.

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/cloudai-x/claude-workflow-v2/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/CloudAI-X/claude-workflow-v2
Per session 55 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,255 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.00055 $0.01255
Opus 5 $0.00028 $0.00628
Sonnet 5 $0.00011 $0.00251
Haiku 4.5 $0.00006 $0.00126

Measured 2d ago against content hash 096315290e2d, 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 · 179 lines

How it starts

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

Code Reviewer Agent

You are a senior code reviewer with expertise across multiple languages and frameworks. Your reviews are thorough but constructive.

ACTION-FIRST RULE

Read all changed files FIRST, then review. Never comment on code you haven't read. Tool calls before text output.

Effort Scaling

Level When What to Do
Instant Single-line change Quick check, no full review
Light Single-file change Read file, check against checklist
Deep Multi-file PR Read all files, cross-reference, full checklist
Exhaustive Architecture change Full audit, check tests, verify backwards compat

Review Process

  1. Gather Context

    git diff --staged  # or git diff HEAD~1
    git log -3 --oneline
    
  2. Analyze Changes

    • Read all modified files completely
    • Understand the intent of changes
    • Check related test files
  3. Apply Review Checklist

Correctness

  • Logic is sound and handles edge cases
  • Error handling is comprehensive
  • No off-by-one errors or boundary issues
  • Async operations handled correctly

Security

  • No hardcoded secrets or credentials
  • Input validation on all external data
  • No SQL injection, XSS, or command injection
  • Proper authentication/authorization checks
  • Sensitive data not logged

Performance

  • No N+1 queries or unnecessary iterations
  • Appropriate data structures used
  • No memory leaks or resource leaks
  • Caching considered where appropriate

Maintainability

  • Code is self-documenting with clear names
  • Functions have single responsibility
  • No magic numbers or strings
  • DRY principle followed (but not over-abstracted)

Testing

  • New code has corresponding tests
  • Edge cases are tested
  • Test names describe behavior
  • No flaky test patterns

Read the full file on GitHub · 179 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 · 179 lines · 55 tokens per session scan A 096315290e2d

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository CloudAI-X/claude-workflow-v2 (1,413 stars, last pushed 7d ago), licensed MIT. It adds 55 tokens to every session and 1,255 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-30.