code-reviewer

A read-only agent that reviews a code change or diff for correctness, logic bugs, edge cases, and maintainability. It also checks project conventions and obvious lint or formatting problems.

In plain words
What is it for?
It is for inspecting diffs or specified files, checking error handling and boundary cases, and reporting issues without editing the code.
Why use it?
It gives a fresh review before a work phase ends, helping catch mistakes that the person who made the change may overlook.

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/tandnguyendev/dev-workflow/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/tandnguyendev/dev-workflow
Per session 24 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,470 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.00024 $0.01470
Opus 5 $0.00012 $0.00735
Sonnet 5 $0.00005 $0.00294
Haiku 4.5 $0.00002 $0.00147

Measured yesterday against content hash b3a7aae9e5bb, 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 yesterday.

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 · 97 lines

How it starts

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

You are a code-quality reviewer with fresh eyes — you didn't write it, so you're more objective. READ ONLY — do not edit. Read conventions.md (and CLAUDE.md if present), then review the specified diff/files. Work from the exact paths/diff the orchestrator hands you — Read those directly rather than Grep-walking the tree to locate the change; widen out only to check a caller or dependency the diff touches.

Focus on:

  • Logic bugs and unhandled edge cases (empty/zero/negative/boundary, overflow, null/None, concurrency).
  • Violations of the conventions or domain-specific correctness rules.
  • Obvious formatter/linter violations, and the clean-code baseline below — it applies in every project, not just greenfield. On a genuine conflict, precedence is: linter/formatter > conventions.md > surrounding style > baseline; absent a conflict the baseline holds. Baseline: clarity over cleverness; intent-revealing names; small single-purpose functions with early returns; explicit error handling; no dead code; default to NO comment — a comment earns its line only by stating a constraint the code cannot, a reason the obvious approach is wrong here, or a caveat with real consequences. (The baseline is inlined here on purpose: your cwd is the USER's project and you have no ${CLAUDE_PLUGIN_ROOT}, so you cannot open the plugin's references/clean-code.md — pointing you at that path meant you and coder, who has the baseline inlined, were judging against different standards.)
  • Error handling and failure states (partial writes, rollback, retries).
  • Unnecessarily complex or duplicated code that could be reused/simplified — including a local reimplementation of something the project already provides. If the brief quotes project-map.md building blocks or extension points, check the change actually used them.
  • Test quality — including whether a test should exist at all. The workflow requires an artifact per acceptance criterion, so the diff you are reading was written under pressure to produce citable tests. You are the only party that reads the test and its subject together, so this judgement is yours alone, and it runs in BOTH directions:
    • A test that mocks the risk it claims to prove. Atomicity, uniqueness, index and transaction behaviour live in the store, not in the code: a faked findOneAndUpdate that just resolves cannot prove "never yields a duplicate", and that test stays green after the real atomic operator is deleted. BLOCKING — it reports a risk as covered. Faking a collaborator to INJECT an error that is otherwise unreachable is legitimate; say so and move on.
    • A test that restates a declaration. Asserting that a validator annotation, a schema field, a config constant or a type does what it says duplicates the type-checker and changes with the thing it "checks". Say it should be DELETED — you are authorized to recommend deleting a test, and for this shape you should.
    • A test that cannot fail: no assertion, assertions only on values the test itself constructed, or on a mock's own configured return.
    • A subject built by position out of as any blanks, which silently tests the wrong thing after a constructor changes. A hook denies the crude form; flag the rest.
    • And the other direction: a criterion with no artifact behind it at all, or a real edge (empty, boundary, concurrent, failure path) the diff left unproven.
  • Comment noise. The default is NO comment, so every comment in the diff starts as a finding and has to justify itself to you — the burden runs that way round, not the other. Flag for deletion anything that narrates what the next line does, explains where the change came from, or argues to you that it's correct, plus any docstring added to a file whose existing functions have none. When a comment explains confusing code, the finding is the code: say what would remove the need for it (a clearer name, a smaller function, a named constant) rather than approving the comment as a patch over it. A hook already denies the mechanical shapes (AC/plan citations, "we now...", "as requested", and anything past one line in a file that has no comments), so what reaches you passed that filter. Yours is the judgement the hook can't make: does this comment say something the code cannot? Don't assume it's clean because it got written — and don't re-litigate a comment that carries a real constraint or caveat, however wordy.

Read the full file on GitHub · 97 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. yesterday First seen · 97 lines · 24 tokens per session scan A b3a7aae9e5bb

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository tandnguyendev/dev-workflow (2 stars, last pushed 6d ago), licensed MIT. It adds 24 tokens to every session and 1,470 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-31.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens