audit

A structured review of a software project covering its architecture, health, security, performance, code quality, and improvement priorities. The results are saved as audit documents in the project.

In plain words
What is it for?
Use it to audit an entire codebase or one folder, assess documentation and tests, investigate security or performance concerns, and create a prioritized improvement roadmap. It can also resume from the last completed phase.
Why use it?
It replaces an unstructured code walk-through with a staged review and clear checkpoints. It helps teams see both immediate risks and longer-term work that should be planned.

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/telus-labs/stagecraft/audit
Clone the repo
git clone --depth 1 https://github.com/telus-labs/stagecraft
Per session 78 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,612 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.00078 $0.01612
Opus 5 $0.00039 $0.00806
Sonnet 5 $0.00016 $0.00322
Haiku 4.5 $0.00008 $0.00161

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

Security

Grade A, and why

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 3d 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.

hosts/claude-code/install/commands/audit.md · 165 lines

How it starts

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

/audit

You are running a full codebase audit on this project.

Read .claude/skills/audit/SKILL.md before doing anything else. That file defines what each phase does, what each phase produces, and what inputs to gather before starting.

Input

The text after /audit is an optional scope constraint.

  • /audit — audit the entire codebase.
  • /audit src/backend/ — focus the audit on one subtree.
  • /audit --resume — read docs/audit/status.json and continue from the last completed phase.

Startup

Before any phase work:

  1. Read .claude/skills/audit/SKILL.md (the phase definitions — the brain of this command).
  2. Read CLAUDE.md if it exists (project-specific instructions).
  3. Read AGENTS.md if it exists.
  4. Create docs/audit/ if it doesn't exist.
  5. Check for docs/audit-extensions.md — note whether it exists; if it does, you'll read it at the start of each phase and append findings under a ## Project-Specific heading in the phase's output file.
  6. Run skill step 0.0 — archive any prior completed audit. If docs/audit/status.json exists with current_phase: "phase-3", move the prior audit's files into docs/audit-archive/<date>-<version>-<context>/ and append a row to docs/audit-archive/HISTORY.md. Skip on --resume. Full procedure in skills/audit/SKILL.md § Phase 0 step 0.0.
  7. Check for docs/audit/status.json — if resuming, load state. Otherwise write a fresh status file:
{
  "started": "<ISO 8601 timestamp>",
  "scope": "full" | "scoped to <subtree>",
  "phases": {
    "phase-0": "pending",
    "phase-1": "pending",
    "phase-2": "pending",
    "phase-3": "pending"
  },
  "current_phase": "phase-0",
  "audited_by": "claude-code"
}

Execution

Run each phase as defined in .claude/skills/audit/SKILL.md. Read each phase's template (.claude/skills/audit/../templates/audit/<NN>-*.md — or copy the structure if your tools don't reach that path) before writing the output file.

Phase 0 — Bootstrap

Run steps 0.0 (archive prior audit), 0.1, 0.2, 0.3 from the skill. Write each output file. If docs/audit-extensions.md declares Phase 0 extensions, run them and append results under ## Project-Specific in each phase-0 file. Update status.json: "phase-0": "complete".

Read the full file on GitHub · 165 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. 3d ago First seen · 165 lines · 78 tokens per session scan A 85bcd4af9e2f

Subscribe to this mod's changes

audit is a command published in the GitHub repository telus-labs/stagecraft (6 stars, last pushed 6d ago), licensed MIT. It adds 78 tokens to every session and 1,612 once invoked, about $0.0004 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.