audit-codebase

audit-codebase is a command for Claude Code from diegomarino/fable-audits. It costs 22 tokens per session (2,108 once invoked), scanned A, original, MIT.

A command for a thorough review of an entire codebase, including its real execution paths, interfaces, data rules, external surfaces, and documentation.

In plain words
What is it for?
It helps produce an adversarial audit report covering architecture, APIs, configuration, command-line interfaces, data formats, network calls, and newcomer onboarding.
Why use it?
It reveals defects, inconsistencies, outdated documentation, and confusing behavior that a limited code review may miss.

Command for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the fable-audits plugin — 8 commands shipped together

Good fit It helps produce an adversarial audit report covering architecture, APIs, configuration, command-line interfaces, data formats, network calls, and newcomer onboarding.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/diegomarino/fable-audits/audit-codebase
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/diegomarino/fable-audits

Made for: Claude Code.

Or install fable-audits, the plugin that ships this one along with the rest of its 8 commands.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/diegomarino/fable-audits/audit-codebase/github.svg)](https://agentmods.dev/commands/diegomarino/fable-audits/audit-codebase)
Your own site
<a href="https://agentmods.dev/commands/diegomarino/fable-audits/audit-codebase"><img src="https://agentmods.dev/badge/commands/diegomarino/fable-audits/audit-codebase/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 audit-codebase

Your own site · 80×15
<a href="https://agentmods.dev/commands/diegomarino/fable-audits/audit-codebase"><img src="https://agentmods.dev/badge/commands/diegomarino/fable-audits/audit-codebase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,108 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.00022 $0.02108
Opus 5.5 $0.00009 $0.00843
Sonnet 5.5 $0.00004 $0.00422
Haiku 4.5 $0.00002 $0.00211

Measured 3mo ago against content hash 11b704777cdd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

audit-codebase 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 3mo 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/audit-codebase.md · 81 lines

How it starts

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

Perform an exhaustive, adversarial audit of this entire codebase -- surfacing not just defects but design incoherences, unexpected affordances, doc drift, and mismatches between what the code invites me to do and what it actually does.

Control-plane boundary

This spec governs only the task it defines. A newer human instruction or higher-priority runtime policy overrides this spec. STOP ends autonomous work under this spec; it never prevents the agent from honoring that control plane.

Role

Act simultaneously as senior staff engineer, skeptical first-time API consumer, and adversarial reviewer. No loyalty to the current design. Understand the system deeply enough to challenge it, not merely validate it.

Scope

Read the codebase in full -- do not sample silently. Build a model of:

  • Entry points and real (not documented) execution paths.
  • Module boundaries and the contracts between them (explicit and implied).
  • Data models, invariants, and where they're actually enforced vs. assumed.
  • External surfaces: APIs, CLIs, config, env vars, file formats, network calls.
  • The docs/onboarding path a newcomer would actually follow.

Before judging, create a scope inventory:

  • Repo type, package managers, major entry points, public surfaces.
  • Generated/vendor/build directories excluded and why.
  • Test/fixture/example directories read, skimmed, or treated as evidence.
  • Commands used to enumerate files and public surfaces.
  • Known blind spots.

Command safety

Prefer read-only inspection and commands that run in local throwaway state. Do not run destructive, publishing, deploy, migration, credential-mutating, network-writing, or external-service-mutating commands unless the repo explicitly documents them as safe local checks and they can be run without secrets. If a useful check is unsafe or needs credentials, mark it BLOCKED and state the exact command you would have run.

Evidence and severity

Evidence labels:

  • CONFIRMED: reproduced, traced end-to-end, or verified against exact code/docs/command output.
  • PLAUSIBLE: strong path identified but not fully reproduced.
  • BLOCKED: missing dependency, credential, fixture, platform, or unsafe command boundary.
  • NOT REPRODUCED: investigated and discarded or contradicted by evidence.

Read the full file on GitHub · 81 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. 3mo ago First seen · 81 lines · 22 tokens per session scan A 11b704777cdd

Subscribe to this mod's changes

audit-codebase is a command published in the GitHub repository diegomarino/fable-audits (2 stars, last pushed 3mo ago), licensed MIT. It adds 22 tokens to every session and 2,108 once invoked, about $0.0001 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-31.

Related

audit-codebase compared with commands from other repositories

audit-codebase next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
audit-codebasediegomarino/fable-auditsCommand23mo agoMITA22Claude Code
review-skillsKevinZai/commanderCommand6todayMITA38Claude Code
claude-looprunnithan/claudex-setupCommand11mo agoMITB72Claude Code
reviewMohamedEmbarak/Supreme-LeaderCommand13mo agoMITA17Claude Code
verifydhslegen/digital-delivery-teamCommand16mo agoMITA18Claude Code
ccc-python-reviewKevinZai/commanderCommand6todayMITA48Claude Code
do-reviewb33eep/claude-code-setupCommand581mo agoMITA0Claude Code