ClaudeHack
0

Keep CLAUDE.md under 200 lines so rules actually stick

Claude Code / CLAUDE.md·13 hours ago·verified 13 hours ago·easy·~10 min setup·verified

Trim project memory to under ~200 lines so Claude follows critical rules instead of drowning them in noise.

The problem

Long CLAUDE.md files burn tokens every turn and make Claude ignore the rules you care about most.

The hack

Treat CLAUDE.md like a briefing, not a wiki: keep only always-true facts, and move workflows into skills or path-scoped rules.

Why it works

Official guidance targets under 200 lines. Bloated files consume startup context and reduce instruction adherence.

Setup

1. Open your root CLAUDE.md and run a pass asking: would removing this line cause a specific mistake? 2. Cut tutorials, API dumps, and anything Claude can infer from code. 3. Move multi-step workflows into `.claude/skills/` or `.claude/rules/`. 4. Run `/context` or `/memory` to confirm the trimmed file still loads.

Additional details

Specific beats vague: "2-space indentation" outperforms "format code nicely."

Source

anthropic·View original →·by Anthropic Docs

Does this still work?

0 said it works · 0 said it's broken

Discussion

No comments yet. Be the first to say whether this worked for you.