claudemd-auditor
Skill1 starsChanged 9 months agoMITView on GitHub
Audit CLAUDE.md files for redundancy, verbosity, and content better stored in memory. Triggers on "audit claudemd", "review claude.md", "slim down claude.md", "optimize claude.md", "claudemd audit".
In this repository9 other files it gives its agents.
- bug-bash-updateSkill
- ci-cd-pipelineSkill
- docs-consolidatorSkill
- ralphSkill
- refactor-auditSkill
- reflectSkill
- setup-workflowSkill
- skill-reviewerSkill
- smoke-testSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Read every CLAUDE.md that applies to this project:
- Distinctive: line 83
Ask the user which changes to apply.
- Distinctive: line 88
Remove approved redundant content
- Distinctive: line 90
Verify no cross-references broke by grepping for any paths or section names that were moved or removed
- Distinctive: line 97
Conservative memory moves: Only suggest moving content that is truly stable and personal/environment-specific.
- Very specific: line 100
Respect the doc hierarchy: If content belongs in a docs/ file rather than CLAUDE.md, suggest moving it there (not to memory).
- Distinctive: line 101
No false positives: If a file is already lean, say so.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md Auditor
Analyze all CLAUDE.md files for a project, identify savings from redundancy, verbosity, and memory-movable content, and offer to apply fixes.
Workflow
Phase 1: Collect all CLAUDE.md files
Read every CLAUDE.md that applies to this project:
- Project root
CLAUDE.md - Any
packages/*/CLAUDE.md(monorepo sub-packages) - User-level memory:
~/.claude/CLAUDE.md(if exists) - Project memory:
~/.claude/projects/<project-path>/CLAUDE.md(if exists)
For each file, record:
- Full path
- Line count
- Estimated token count (lines * 1.7 as rough heuristic)
Phase 2: Analyze for issues
Scan each file for three categories of issues:
2a. Redundancy
- Instructions that say the same thing in different words within one file
- Rules restated across multiple CLAUDE.md files
- Content that duplicates information from docs referenced by CLAUDE.md (e.g., architecture details that already live in a dedicated architecture doc)
- Sections that restate framework/tool defaults (things Claude already knows)
2b. Verbosity
- Wordy phrasing that can be compressed without losing meaning
- Apply the "would a senior engineer need this spelled out?" test
- Overlong examples where a one-liner would suffice
- Unnecessary caveats, hedging, or repetitive formatting
- Multi-sentence rules that could be a single sentence
2c. Memory candidates
Content that is stable, rarely changes, and doesn't need to be checked into the repo:
- Personal preferences (editor settings, preferred style choices)
- Environment-specific paths or URLs
- API keys, contract addresses, deploy targets for specific environments
- Tool configurations that are user-specific
- Local port assignments or machine-specific setup
These belong in project memory (~/.claude/projects/<path>/CLAUDE.md) which is gitignored and persists across sessions.
Phase 3: Present findings
Output a structured report grouped by file and category:
## CLAUDE.md Audit Report
### File: CLAUDE.md (247 lines, ~420 tokens)
#### Redundancy
- [ ] Lines X-Y: [description] — duplicates [other location]
#### Verbosity
- [ ] Lines X-Y: [current text snippet] → [compressed version]
#### Memory Candidates
- [ ] Lines X-Y: [content] — stable/personal, move to project memory
### File: packages/frontend/CLAUDE.md (50 lines, ~85 tokens)
...
### Summary
- Current: X total lines / ~Y tokens across N files
- After fixes: ~X lines / ~Y tokens (Z% reduction)Ask the user which changes to apply. They can approve all, select specific items, or skip categories entirely.
Phase 4: Apply approved changes
- Edit CLAUDE.md files to compress approved verbose sections (in-place rewrites)
- Remove approved redundant content
- Move approved memory candidates to
~/.claude/projects/<path>/CLAUDE.md(create the file if needed, append to existing content) - Verify no cross-references broke by grepping for any paths or section names that were moved or removed
- Present a brief summary of what changed
Guidelines
- Be specific. Quote line numbers and actual text, not vague observations.
- Preserve intent. Compress prose, don't change behavior or remove rules.
- Conservative memory moves. Only suggest moving content that is truly stable and personal/environment-specific. Repo-essential content (build commands, quality standards, workflow steps) stays in the repo.
- Show before/after for every verbosity fix so the user can judge.
- Don't touch intentionally detailed sections. "Mistakes to Avoid" stories, debugging war stories, and similar sections are detailed on purpose — flag them as candidates only if they are genuinely redundant.
- Respect the doc hierarchy. If content belongs in a
docs/file rather than CLAUDE.md, suggest moving it there (not to memory). Memory is only for non-repo content. - No false positives. If a file is already lean, say so. Don't manufacture issues to justify the audit.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

