context-dietlisted
Install: claude install-skill cskwork/context-diet-skill
# context-diet
Every Claude Code request ships tool definitions, a bundled-skills catalogue, and
feature instructions you may never use — tens of thousands of tokens per turn,
billed every turn, that the model reads before reaching your actual problem. This
skill measures that overhead and trims it.
Method adapted from aihero.dev, "How to kill the bloat in Claude Code's system prompt."
## 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.
## Quick start — apply the diet
```bash
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 nothing
```
The script **backs up** the target first, then appends deny rules (deduped, existing
order preserved) and sets the disable flags. Then **restart Claude Code** and run
`/context` to confirm the drop. Pass `--template templates/settings.conservative.json`
for the safe subset.
## Measure — before and after
1. `/context` in a session prints the system / tools / MCP / memory / message token
split. It reports one combined "tools" number, not a per-tool ranking.
2. For a per-tool ranking, run the logging proxy:
```bash