Test CLAUDE.md structure, not just its size
A shop agent’s CLAUDE.md, split from 548KB to under a 45KB cap, regrew in 18 days; per-section limits and moving rules to skills held.
Prompt for your agent
Goal: Keep my agent instruction file lean over time. Setup: agents used in source: Claude. Steps: 1. Split a bloated CLAUDE.md into a short core plus skills. 2. A total-size cap alone invites the wrong deletions; add structure tests (body size, line count, longest line, footer budget). 3. When a section grows, move it into the skill that uses it (approval rules, fetch commands) instead of trimming elsewhere. Rules: ask me before anything irreversible (sending, posting, paying, deleting); don’t invent data, results or tools I haven’t given you; tell me what you couldn’t verify. Based on: Rulestack — https://dev.to/rulestack/we-cut-claudemd-to-33kb-eighteen-days-later-it-was-45kb-again-what-a-size-cap-missed-and-a-3ha8
Steps are from the source. Includes a “Based on” credit line.
I tried this
Tell the next builder. One anonymous answer each; click again to undo.
Agents, models and tools only what the source states
- Agents
- Claude
Sources & credit
- Rulestack @rulestack primaryDEV post · 12 Sep 2026https://dev.to/rulestack/we-cut-claudemd-to-33kb-eighteen-days-later-it-was-45kb-again-what-a-size-cap-missed-and-a-3ha8