context-diet
Skill0 starsChanged 4 months agoMITView on GitHub
Measure Claude Code prompt overhead and disable unused tools or features while preserving required workflows. Use for context-size analysis or settings-based reduction.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- dennisrongo/claude-skillstheir own version, first seen Oct 13, 2026
- gaia-research/skill-context-diettheir own version, first seen Aug 7, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- gaia-research/skill-context-diet★ 3same name
- dennisrongo/claude-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- context-dietSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
If port 8787 is already taken (e.g.
- Very specific: line 62
Keep anything you use. Denying EnterPlanMode/ExitPlanMode removes plan mode.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
context-diet
Measure the tool definitions, skill catalogue, and feature instructions included in the current Claude Code configuration, then trim unused capabilities. Payload size is not billing: report cached input, uncached input, and output separately when available, and do not infer cost savings from raw token reductions.
Method adapted from aihero.dev, "How to kill the bloat in Claude Code's system prompt." Bare-name versus scoped deny behavior is documented in the official Agent SDK permissions guide.
The idea in one line
A bare tool name in permissions.deny (e.g. "NotebookEdit") removes the tool's
definition from the payload. A scoped rule (e.g. "Skill(dataviz)") only blocks
the call but keeps the definition. To shrink tokens, deny bare names and flip disable* flags.
Measure — record the baseline first
/contextin a session prints the system / tools / MCP / memory / message token split. Write those numbers down; they are the only "before" you get. It reports one combined "tools" number, not a per-tool ranking.- For a per-tool ranking, run the logging proxy:
Each request is logged tonode proxy.mjs # repo root; :8787 → api.anthropic.com ANTHROPIC_BASE_URL=http://localhost:8787 claude # in another terminal./logs/*.mdand a ranked tool-size table prints live. If port 8787 is already taken (e.g. an existing token proxy), usePORT=9000 node proxy.mjsand pointANTHROPIC_BASE_URLat the same port.
Apply the diet
Paths below are relative to the skill directory skills/context-diet, so run there —
except --project, which writes .claude/settings.json into the current directory:
run that one from your project root and give the script's full path.
node scripts/apply-config.mjs # merge into ~/.claude/settings.json (global)
node scripts/apply-config.mjs --project # into ./.claude/settings.json (this project)
node scripts/apply-config.mjs --dry-run # preview, write nothingInspect the current settings and preview with --dry-run first. Choose only capabilities the user does not need and preserve unrelated configuration. The script backs up the target, appends deduplicated deny rules, and sets disable flags; use --template templates/settings.conservative.json for the smaller subset. A template is a menu, not permission to disable everything it contains.
Done when Claude Code has been restarted, /context shows the measured before/after difference, and representative retained workflows still work. A lower count alone does not prove a successful configuration change.
What the config does
permissions.deny: [bare tool names]— drops those tool definitions from every request.disableBundledSkills— drops all Anthropic-bundled skills at once. Your own~/.claude/skillsand plugin skills stay; bundled slash commands stay typable.disableWorkflows— drops the multi-agentWorkflowtool (typically the single largest line in the table).disableRemoteControl,disableClaudeAiConnectors,disableArtifact— drop those feature surfaces and their instructions.- Trim skills selectively instead of all-or-nothing:
skillOverrides→"off"or"user-invocable-only"per skill.
Menu, not prescription
Keep anything you use. Denying EnterPlanMode/ExitPlanMode removes plan mode;
AskUserQuestion removes clarifying questions; NotebookEdit breaks notebook edits;
SendMessage/ScheduleWakeup are used by multi-agent and /loop runs. Read
REFERENCE.md at the repo root before denying anything on that list — it carries the
full 6-step method and the per-item cost table.
Templates
templates/settings.aggressive.json— the full menu, biggest savings.templates/settings.conservative.json— keeps plan mode + AskUserQuestion + bundled skills.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

