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

  1. Finds TWO identical 789-line CLAUDE.md files (one global, one project-level) both loading in every conversation
  2. Calculates you’re burning ~17,000-20,000 tokens before any actual prompt
  3. Backs up both files with dated suffixes
  4. Creates ~/.claude/references/ directory
  5. Extracts Netlify docs, API configs, directory maps, and client patterns to 6 separate reference files
  6. Rewrites main CLAUDE.md to 107 lines (keeps behavioral rules, removes encyclopedic content)
  7. Deletes the duplicate file
  8. Adds missing Workflow and Verification sections from the article’s framework
  9. Removes hardcoded API keys for security
  10. 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.