Skill Context Diet — Testing skill for Claude Code
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.
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
Related Skills
Tool Policy
Write your company's rules for an agent's tool calls, test them on past traces, and run them on every change
Claude QA Skills
QA skills for Claude Code. Evidence-based rules from 30+ real production failures. Apple App Store + Capacitor
Spec Runner
Agent skill and CLI that runs a bounded task feature by feature: a features.json queue kept outside the reposi
Roast My Agents Md
Brutally honest AGENTS.md/CLAUDE.md review backed by real A/B test evidence. Not just opinions — actual proof
Brand Auto
Brand-auto — bounded autonomous brand work. Brand-orchestrator routes to Durham specialists (Aaker/Kotler/Glas
CR Agents
Brute-force AI method for technical work. Personas anchored to experts in their fields run as Claude Code sub-
Related Agents
Context First Auditor
Audits a context-first (non-dev) harness: documentation/wiki/rules-oriented repo. Replaces test-runner / forma
Context Harvester
Use before non-trivial work to search project knowledge (AGENTS.md, rules, docs, ADRs, notes, changelog) and r
Gsd Doc Synthesizer.Compact
Synthesizes classified planning docs into a single consolidated context. Applies precedence rules, detects cro