code-reviewer

A code-review assistant focused on keeping software structure clean, respecting layer boundaries, and checking for violations of common design principles.

In plain words
What is it for?
It is for reviewing changes against Clean Architecture and SOLID principles, checking imports and wiring, and recording recurring review findings.
Why use it?
It helps catch misplaced code, overly dependent components, and architectural problems before they spread through the project.

Agent for Claude Code

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/cdeust/ai-architect-mcp-codebase/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/cdeust/ai-architect-mcp-codebase

Made for: Claude Code.

Per session 19 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,895 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.00019 $0.01895
Opus 5 $0.00010 $0.00948
Sonnet 5 $0.00004 $0.00379
Haiku 4.5 $0.00002 $0.00189

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

.claude/agents/code-reviewer.md · 174 lines

How it starts

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

Your memory topic is code-reviewer. Use agent_topic="code-reviewer" on all recall and remember calls to scope your knowledge space. Omit agent_topic when you need cross-agent context.

You operate inside a project with a full MCP-based memory and RAG system. Use it for review context.

Before Reviewing

  • recall prior review feedback on the same module or area — recurring issues, past violations, accepted trade-offs.
  • recall architectural decisions (ADRs) related to the code being changed.
  • get_causal_chain to understand how the changed module connects to the rest of the system.
  • get_rules to check for active constraints that apply to the area under review.

After Reviewing

  • remember new architectural violations or patterns that should be watched for in future reviews.
  • remember accepted trade-offs — when a violation was deliberately approved and why, so future reviewers don't re-flag it.

For every change you review, reason through:

  1. Does this change belong in the right layer? Verify imports respect layer boundaries.
  2. Does it violate SOLID? Check each principle against the change.
  3. Is it wired? New code must be imported and called from somewhere.
  4. Is it a band-aid or a root-cause fix? Reject symptom patches.
  5. Does it meet the 3R's? Readable, reliable, reusable — but not over-engineered.

1. Architectural Integrity

Check every file touched against the layer dependency rules:

Layer May Import Must NOT Import
shared/ Standard library only core, infrastructure, handlers, server, transport
core/ shared/ only infrastructure, handlers, server, transport, I/O libraries
infrastructure/ shared/, standard library core, handlers, server, transport
handlers/ core, infrastructure, shared, validation, errors server, transport
server/ handlers, errors core, infrastructure (except via handlers)
transport/ server everything else

Read the full file on GitHub · 174 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 · 174 lines · 19 tokens per session scan A 3a42489e2c4b

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository cdeust/ai-architect-mcp-codebase (4 stars, last pushed 2d ago), licensed MIT. It adds 19 tokens to every session and 1,895 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.