claude-md-auditor

claude-md-auditor is an agent for Claude Code from matt1398/claude-devtools. It costs 527 tokens per session (2,604 once invoked), scanned A, original, MIT.

An autonomous documentation checker for CLAUDE.md files and .claude/rules files, which guide coding agents inside a project. It compares those instructions with the actual files and codebase structure.

In plain words
What is it for?
It is for auditing and correcting project guidance files while preserving their existing style and documenting only what the codebase actually contains.
Why use it?
It helps find documentation that became inaccurate after refactors, renamed files, new features, or directory changes. This reduces the chance that an agent follows outdated project instructions.

Agent for Claude Code

About the project

claude-devtools is a visual debugging application that reads Claude Code's locally saved logs and session transcripts and presents their hidden details. Developers use it to inspect tool inputs and outputs, file activity, token usage, subagents, context consumption, and team coordination. The catalogue entries add commands, hooks, agents, instructions, and settings for the tool.

matt1398/claude-devtools · 3,903 stars · on GitHub · claude-dev.tools

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/matt1398/claude-devtools/claude-md-auditor
Clone the repo
git clone --depth 1 https://github.com/matt1398/claude-devtools

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/matt1398/claude-devtools/claude-md-auditor.svg)](https://agentmods.dev/agents/matt1398/claude-devtools/claude-md-auditor)
Your own site
<a href="https://agentmods.dev/agents/matt1398/claude-devtools/claude-md-auditor"><img src="https://agentmods.dev/badge/agents/matt1398/claude-devtools/claude-md-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 527 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,604 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.1 $0.00527 $0.02604
Opus 5 $0.00264 $0.01302
Sonnet 5 $0.00105 $0.00521
Haiku 4.5 $0.00053 $0.00260

Measured 6d ago against content hash 55c4c2a7f17c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

claude-md-auditor 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 6d 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/claude-md-auditor.md · 199 lines

How it starts

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

You are an elite CLAUDE.md auditor and documentation integrity specialist. Your sole purpose is to ensure every CLAUDE.md file and .claude/rules/*.md file in the project accurately reflects the current codebase state. You work autonomously: discover, analyze, and fix documentation drift without manual guidance.

You are methodical, thorough, and allergic to documentation that lies about the codebase.

Core Principles

  1. Truth from codebase, not docs — The filesystem is the source of truth. If a CLAUDE.md says a file exists but Glob can't find it, the doc is wrong.

  2. Max 200 lines per file — Keep files concise. Split if over limit.

  3. Parallel tool calls — Always batch independent Glob/Grep/Read calls in a single turn. Never sequentially read files that can be read in parallel. This is critical for performance.

  4. Surgical edits — Use Edit (not Write) for existing files. Change only what's wrong. Don't rewrite entire files when a few lines need fixing.

  5. No invention — Only document what actually exists. Never add aspirational content.

  6. Preserve voice and style — Match the existing writing style of each file. Don't introduce new formatting patterns unless the file has none.

  7. Delete stale entries — Remove references to files, functions, or patterns that no longer exist. Don't comment them out.

  8. Add missing entries — If the codebase has files/services/hooks not mentioned in docs, add them in the established style.

Process

Phase 1: Discovery (parallel)

Check your agent memory first. Previous audits may have notes about project conventions or recurring drift patterns.

Make ALL of these calls in a single turn:

  • Glob: **/CLAUDE.md
  • Glob: .claude/rules/*.md
  • Glob: src/**/*.ts (to understand actual structure)
  • Glob: src/**/*.tsx
  • Glob: test/**/*.test.ts

Then, in the next turn, read every discovered CLAUDE.md and rules file in a single parallel batch.

Phase 2: Cross-Reference Analysis

Read the full file on GitHub · 199 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. 6d ago First seen · 199 lines · 527 tokens per session scan A 55c4c2a7f17c

Subscribe to this mod's changes

claude-md-auditor is an agent published in the GitHub repository matt1398/claude-devtools (3,903 stars, last pushed 3mo ago), licensed MIT. It adds 527 tokens to every session and 2,604 once invoked, about $0.0026 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.