Home › Coding › Compress Your Claude.md: Cut 60-70% of System Prompt Bloat in Claude Code
Compress Your Claude.md: Cut 60-70% of System Prompt Bloat in Claude Code
Coding · General · coding
54Quality
91%Useful
80Reliability
The prompt
I've found that maintaining minimal structural cues (typically a single repeating heading) in Claude.md helps it better index information. And anecdotally a lot less GREP'ing, web searching and wasted tokens. I also include a short instruction a the top of my file. Requiring context to be written as single line rationales with up to 1 additional line for links/refs/pointers. While explicitly forbidding "tutorial-like" explanations and blocks/pages of code. --- It looks like Claude tokenizer handles markdown pretty efficiently, like a ## header is like 1-2 tokens. So I think the actual token savings are smaller than the byte-level numbers suggest. Where this actually matters is if maybe if you're on Haiku with big codebases where system prompt and context fight for space. On Opus? Probably not worth making your files unreadable for humans? --- > Strip markdown decoration: Headers (##), bold (*), italic (*), horizontal rules (---). These are visual aids Claude doesn't need. In my experience, LLMs do understand header levels in markdown. So removing these is detrimental. --- > Compress table formatting: Markdown tables with alignment rows and padding are verbose for what they communicate. This is a good idea imo.