code-review-audit

code-review-audit is a command for coding agents from axiomantic/spellbook. It costs 25 tokens per session (1,249 once invoked), scanned A, original, MIT.

An intensive code-review audit mode that checks changes for correctness, security, performance, maintainability, and edge cases.

In plain words
What is it for?
Use it to audit a branch, file, directory, security-sensitive area, or the full codebase, with findings tied to file and line locations.
Why use it?
Its strict process is designed to expose deviations and require evidence for each reported problem.

Command

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 commands/axiomantic/spellbook/code-review-audit
Clone the repo
git clone --depth 1 https://github.com/axiomantic/spellbook

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-review-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/axiomantic/spellbook/code-review-audit.svg)](https://agentmods.dev/commands/axiomantic/spellbook/code-review-audit)
Your own site
<a href="https://agentmods.dev/commands/axiomantic/spellbook/code-review-audit"><img src="https://agentmods.dev/badge/commands/axiomantic/spellbook/code-review-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 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,249 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.00025 $0.01249
Opus 5 $0.00013 $0.00624
Sonnet 5 $0.00005 $0.00250
Haiku 4.5 $0.00003 $0.00125

Measured 4d ago against content hash 25ead4a413ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-review-audit 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 4d 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.

commands/code-review-audit.md · 106 lines

How it starts

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

Code Review: Audit Mode (--audit [scope])

Invariant Principles

  1. Zero tolerance — surface any deviation; the noise cost is accepted deliberately.
  2. Build the failure — a check nobody has watched fail is a claim, not a mechanism.
  3. Evidence Over Assertion — every finding needs a file:line reference.
  4. Severity Honesty — Critical=security/data loss; Important=correctness; Minor=style.

Scopes

(none)=branch changes, file.py, dir/, security, all

Passes: Correctness > Security > Performance > Maintainability > Edge Cases

Audit Posture — zero tolerance

An audit is a GATE, not a courtesy pass. This posture governs --audit only; the other modes of code-review are the explicit opt-in to a lighter pass and keep ordinary judgement about what is worth raising.

  • Surface ANY deviation: rule violation, logic bug, design smell, untested behavior, inconsistency — anything off.
  • Be adversarial. Verify each finding to filter false positives, but default to flagging when in doubt.
  • An audit that "found nothing" on a non-trivial diff is a FAILED audit, not a clean one. Treat an empty finding list as evidence about the audit, not about the code.

Build the failure. Do not just check the author's claim. Both actions cost the same dispatch. Building the failure finds more problems.

  • Ask "can I make this fail?" Do not ask "does this pass?" The second question only checks the author's own transcript. The first question does not.
  • A check that has never failed is not proven. If nobody has watched a check's failure path fire, the check is a claim, not a mechanism.
  • For a claimed clean result — a mutation that should change nothing, a guard that should stay silent — prove the change reached the code under test. A no-op edit looks the same as a correct no-effect. Only the exit status cannot tell them apart.
  • Reproduce the defect before you fix it. If you never saw the gap yourself, you are guessing at the gap. A guessed fix cannot be tested.

Read the full file on GitHub · 106 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. 4d ago First seen · 106 lines · 25 tokens per session scan A 25ead4a413ed

Subscribe to this mod's changes

code-review-audit is a command published in the GitHub repository axiomantic/spellbook (10 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 1,249 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.