Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By fugaziv1.5.0MITIn 1 marketplace
Audit the context cost of MCP servers, skills, agents and memory files in a Claude Code session.
Code that runs inside Claude Code on every session, as you, unsandboxed.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
Languagelanguage
Language of the report, the panel and the help: English (en) or Spanish (es).
One of en, es
stringdefault en
1 critical to review before installing
JavaScript or TypeScript that runs inside Claude Code as you, unsandboxed. Read from its source, it sees, changes or blocks tool calls; reads files; reads environment variables (HOME); changes what Claude reads (system prompt, context, reminders).
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
English · Español
A Claude Code mod that audits the context cost of a session: which MCP servers, skills, agents and memory files are active, how much each one weighs on every request, how much of it you really use, and what is worth removing.
Status: v1.5.0, tested with Claude Code 2.1.325.
Context is not spent on the conversation alone. Before your first message, tens of thousands of tokens are already taken by tool schemas, skill listings, agents and memory. That cost is fixed, it is paid on every request, and it is almost never measured.
/diet the session report (summary)
/diet --all with every server, skill, agent and file
/diet --json the report as JSON
/diet panel a live panel beside the chat
/diet status on|off notices above the prompt (off by default)
/diet reset clears the history between sessions
/diet help the commands and how to read the verdicts
/diet draws the report as colored cards, one per topic (fixed, what is left, MCP, skills, actions), in monospace with dot-leader rows. In the panel each header folds its card (keys 1 to 5); ACTIONS starts folded./context, per server, skill, agent and file.USED, OCCASIONAL, CANDIDATE, WATCH, FIXED. Something is a candidate only when it went unused in sessions on 3 or more distinct days; only sessions of 3 or more turns count, so a few short sessions in a row are not enough.7 days ago: 65k → 48k, −17k (−26%)./diet status on, a row above the prompt tells you when there are candidates or compaction is 10 turns away or less; close it with its × or with /diet status off.The text left in the transcript is a short summary:
FIXED 33.7k per request · 13% of what is in use
in use 254.3k / 1M (25%)
diet 7 days ago: 41.7k → 33.7k, −8k (−19%)
YOUR MCP SERVERS (3)
CANDIDATE firecrawl [user] · 8k loaded (5/32 tools) · 18k deferred · 0 calls · used in 0/4 sessions
no cost and no use: brave-search (deferred, 0 per request)
CLAUDE APP AND PLUGINS · 17 servers · 14.6k loaded · fixed, not removable from your config
DEFERRED · 20 servers · 109.3k behind ToolSearch · 0 per request
ACTIONS
claude mcp remove -s user firecrawl # −8k
The mod registers no tools, skills or prompt sections: measuring tokens must not add tokens.
The report, the panel and the help come in English and Spanish. The language is the plugin's language option (en or es), English by default. Change it from /config, or in ~/.claude/settings.json:
{ "pluginConfigs": { "context-diet": { "options": { "language": "es" } } } }
In Claude Code:
/plugin install context-diet --marketplace fugazi/context-diet
From the terminal:
claude plugin install context-diet --marketplace fugazi/context-diet
Development mode, from the repository root:
claude --plugin-dir .
claude plugin validate .
claude plugin test .
claude --plugin-dir . -p "/diet"
Tests run against the real engine with claude plugin test. Once the mod has loaded in an interactive session, the engine leaves the API types in .claude-plugin/types/; from then on claude plugin validate . type-checks too.
context-diet/
├── .claude-plugin/ plugin and marketplace manifests, icon
├── hooks/
│ ├── context-diet.tsx hooks, I/O and panel
│ └── lib/ report and verdicts, text, drawn dashboard, strings
├── types/index.d.ts type contract
├── tests/ tests (`claude plugin test`)
├── docs/ spec and spike findings
├── spike/ the minimal plugin from the first spike
└── ROADMAP.md
The mod only observes. None of its hooks changes a tool call, a skill's text, a prompt or a setting, and it registers no tools, agents or prompt sections.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub fugazi/context-diet --plugin context-diet