agentsclimarketplace

Context diet skill

Skill cskwork/context-diet-skill

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.From its SKILL.md

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.

One thing to look at

  • 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.

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 542 of the 575 authors here whose files we hold, read 2026-09-06

  • Provide few-shot examples for complex tasksin 17 of 542, across 16 files
  • Ask clarifying questions if information is ambiguousin 16 of 542, across 14 files
  • Output a complete optimized prompt for the userin 15 of 542, across 9 files
  • Validate structured outputs against schemasin 15 of 542, across 13 files
  • Analyze the draft prompt for intent and gapsin 14 of 542, across 8 files
  • Detect project tech stack from local filesin 14 of 542, across 8 files
  • Recommend a model based on task scopein 13 of 542, across 7 files
  • Present results in the specified output formatin 13 of 542, across 7 files
  • Match intent and scope to ECC componentsin 13 of 542, across 7 files
  • Ask one question at a timein 13 of 542, across 12 files
  • Respond in the same language as the user inputin 12 of 542, across 6 files
  • Ask up to three clarification questions if context is missingin 11 of 542, across 5 files

Said here and by no other author read

  • run context to record baseline token counts
  • run logging proxy to rank tool token costs
  • run apply-config script to update settings
  • restart Claude Code after applying configuration
  • verify token count reduction with context command
  • use bare tool names in permissions.deny to remove 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 325,949. 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.