audit-claude-md

audit-claude-md is a command for Claude Code from marcusgoll/Spec-Flow. It costs 27 tokens per session (515 once invoked), scanned A, original, MIT.

A command that checks and improves CLAUDE.md instruction files, which tell Claude Code how to work in a project or folder.

In plain words
What is it for?
Use it to audit project-wide or selected CLAUDE.md files, grade their quality, identify missing sections, and split folder-specific guidance into separate files.
Why use it?
It finds bloated, vague, incomplete, or poorly organized instructions and suggests how to make them clearer and easier to apply.

Command for Claude Code

Written for Claude Code: arguments in frontmatter. Also seen: mentions CLAUDE.md.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash .spec-flow/scripts/bash/audit-claude-md.sh --verbose $path.

Good fit Use it to audit project-wide or selected CLAUDE.md files, grade their quality…

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/marcusgoll/Spec-Flow
agentmods
npx agentmods add commands/marcusgoll/spec-flow/audit-claude-md

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 audit-claude-md

README.md
[![agentmods](https://agentmods.dev/badge/commands/marcusgoll/spec-flow/audit-claude-md.svg)](https://agentmods.dev/commands/marcusgoll/spec-flow/audit-claude-md)
Your own site
<a href="https://agentmods.dev/commands/marcusgoll/spec-flow/audit-claude-md"><img src="https://agentmods.dev/badge/commands/marcusgoll/spec-flow/audit-claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 515 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.00027 $0.00515
Opus 5 $0.00014 $0.00258
Sonnet 5 $0.00005 $0.00103
Haiku 4.5 $0.00003 $0.00052

Measured 7d ago against content hash 037cbcd1647b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

audit-claude-md 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 7d 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/commands/meta/audit-claude-md.md · 87 lines

What it actually says

/audit-claude-md Command

Audit CLAUDE.md files for quality issues including bloat, vague language, missing sections, and poor progressive disclosure.

Input

  • path (optional): Path to specific CLAUDE.md file or directory to audit
    • If omitted, audits all CLAUDE.md files in repository

Process

Step 1: Invoke Skill

Load the audit-claude-md skill for comprehensive guidance:

skill: audit-claude-md

Step 2: Run Audit Script

Execute the deterministic audit script:

bash .spec-flow/scripts/bash/audit-claude-md.sh --verbose $path

Step 3: Analyze Results

For each CLAUDE.md file, report:

  • Grade (A/B/C/F based on score)
  • Line count vs. threshold
  • Vague language instances
  • Strong modal usage
  • Missing required sections

Step 4: Generate Recommendations

For files with grade B or lower, provide specific recommendations:

  1. If line count exceeds threshold:

    • Identify sections to extract to docs/references/
    • Suggest progressive disclosure refactoring
  2. If vague language detected:

    • List each instance with file:line reference
    • Suggest replacement with strong modals
  3. If missing WHAT/WHY/HOW sections:

    • Provide template to add

Step 5: Offer Actions

Present options to the user:

  • Auto-fix: Apply safe automated fixes (vague language replacement)
  • Refactor plan: Generate detailed refactoring plan for manual review
  • Create folder CLAUDE.md: Split domain-specific content into folder-level files

Output

Summary report with:

  • Files analyzed
  • Average quality score
  • Overall grade
  • Action items prioritized by impact

Example Usage

# Audit all CLAUDE.md files
/audit-claude-md

# Audit specific file
/audit-claude-md ./CLAUDE.md

# Audit feature directory
/audit-claude-md specs/001-auth/
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. 7d ago First seen · 87 lines · 27 tokens per session scan A 037cbcd1647b

Subscribe to this mod's changes

audit-claude-md is a command published in the GitHub repository marcusgoll/Spec-Flow (92 stars, last pushed 4mo ago), licensed MIT. It adds 27 tokens to every session and 515 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-30.