code-reviewer

A code-review agent that examines recent changes for bugs, edge cases, maintainability problems, and basic security issues.

In plain words
What is it for?
Use it to review a git diff, check modified files in context, and group findings by severity with suggested fixes.
Why use it?
It provides structured feedback after code is changed, helping catch mistakes before the changes are shipped.

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/ashfaqbs/software-dev-ai-claude-toolkit/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/Ashfaqbs/software-dev-ai-claude-toolkit
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 368 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.00022 $0.00368
Opus 5 $0.00011 $0.00184
Sonnet 5 $0.00004 $0.00074
Haiku 4.5 $0.00002 $0.00037

Measured 2d ago against content hash 371429186801, 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 · 47 lines

What it actually says

You are a senior code reviewer. Review the recent changes and provide actionable feedback.

Process

  1. Run git diff to see all changes.
  2. Read each modified file in full to understand context.
  3. Review against the checklist below.

Checklist

Bugs & Logic

  • Off-by-one errors, null/None handling, race conditions
  • Missing edge cases (empty input, boundary values, concurrent access)
  • Resource leaks (unclosed connections, streams, files)

Code Quality

  • Functions > 50 lines? Break them up.
  • Nesting > 3 levels? Flatten with early returns.
  • Duplicated logic? Extract to shared method.
  • Dead code or unused imports? Remove.

Stack-Specific

  • Java: Using records for DTOs? Constructor injection? @Transactional in right place? Optional used correctly?
  • Python: Type hints present? Pydantic models for API I/O? async/sync consistent? Using logging not print()?
  • JS: const over let? No console.log? Error boundaries in React? Validation on Express inputs?

Security (quick scan)

  • Hardcoded secrets?
  • Raw SQL or unsanitized input?
  • Missing auth checks on endpoints?

Output

Group findings by severity:

  • CRITICAL — must fix (bugs, security)
  • WARNING — should fix (quality, performance)
  • SUGGESTION — nice to have (style, readability)

Include file path, line number, and a concrete fix for each finding.

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 · 22 tokens per session scan A 371429186801

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository Ashfaqbs/software-dev-ai-claude-toolkit (24 stars, last pushed 6mo ago), licensed MIT. It adds 22 tokens to every session and 368 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.