My CLAUDE.md is about 200 lines. It used to be 600.
The problem with long CLAUDE.md files is that they read like documentation. I wrote a lot about how the project works, why things are set up the way they are, context for decisions made months ago. None of it changed my behavior. By the time you're past the first 4k tokens, the early instructions carry less weight than the ones closer to the top.
What actually changes behavior: short, specific rules. Things you would skip or forget without them written down.
Behavioral defaults. Three or four rules that apply to every single task. Mine:
Each of those maps to something I was actually getting wrong before I wrote it down. If a rule doesn't match a real pattern in your work, don't include it. Generic instructions don't change specific behavior.
Routing decisions. Which directory holds which project. Which tool handles which task. How to recover when something breaks. The model needs to know where things live before it can use them correctly. This is probably the most important part of any CLAUDE.md and the part most people skip.
Tool configurations. Specific flags, specific paths, specific commands. Not descriptions of what things do. Actual commands to run.
Project history. The model doesn't need to know why you made architectural decisions in the past. It needs to know what to do now.
"Be thorough and careful." This is already the default behavior. Writing it doesn't make it more true. Same goes for "think step by step," "consider edge cases," and anything else that reads like general advice rather than a specific rule.
Long explanations. If a single concept takes more than 20 lines to explain in a CLAUDE.md, you probably haven't figured out the actual rule yet. The explanation is a draft. Find the one-sentence version.
For every section in your CLAUDE.md: what behavior does this change? If you can't answer that, remove it.
The right CLAUDE.md is probably 50-200 lines depending on the project. If yours is 800, you wrote documentation. Documentation belongs in a README. Rules belong in CLAUDE.md.
## Example rule (useful) # Always push after committing ALWAYS: git push to remote on every commit. ## Example non-rule (remove this) # Background context This project uses a microservices architecture because in 2024 we decided to split the monolith for scalability reasons...
Put the most important rules at the top. Context windows are finite and the model's attention isn't evenly distributed across a 600-line file. If a rule matters, it should be in the first 100 lines.
The Claude Code Survival Kit has five CLAUDE.md templates for real project types (Next.js, Python CLI, Node API, Monorepo, MCP Server), ten anti-patterns with before/after examples, and fifteen troubleshooting answers. $19 at builtbyzac.com/survival-kit.