{
  "markdown": "<p align=\"center\"><img src=\"logo.png\" width=\"120\" alt=\"logo\" /></p>\n\n# context-diet\n\nA Claude Code [agent skill](https://docs.claude.com/en/docs/claude-code/skills) that\ncuts per-request **system-prompt bloat** — the tool definitions, bundled-skills\ncatalogue, and feature instructions that ship on every turn and get billed every turn.\n\nMethod adapted from aihero.dev,\n[How to kill the bloat in Claude Code's system prompt](https://www.aihero.dev/how-to-kill-the-bloat-in-claude-codes-system-prompt).\n\n**Live:** https://cskwork.github.io/context-diet-skill/\n\n## What's inside\n\n| File | Purpose |\n| --- | --- |\n| `SKILL.md` | the skill: the method, quick start, the menu |\n| `REFERENCE.md` | full 6-step method + per-tool cost/benefit tables |\n| `proxy.mjs` | logging proxy that ranks every tool by size (Node built-ins only) |\n| `scripts/apply-config.mjs` | deterministic, backed-up settings merge |\n| `templates/settings.aggressive.json` | the full menu — biggest savings |\n| `templates/settings.conservative.json` | safe subset — keeps plan mode + AskUserQuestion |\n\n## The core idea\n\nA **bare** tool name in `permissions.deny` removes the tool's *definition* from the\npayload. A **scoped** rule (`\"Skill(dataviz)\"`) only blocks the call but keeps the\ndefinition. To shrink tokens: deny bare names, and flip `disable*` feature flags.\n\n## Install\n\nCopy into your skills directory:\n\n```bash\ngit clone https://github.com/cskwork/context-diet-skill.git\ncp -r context-diet-skill ~/.claude/skills/context-diet\n```\n\nThen invoke it in Claude Code with `/context-diet`, or just ask to \"reduce Claude Code\ntoken usage\".\n\n## Use\n\n```bash\n# 1. See the current split\n/context\n\n# 2. Rank every tool by size (optional; use PORT=9000 if 8787 is taken)\nnode proxy.mjs\nANTHROPIC_BASE_URL=http://localhost:8787 claude   # another terminal\n\n# 3. Apply the diet (backs up first)\nnode scripts/apply-config.mjs                      # global ~/.claude/settings.json\nnode scripts/apply-config.mjs --project            # this project only\nnode scripts/apply-config.mjs --dry-run            # preview only\n\n# 4. Restart Claude Code, then re-check\n/context\n```\n\nTreat the config as **a menu, not a prescription** — keep any tool or feature you\nactually use. See `REFERENCE.md` for what each deny entry costs you.\n\n## Credit\n\nTechnique by [aihero.dev](https://www.aihero.dev/how-to-kill-the-bloat-in-claude-codes-system-prompt).\nThis repo packages it as a reusable skill with a measurement proxy and a safe,\nidempotent config applier.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n",
  "bytes": 2552,
  "sha": "e857b8216916ad103f70831a7abd83422a4f1f878bac6497cf91ded7c2523dd0",
  "repo_slug": "cskwork/context-diet-skill",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_cskwork_context_diet_skill_db25e55b/readme"
}