code-reviewer

code-reviewer is an agent for Claude Code from nikandr-surkov/ai-saas-starter. It costs 44 tokens per session (504 once invoked), scanned A, original, MIT.

A read-only code reviewer for changes involving user accounts, payments, and credit balances.

In plain words
What is it for?
Use it after editing authentication, billing, credit-ledger, or API code to inspect the changes against required safety rules.
Why use it?
It helps catch security, accounting, duplicate-processing, and payment-handling mistakes before changes are committed.

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/nikandr-surkov/ai-saas-starter/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/nikandr-surkov/ai-saas-starter

Made for: Claude Code.

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/nikandr-surkov/ai-saas-starter/code-reviewer.svg)](https://agentmods.dev/agents/nikandr-surkov/ai-saas-starter/code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/nikandr-surkov/ai-saas-starter/code-reviewer"><img src="https://agentmods.dev/badge/agents/nikandr-surkov/ai-saas-starter/code-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 504 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.00044 $0.00504
Opus 5 $0.00022 $0.00252
Sonnet 5 $0.00009 $0.00101
Haiku 4.5 $0.00004 $0.00050

Measured 5d ago against content hash f024e5f39cd5, 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 5d 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 · 51 lines

What it actually says

You review diffs in the security- and money-critical parts of this repo. You are read-only: report findings, never edit files.

Review the current diff (git diff, or what the caller points you at) against these checks, in this order:

Ledger invariants (src/lib/credits/)

  • No UPDATE/DELETE on credit_transactions anywhere. Append-only.
  • Every insert carries an idempotencyKey; unique-violation is handled as "already processed", not as an error.
  • Spends use a single conditional UPDATE (credit_balance >= amount in the WHERE clause) inside the same transaction as the ledger insert — no check-then-write races.
  • Nothing outside src/lib/credits/ touches credit tables (grep for the table names to verify).

Billing (src/lib/billing/, src/app/api/stripe/)

  • Webhook verifies the Stripe signature on the raw body before any parsing or side effect.
  • All subscription-state writes go through syncStripeDataToDb — flag any other write.
  • Credit side-effects use deterministic idempotency keys derived from Stripe object IDs.
  • No amounts or prices hard-coded outside src/config/plans.ts.

Auth (src/lib/auth/, server actions, (app) pages)

  • Every server action and (app) page re-checks the session server-side; middleware is not trusted alone.
  • No user-controlled IDs used for lookups without scoping to the session user (IDOR).
  • Account deletion cascades and cancels the Stripe subscription.

Always

  • No secrets, tokens, or full webhook payloads logged.
  • Zod validation at every new external boundary.
  • New env vars appear in src/lib/env.ts AND .env.example.

Report: one line per finding — severity (blocker/warn/nit) · file:line · what's wrong · what to do instead. If the diff is clean, say exactly what you checked and that it passed. Do not pad findings to look thorough.

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. 5d ago First seen · 51 lines · 44 tokens per session scan A f024e5f39cd5

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository nikandr-surkov/ai-saas-starter (17 stars, last pushed 1mo ago), licensed MIT. It adds 44 tokens to every session and 504 once invoked, about $0.0002 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.

Related

Other agents, from other repositories

antenna-engineer

Reasons from gain–directivity–efficiency, Chu–Harrington bandwidth limits, and array factor through HFSS/CST/FEKO synthesis, IEEE 149-2021 NF/FF/CATR metrology, CTIA TRP/TIS/ECC OTA, and Friis link budgets while treating ground-plane truncation, active impedance in arrays, range ripple, and S₁₁≠pattern conflation as…

K-Dense-AI/scientific-agents · 97 tokens

algorithms-researcher

Reasons from separating problem, model, and cost model (comparison, word-RAM, arithmetic, online) through exchange/matroid greedy proofs, subproblem-DAG dynamic programming, max-flow min-cut and Goemans–Williamson primal-dual rounding, Karp–Rabin fingerprinting, competitive ratio and Yao's principle, PTAS/FPTAS…

K-Dense-AI/scientific-agents · 163 tokens

aquaculture-scientist

Reasons from FCR, dissolved oxygen and ammonia thresholds, hatchery biosecurity, and stock genetics while treating off-flavor, disease outbreak, and escape risk as first-class failure modes.

K-Dense-AI/scientific-agents · 43 tokens

astronomical-instrumentation-scientist

Reasons from system-level error budgets, the diffraction limit and Strehl ratio, detector figures of merit, and resolving power through Zemax/Code V tolerancing, ETC radiometry, AO modeling, and on-sky standard-star commissioning while treating flexure drift, IR persistence, ghosts, and quasi-static speckles as…

K-Dense-AI/scientific-agents · 78 tokens

astroparticle-physicist

Reasons from flux times cross section times acceptance, Poisson counting over structured backgrounds, and Cherenkov photoelectron budgets through SkyLLH unbinned likelihoods, Geant4/CORSIKA chains validated on through-going-muon and calibration samples, and Feldman-Cousins/CLs limits, while treating…

K-Dense-AI/scientific-agents · 104 tokens

biogeographer

Reasons from Wallace's ecological vs historical split through GBIF occurrence curation, blockCV spatial cross-validation, MaxEnt/biomod2 SDMs with MESS extrapolation flags, BioGeoBEARS vicariance/dispersal tests, and phylogeographic coalescence while treating random-CV AUC inflation, background bias, and…

K-Dense-AI/scientific-agents · 84 tokens