gaia-research

Skill Context Diet — Testing skill for Claude Code

Testing community

Claude Code may truncate CLAUDE.md past 40,000 chars.

How to install Skill Context Diet

This entry records only its repository, not the path inside it, so there is no exact command to give. Open gaia-research/skill-context-diet and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Skill Context Diet does

Claude Code may truncate CLAUDE.md past 40,000 chars. Compact rules first; test bounded context ablation with evidence gates.

Alternatives in Testing

  • Pua — Use when the user invokes /pua or asks for PUA mode, try-harder/retry help, change-approach coaching, completi 19.5k ★
  • TDD Skill — BitcoinAddressFinder — This skill documents test-driven development practices and refactoring patterns used in the BitcoinAddressFind 237 ★
  • API Spec — Generate Zalando-compliant OpenAPI 3.1 specs (one per bounded context) and publish to SmartBear SwaggerHub 172 ★

README

context-diet

**Your `CLAUDE.md` is over the limit. Which rules is the harness about to silently drop?**

Claude Code may truncate CLAUDE.md past 40,000 chars. Boss, run /context-diet CLAUDE.md first—compact rules, then make bounded context ablation face evidence.

Generated image 3

Claude Code warns past **40,000 characters** and may truncate beyond it — quietly disabling whatever rules fell past the cutoff. The same is true for any agent-context file: `.cursorrules`, `AGENTS.md`, a raw system prompt. `context-diet` measures where the budget goes, section by section, then compacts the file under the limit **while proving no rule was lost**.

bash <(curl -sL https://raw.githubusercontent.com/gaia-research/skill-context-diet/main/install.sh)

No pip or npm. The analyzer and reversible ablation controller are pure Python stdlib (+matplotlib for charts, optional).


What it looks like

Context Diet Report — CLAUDE.md
════════════════════════════════════════════════════════════════

Total: 49,687 chars (~12,422 tok)  ·  limit 40,000  ·  OVER LIMIT
Over by 9,687 chars — must shed at least this to fit.
Sections: 36

Largest sections (compaction targets)
────────────────────────────────────────────────────────────────
  chars    ~tok     ln  section
───────  ──────  ─────  ──────────────────────────────
  3,994     998    216  Programmatic-First Policy
  3,856     964    486  Curation Guidelines
  3,848     962    411  Known Badges Issues (Core Implementat…
  3,823     956    110  Fixed-nav clearance — every top-level…
  3,325     831    435  Known Skill Explorer Issues

That's the measurement. The skill then runs a **bake-off** of compaction strategies and applies the one that shrinks the most *without losing a single rule*.


Why "without losing a rule" is the hard part

An agent-context file isn't prose — it's