Stop writing 5000-word CLAUDE.md files | Claude Code Toolkit
Anti-patterns

Stop writing 5000-word CLAUDE.md files

Every session pays the token tax. Every engineer scrolls past most of it. Every update is a merge conflict waiting to happen. Here's why big CLAUDE.md files are worse than useless and what to do with the content instead.

FA
Fatima A. September 8, 2026 · 9 min read

Six months ago, our CLAUDE.md was 4,800 words. Today it's 380. Claude Code sessions got faster, less confused, and more consistent. Nothing else changed. If your CLAUDE.md is over 1000 words, you're paying a tax you don't need to pay, and the return on those words is almost certainly negative. Here's why.

CLAUDE.md started life as a good idea: give Claude Code some context about your project so it doesn't have to figure everything out from scratch. Somewhere along the way, teams turned it into a dumping ground. Style guides, architecture overviews, deployment runbooks, onboarding notes, historical context — anything that "Claude should know" ends up in CLAUDE.md.

It doesn't work. Actually — worse than that. Big CLAUDE.md files actively degrade session quality in specific ways that took us a while to notice.

What goes wrong when CLAUDE.md is huge

Four failure modes, in roughly the order we noticed them:

Failure 1: The token tax on every session

CLAUDE.md loads into every Claude Code session in the project. Every session. Whether you're writing a one-line fix or building a new service, the full CLAUDE.md is in your context window from the start.

A 5000-word CLAUDE.md is roughly 7000-8000 tokens. If you're running Opus at production rates and doing 100 sessions a month across your team, that's a substantial cost that produces no work — just overhead. Nothing gets built with those tokens; they're paid up front on every session before any actual task begins.

The cost isn't hypothetical. When we measured, our old 4800-word CLAUDE.md was adding about $12 per engineer per month in pure overhead. That's not the biggest number in our AI bill, but it's the least useful one — pure friction cost.

Failure 2: Attention dilution

The bigger problem than cost is quality. LLMs handle long context, but attention isn't uniform across the context window. Content in a 5000-word CLAUDE.md competes with the actual task for attention. Important guidance gets buried; some of it effectively doesn't apply.

We noticed this concretely: certain style rules were in CLAUDE.md but consistently violated in generated code. We'd re-emphasize the rule in the task prompt and get compliance. The rule was in the CLAUDE.md the whole time; it just wasn't landing at generation time. There was too much stuff for any specific rule to be salient.

When we pruned to a much shorter CLAUDE.md focused on the highest-leverage guidance, compliance with the remaining rules went up. Less content, more effect. This is the counterintuitive one — you'd think more guidance would produce more compliance. In practice, the opposite.

Failure 3: Merge conflicts and drift

A 5000-word CLAUDE.md gets edited constantly. Every team member has opinions. Every new pattern seems worth adding. Every learned lesson gets appended. The file becomes a merge conflict factory — three PRs touching CLAUDE.md at once, each with legitimate additions, none of which conflict with each other technically but which together produce an unreadable file.

Worse: the file drifts. Old guidance stays in even after the pattern changes. Rules that were relevant six months ago aren't anymore but nobody removes them. New engineers reading CLAUDE.md to understand the team learn things that aren't true anymore. The file's trust erodes; people stop taking any of it seriously.

Failure 4: The wrong content wins

When CLAUDE.md is a dumping ground, easy-to-write content dominates. General coding advice ("write clean code, use meaningful names"), platitudes ("we value quality"), and things Claude already knows fill the file. The genuinely valuable team-specific guidance — the stuff Claude WOULD get wrong without instruction — gets crowded out.

Test: read a random paragraph of your CLAUDE.md. If a generic AI-coding-best-practices article could have written it, it doesn't belong in your CLAUDE.md. That paragraph is teaching Claude nothing it doesn't already know, while taxing every session with its tokens.

What CLAUDE.md is actually for

CLAUDE.md is for the small number of things that meet all three criteria:

  1. Claude would get this wrong without instruction. Not default behavior; specifically-your-team's behavior.
  2. The guidance applies broadly across sessions. Not just one specific workflow; a pattern that affects most work in this codebase.
  3. It's stable. Not something that changes every sprint; guidance that's expected to hold for months at least.

Content meeting all three deserves the ambient always-loaded status of CLAUDE.md. Content meeting two of three probably belongs somewhere else. Content meeting one of three definitely doesn't belong in CLAUDE.md.

The 500-word rule

Our current heuristic: CLAUDE.md tops out at 500 words. Anything more and we look at what can be pulled out.

500 is not magic. But it's a threshold that forces discipline: at 500 words, you can only have 3-4 high-priority pieces of guidance, and each has to earn its place. Above 500, drift starts. Above 1000, most content is not earning its cost. Above 2000, you're in "actively harmful" territory.

What our 380-word CLAUDE.md contains:

  • 50 words on the project shape — what this codebase is, what it isn't. Prevents Claude from making wrong assumptions about scope.
  • 80 words on our specific test/build/deploy conventions — the specific commands Claude should use, what our test runner is called. Small but high-leverage.
  • 90 words on things Claude tends to get wrong — 3-4 specific patterns that Claude reliably violates without explicit instruction.
  • 60 words pointing to skills and subagents — where to find the more specific guidance that doesn't belong here.
  • 100 words on things Claude should NOT do — deployment restrictions, files that need extra care, patterns we've tried and rejected.

That's it. 380 words. Every one earns its place; each is something Claude would meaningfully do differently without the instruction; each applies broadly enough to matter across most sessions.

The five-word rule

A finer heuristic: for every 500 words in CLAUDE.md, pick FIVE words that summarize what you want Claude to internalize from that content. If you can't pick five words, the content isn't landing anyway. If the five words are generic ("write clean code"), the content isn't teaching anything specific. If you can pick five words that are specific and useful, the content might be earning its place.

Where the content should go instead

The content you're pulling out of CLAUDE.md doesn't vanish. It goes somewhere better suited to it.

Style guidance → skills

"Here's how we write Python / TypeScript / SQL." "Here's our commit message format." "Here's our test naming convention." All of this is skill-shaped: it applies ambient (whenever the topic comes up) but doesn't need to load in every session. A JavaScript style skill loads for JS-touching work; it doesn't tax your Python-only sessions.

This is often where the biggest CLAUDE.md savings come from. Style guides tend to sprawl — a 2000-word style section becomes 6-8 focused skills, each loading only when relevant. Total token cost across the project drops substantially.

Workflows and specific tasks → slash commands

"Here's how we deploy." "Here's how we generate release notes." "Here's how we investigate an incident." These are workflows the user invokes deliberately; they don't need to load into every session's ambient context. Slash commands make them invocable when needed, invisible when not.

Reasoning-heavy specialized tasks → subagents

"Here's how we do code reviews." "Here's how our security scanner works." Complex tasks with judgment and specific tool needs are subagent-shaped. Their guidance belongs in the subagent definition, not in CLAUDE.md.

See the decision tree post for how to pick between skills/subagents/commands.

Architecture and background → docs

"Here's how our services are architected." "Here's the reasoning behind our data model." This is documentation. Put it in docs. Reference the docs from CLAUDE.md with a link if Claude should read them for specific tasks. The content doesn't load every session; Claude fetches it when relevant.

Onboarding notes → onboarding doc

"Here's our team structure." "Here's who owns what." "Here's where to ask about X." This is human-facing onboarding content. Claude doesn't need most of it for coding tasks. It belongs in an onboarding doc for new engineers, not in ambient AI context.

The migration path from bloated to lean

If your CLAUDE.md is currently large, here's how we cut ours from 4800 to 380 words:

  1. Read it start to finish. Ask: for each paragraph, would Claude meaningfully do worse without it? Mark paragraphs where the honest answer is "no" — they're candidates for removal.
  2. Group by shape. Style guidance, workflows, architecture, onboarding, specific-task-guidance. Each group has a natural non-CLAUDE.md home.
  3. Migrate one group at a time. Style guidance → skills. Workflows → slash commands. Etc. Don't remove from CLAUDE.md until the new home works; keep both temporarily.
  4. Verify quality doesn't degrade. Run some representative sessions; check that behavior didn't change (or changed for the better).
  5. Remove from CLAUDE.md. Once the new home is proven, delete the CLAUDE.md content. Commit the reduction.
  6. Repeat until CLAUDE.md is lean. The finished state should be a few hundred words focused on genuinely universal guidance.

This took us about six weeks, doing it gradually. Rushing risks losing guidance that turns out to matter; going slowly lets you notice which content was actually earning its cost.

What we keep

After all the pruning, what stays in CLAUDE.md are the things that meet the "genuinely universal, genuinely stable, genuinely gets-wrong-without-it" criteria:

  • Project scope (what this codebase is FOR)
  • Specific commands (our test runner, our lint tool)
  • A few high-leverage anti-patterns Claude reliably falls into
  • Pointers to where more specific guidance lives
  • Explicit "do not do" for things with real consequences

That's not much. It's not supposed to be. CLAUDE.md is expensive real estate — every session pays for it — and only content that genuinely deserves that always-on status belongs there.

Every session pays for CLAUDE.md. Every session. Content that doesn't earn its ambient always-on status is a tax with no return.

The counterintuitive result

We assumed cutting CLAUDE.md by 90% would degrade session quality. It didn't — it improved it. The remaining content actually landed. Attention wasn't split across 5000 words of mixed-priority content; it was focused on the specific handful of things that mattered.

The migration also forced better structure elsewhere. Style guidance became skills. Workflows became slash commands. Complex tasks got subagents. Each got the right home for its shape. The overall system got more consistent, not less.

If your CLAUDE.md is bigger than 1000 words, try this: cut it in half. Move the removed content to appropriate homes. Run sessions for a week. Notice whether anything got worse. Almost certainly, nothing does — most of what you cut wasn't earning its place in the first place. And now you have $12 per engineer per month to spend on actual work.

FA

Written by

Fatima A.

Fatima covers developer experience, tooling architecture, and how MCP-native workflows change day-to-day dev.

Get cctk running in one command

85 slash commands, 12 subagents, 12 MCP integrations, 12 hooks. All the patterns from this post are shipped in cctk.

npx cctk@latest init Get cctk v1.5.2 →