cc-context-diet
TypeScriptNode.jsBun PE Binary PatchingClaude CodeMCPAST / RegexCommander.jsVitest

overview.
When running Claude Code with heavy MCP servers and plugin ecosystems over custom gateways (9Router, LiteLLM, OpenRouter), the runtime disables ToolSearch and dumps 160k+ tokens of MCP JSON schemas and 30k+ tokens of skill descriptions on Turn 1. cc-context-diet unpacks the 2,394 embedded Bun modules inside claude.exe, unlocks client-side ToolSearch across all gateways and non-Anthropic models, sanitizes proprietary defer_loading and tool_reference wire blocks, compresses 450+ skills into compact namespace groups with native Skill({ skill: "search:<query>" }) discovery, and strips redundant skill catalogs from spawned subagents without moving or deleting a single file.
key features.
- Cuts Turn-1 prompt prefix from 211,672 tokens to 22,433 tokens (-89%) on live 14-MCP / 454-skill installs
- Unlocks client-side ToolSearch on custom gateways and sanitizes defer_loading / tool_reference blocks for Gemini, GPT, DeepSeek, and OpenCode models
- Adds in-place Skill({ skill: "search:<keyword>" }) and Skill({ skill: "list:<namespace>" }) inside the native Skill tool plus subagent skill stripping