CLAUDE.md Slim-Down
Find bloat taxing every Claude Code turn
npx promptreports-cli audit claude-mdDeep token-budget analysis of your root CLAUDE.md. Detects duplicated phrases, oversized examples, dead file references, sections duplicating other docs, and filler words. Shows projected savings per session.
CLAUDE.md gets loaded on every turn and every compaction. A 5,000-token CLAUDE.md costs real money across a month of sessions. This subcommand runs five analyzers: duplicate-phrase detection (phrases appearing 3+ times), verbose-example detection (code blocks over 30 lines), dead-reference detection (cited files that don't exist on disk), redundant-section detection (content that duplicates .claude/LESSONS.md, TECH_STACK.md, etc.), and filler-word detection (please, basically, actually — words Claude reads past). Output is sorted by token impact so you fix the biggest wins first.
On this page
Prerequisites
- A CLAUDE.md file at the project root
Flags & Options
| Flag | Description | Default |
|---|---|---|
| --json | Machine-readable findings for dashboards or scripts | — |
Examples
Analyze CLAUDE.md
npx promptreports-cli audit claude-mdFull slim-down report with findings by category.
JSON for CI
npx promptreports-cli audit claude-md --jsonPipe into scripts or fail CI if tokens exceed threshold.
Output
Top box shows current vs. projected token count and total savings. Findings are grouped by kind (duplicates, verbose examples, dead refs, redundant sections, filler) and sorted by token impact.
┌─ CLAUDE.md Slim-Down Analysis ──────────────────┐
│ Current: 4,280 tokens (612 lines, 3,104 words) │
│ Projected: 2,640 tokens after applying 11 fixes │
│ Savings: 1,640 tokens (38%) per session │
└──────────────────────────────────────────────────────┘
═══ Duplicated content — 3 findings, ~420 tokens ═══
HIGH L142 every development decision cascades...
Phrase appears 5× (first at line 142). Keep one. (~240 tokens)
═══ Dead file references — 2 findings, ~30 tokens ═══
HIGH L87 → .claude/plans/archived-auth-v2.md
File doesn't exist. Update or remove the reference.
═══ Sections duplicating other docs — 3 findings, ~890 tokens ═══
MED L234 ## Lessons Learned
Duplicates .claude/LESSONS.md. Replace with reference. (~610 tokens)What it reads and writes
Reads
- CLAUDE.md
- .claude/LESSONS.md
- .claude/TECH_STACK.md
- .claude/DESIGN_SYSTEM.md
- .claude/IMPLEMENTATION_PLAN.md
- .claude/BACKEND_STRUCTURE.md
- filesystem (for dead-ref checks)
Writes
Nothing (read-only)
Free vs Pro usage
Free tier
- Slim CLAUDE.md once and save tokens on every future session
- Catch dead references after deleting or renaming files
- Verify .claude/ docs actually get referenced from the root
Pro tier
Upgrade- CI gate on CLAUDE.md token budget with --json
- Track CLAUDE.md size over time on a team dashboard
- Auto-apply safe slim-down fixes via platform integrations
Pro tips
- Run after any major docs reorganization — that's when dead refs accumulate
- If savings estimate is high, do the refactor: it compounds across every session this week
- Filler-word findings feel pedantic but add up on a 600-line CLAUDE.md