agentsclimarketplace

Context diet skill

Skill cskwork/context-diet-skill

Trim Claude Code system-prompt bloat: measure with a logging proxy, then deny unused tool definitions and disable features via settings.json. Method from aihero.dev, packaged as a skill.

Install
npx -y skills add cskwork/context-diet-skill

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 20 days oldThe repository was created 20 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Cut Claude Code's per-request system-prompt bloat by measuring and disabling unused tools, bundled skills, and features via settings.json. Use when the user wants to reduce Claude Code token usage or context size, shrink the system prompt, make requests cheaper or faster, run a logging proxy to rank tools by size, or asks about /context, disableBundledSkills, disableWorkflows, or permissions.deny for tool definitions.

SKILL.md

3.5 KB, 762 tokens by cl100k_base, as published. Nobody here has run it

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

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:
    node proxy.mjs                                   # :8787, forwards to api.anthropic.com
    ANTHROPIC_BASE_URL=http://localhost:8787 claude  # in another terminal
    
    Each request is logged to ./logs/*.md and a ranked tool-size table prints live. If port 8787 is already taken (e.g. an existing token proxy), use PORT=9000 node proxy.mjs and point ANTHROPIC_BASE_URL at the same port.

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/skills and plugin skills stay; bundled slash commands stay typable.
  • disableWorkflows — drops the multi-agent Workflow tool (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. See REFERENCE.md for 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.

Gives 0 of the 12 instructions most prompt engineering skills give in 762 tokens

Counted across 563 of the 626 authors here whose files we hold, read 2026-08-06

  • ask at most three clarifying questionsin 22 of 563, across 15 files
  • respond in the user input languagein 14 of 563, across 9 files
  • preserve the original intentin 13 of 563, across 11 files
  • Establish baseline metrics and collect representative examplesin 12 of 563, across 2 files
  • Identify failure modes and prioritize high-impact fixesin 12 of 563, across 2 files
  • Apply prompt and workflow improvements with measurable goalsin 12 of 563, across 2 files
  • Roll back quickly if quality or safety metrics regressin 12 of 563, across 2 files
  • validate changes with tests and roll out in controlled stagesin 12 of 563, across 2 files
  • generate quantitative baseline performance reportsin 12 of 563, across 2 files
  • create representative test scenariosin 12 of 563, across 2 files
  • treat prompts as codein 12 of 563, across 5 files
  • test prompts on diverse inputsin 12 of 563, across 8 files

Said here and by no other author read

  • run the apply-config script to merge settings
  • use the --project flag for project-specific settings
  • use the --dry-run flag to preview changes
  • back up the target settings file before modifying
  • deny bare tool names to drop their definitions
  • use scoped rules to block calls but keep definitions

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.