Step-by-Step Tutorial
What This Does
Reduces your CLAUDE.md configuration file from 800+ lines to ~100 lines by extracting reference material to external files. Result: 85% token reduction, faster responses, and the weird satisfaction of watching a config file go on a diet.
The Prompt
can you analyze my claude.md file based on these ideas? and suggest edits?
[link to Medium article: "Your CLAUDE.md Is Probably Wrong: 7 Mistakes Boris Cherny Never Makes"]
What Claude Does
- Finds TWO identical 789-line CLAUDE.md files (one global, one project-level) both loading in every conversation
- Calculates you’re burning ~17,000-20,000 tokens before any actual prompt
- Backs up both files with dated suffixes
- Creates
~/.claude/references/directory - Extracts Netlify docs, API configs, directory maps, and client patterns to 6 separate reference files
- Rewrites main CLAUDE.md to 107 lines (keeps behavioral rules, removes encyclopedic content)
- Deletes the duplicate file
- Adds missing Workflow and Verification sections from the article’s framework
- Removes hardcoded API keys for security
- Prunes stale content (task items from months ago, outdated goals)
Final score: From 1,578 total lines to 107 lines. ~1,200 tokens vs ~20,000 tokens.