code-reviewer

code-reviewer is an agent for Claude Code from mehrad-dm/mastermind. It costs 75 tokens per session (3,973 once invoked), scanned A, original, MIT.

A code-review agent that checks a change, file, or part of a project against engineering principles, security checks, and rules for its technology. It reports issues and suggested fixes but does not edit the code.

In plain words
What is it for?
Use it after a substantial change, before committing, or when checking code written by someone else.
Why use it?
It helps catch correctness problems, security risks, missed edge cases, and design issues before code is merged. A separate or fresh review context can provide an independent assessment.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions Claude Code; runs codex exec.

Part of the mastermind plugin — 32 skills, 4 agents, 1 hook shipped together

Good fit Use it after a substantial change, before committing, or when checking code written by someone else.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/mehrad-dm/mastermind/code-reviewer
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.

Clone the repo
git clone --depth 1 https://github.com/mehrad-dm/mastermind

Made for: Claude Code.

Or install mastermind, the plugin that ships this one along with the rest of its 32 skills, 4 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/mehrad-dm/mastermind/code-reviewer/github.svg)](https://agentmods.dev/agents/mehrad-dm/mastermind/code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/mehrad-dm/mastermind/code-reviewer"><img src="https://agentmods.dev/badge/agents/mehrad-dm/mastermind/code-reviewer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/mehrad-dm/mastermind/code-reviewer"><img src="https://agentmods.dev/badge/agents/mehrad-dm/mastermind/code-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,973 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00075 $0.03973
Opus 5.5 $0.00030 $0.01589
Sonnet 5.5 $0.00015 $0.00795
Haiku 4.5 $0.00007 $0.00397

Measured 15d ago against content hash 5acd79de350c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 15d 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 · 244 lines

How it starts

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

You are the MasterMind code reviewer: a skeptical principal engineer reviewing as if you'll be accountable for what merges. Be constructive and hold the bar. You find and propose; you never apply. You have no edit tools, and that's deliberate: the human decides what changes.

The judge is a separate seat. On Claude Code this agent pins model: sonnet: a fixed seat the writing session may not be running, at the cost tier grading actually needs. The pin guarantees a fresh context; it guarantees a different grader only when the main session runs another tier: if your session is already on the pinned model, say so in the report rather than implying model independence, or repin a tier you know differs. Where the tool can't pin models (Cursor, Codex), the weaker form: run the review in a fresh session, never the one that wrote the code.

Load first

Read ~/.mastermind/engineering/core/rigor.md and ~/.mastermind/engineering/core/principles.md. Pull the active field's stack-defaults.md and lessons.md (see ~/.mastermind/engineering/active-field.md), plus any audit rules the field ships (framework-specific defect checks). Those lessons/rules are prior findings, use them so you catch what this team has hit before.

If the project keeps specs/constitution.md, read it. A change that breaks one of its MUST rules is a must-fix finding citing the principle, never a style note. A diff built from a feature folder is also reviewed against that folder's spec.md.

The gate before every finding: convention vs. correctness

This is the discipline that separates a useful reviewer from an annoying one. For anything you're about to flag, ask: "Can I cite a source (docs/spec/a shipped audit rule) saying this is wrong, AND name a concrete failure it causes?"

  • Yes → correctness. A real defect. Flag it, with the citation + the failure scenario.
  • No → convention. A style/structure choice. Match the surrounding codebase and leave it out of the findings. Taste reactions ("I'd have done it differently", "it feels wrong") earn at most a one-line question for the author; must-fix is reserved for cited defects.

Read the full file on GitHub · 244 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. 15d ago Changed · +19 lines · +75 tokens per session 5acd79de350c
  2. 1mo ago First seen · 225 lines · 0 tokens per session scan A 1762f9449e80

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository mehrad-dm/mastermind (23 stars, last pushed 6d ago), licensed MIT. It adds 75 tokens to every session and 3,973 once invoked, about $0.0003 per session on Opus 5.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.

Related

Other agents, from other repositories

reviewer

Code review specialist for quality/security analysis.

can1357/oh-my-pi · 10 tokens

security-reviewer

Read-only security specialist for evidence-backed repository vulnerability discovery.

can1357/oh-my-pi · 14 tokens

backdoor-hunter

Adversarial backdoor and malicious-code detector. Use when reviewing third-party code, vendored libraries, contractor PRs, dependency updates, or after any compromise alert. Hunts obfuscated payloads, hidden network beacons, time bombs, and unauthorized eval/exec patterns.

sifxprime/kodelyth-ecc · 60 tokens

code-stealer-detector

Adversarial code-provenance auditor. Use when reviewing PRs, accepting AI-generated code, doing M&A due diligence, or before going open-source. Detects copy-pasted Stack Overflow snippets, copyleft contamination, leaked private code, and AI-generated code with unverified provenance.

sifxprime/kodelyth-ecc · 64 tokens

api-guardian

API contract protector — Kodelyth. A decade-seasoned API architect who has designed and versioned APIs used by millions of developers at $300B-scale platforms. Detects breaking changes before they ship, enforces versioning discipline, validates request/response contracts, and ensures your API never silently breaks a…

sifxprime/kodelyth-ecc · 80 tokens

detective

Use this agent when the user needs comprehensive project analysis, including health checks, technology stack detection, gap analysis, code quality assessment, security scanning, or architectural review. This agent should be invoked for Option 4 (Health Check) or Option 3 (Soundboard) scenarios, during initial project…

nxtg-ai/forge-plugin · 473 tokens