context-budget
Skill4 starsChanged 6 months agoMITView on GitHub
Audits Claude Code context consumption across agents, skills, commands, hooks, MCP servers, and the CLAUDE.md/MEMORY chain. Identifies bloat and redundancy, then produces prioritized token-savings recommendations. Backs the /context-budget command.
27 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- Univers42/claude-deal-with-the-deviltheir own version, first seen Oct 4, 2026
- hahuyhungdev/ai-coding-configtheir own version, first seen Oct 2, 2026
- trinhhaox/context-budgettheir own version, first seen Sep 22, 2026
- OneWave-AI/claude-skillstheir own version, first seen Sep 21, 2026
- mxrsv/agents-skillstheir own version, first seen Sep 19, 2026
- YogirajA/Claude-Skillstheir own version, first seen Sep 17, 2026
Used with
Projects with it also use agent-sort, lead-intelligence and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JamkrisSkillagent-sort
Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.
Also in 4 projects that use this
JamkrisSkilllead-intelligence
AI-native lead intelligence and outreach pipeline. Replaces Apollo, Clay, and ZoomInfo with agent-powered signal scoring, mutual ranking, warm path discovery, source-derived voice modeling, and channel-specific outreach across email, LinkedIn, and X. Use when the user wants to find, qualify, and reach high-value contacts.
Also in 4 projects that use this
JunMysterySkillecc-guide
Guide users through ECC's current agents, skills, commands, hooks, rules, install profiles, and project onboarding by reading the live repository surface before answering.
Also in 3 projects that use this
JunMysterySkillrecsys-pipeline-architect
Design composable recommendation, ranking, and feed pipelines using the six-stage Source→Hydrator→Filter→Scorer→Selector→SideEffect framework popularized by xAI's open-sourced For You algorithm. Use this skill whenever the user is building any system that picks "the top K items for a (user, context)" — social feeds, content CMSs, RAG rerankers, task prioritizers, notification triage, search reranking, ad ranking.
Also in 3 projects that use this
Exploration-labsSkilltoken-budget-advisor
Proactive token budget assessment and task chunking strategy. Use this skill when queries involve multiple large file uploads, requests for comprehensive multi-document analysis, complex multi-step workflows with heavy research (10+ tool calls), phrases like "complete analysis", "full audit", "thorough review", "deep dive", or tasks combining extensive research with large output artifacts. This skill helps assess token consumption risk early and recommend chunking strategies before beginning work.
Also in 5 projects that use this
thanvish21Skillbenchmark-optimization-loop
Optimization loops for Hermes benchmarks
Also in 3 projects that use this
- +5 more from Jamkris
Other versions27 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- socialadsmentor/sam-agentic-harness★ 411% same
Wrote their own version · 26
- Archive228/loopkit★ 756same name
- coco-research/coco★ 437same name
- OneWave-AI/claude-skills★ 321same name
- loulanyue/awesome-claude-notes★ 272same name
- templetongroup/radiant★ 113same name
- Jamkris/everything-gemini-code★ 87same name
- felvieira/claude-skills-fv★ 23same name
- tellmefrankie/ai-investment-skills★ 20same name
- woxiangyangzhimao/skills★ 14same name
- mxrsv/agents-skills★ 8same name
16 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
- memory-reviewSkill
- model-routingSkill
- posthog-weeklySkill
- ui-ux-pro-maxSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 24 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Before adding more agents, skills, or MCP servers: check headroom first.
“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context Budget
Estimate the token overhead of everything loaded into a Claude Code session and surface concrete ways to reclaim context space. Adapted from ECC's context-budget for a single-runtime (Claude Code) setup on a large Opus window.
When to Use
- The setup has grown (many agents, hooks, skills, MCP servers) and you want the real load cost.
- Output quality degrades, or the context monitor fires earlier than expected.
- Before adding more agents, skills, or MCP servers: check headroom first.
- Running the
/context-budgetcommand (this skill backs it).
How It Works
Token estimation: prose uses words × 1.3, code or JSON uses chars / 4.
Phase 1 — Inventory
Scan each source and estimate tokens.
- Agents (
~/.claude/agents/*.md): tokens per file. Flag files over 200 lines (heavy) and adescriptionover 30 words (it loads into every Task tool invocation, even for agents never spawned). - Skills (
~/.claude/skills/*/SKILL.md): tokens per SKILL.md. Flag over 400 lines. - Commands (
~/.claude/commands/*.md): tokens per file. Flag stale or duplicated entries. - Hooks (
~/.claude/hooks/plus the wiring insettings.json): count active hooks. Flag heavy or overlapping ones. - MCP servers (active MCP config): count servers and total tools. Estimate ~500 tokens per tool schema. Flag servers over 20 tools, and servers that wrap a CLI already available for free (gh, git, vercel, supabase).
- CLAUDE.md and memory chain (
~/CLAUDE.md,~/.claude/memory/MEMORY.md, any project CLAUDE.md): tokens per file. Flag a combined total over 400 lines, or a MEMORY index that carries detail instead of one-line pointers.
Note on RTK: it compresses Bash OUTPUT at runtime. It does not reduce the LOAD cost of this setup. Measure the load cost (the files above), not RTK-filtered command output.
Phase 2 — Classify
| Bucket | Criteria | Action |
| Always needed | Referenced in CLAUDE.md, backs an active command, or matches current work | Keep |
| Sometimes needed | Domain-specific, not referenced in CLAUDE.md | On-demand or lazy-load |
| Rarely needed | No reference, overlapping content, no project match | Remove or archive |
Phase 3 — Detect Issues
- Bloated agent descriptions (over 30 words): present in every Task tool context.
- Heavy agents (over 200 lines): inflate Task context on every spawn.
- Redundant components: skills that duplicate agent logic, memory entries that duplicate CLAUDE.md rules.
- MCP over-subscription: many servers, or servers wrapping free CLI tools.
- CLAUDE.md or MEMORY bloat: verbose sections, stale rules, MEMORY entries carrying detail instead of a one-line hook.
Phase 4 — Report
Context Budget Report
═══════════════════════════════════════
Window: Opus (1M tokens)
Total estimated setup overhead: ~XX,XXX tokens (XX% of 1M)
Effective working context: ~XXX,XXX tokens
Component Breakdown:
┌───────────────┬───────┬──────────┐
│ Component │ Count │ Tokens │
├───────────────┼───────┼──────────┤
│ Agents │ N │ ~X,XXX │
│ Skills │ N │ ~X,XXX │
│ Commands │ N │ ~X,XXX │
│ Hooks │ N │ ~X,XXX │
│ MCP tools │ N │ ~XX,XXX │
│ CLAUDE+memory │ N │ ~X,XXX │
└───────────────┴───────┴──────────┘
Top 3 Optimizations (ranked by savings):
1. [action] → ~X,XXX tokens
2. [action] → ~X,XXX tokens
3. [action] → ~X,XXX tokensIn verbose mode, add per-file token counts, the heaviest files line-counted, and the MCP tool list with per-tool schema estimates.
Best Practices
- MCP is usually the biggest lever. One 30-tool server can cost more than every skill combined.
- Agent descriptions load always, even for agents never invoked. Keep them tight.
- On a 1M window the absolute overhead matters less than redundancy and menu noise. Prioritize removing stale or duplicated surface over shaving raw tokens.
- Re-audit after adding any agent, skill, or MCP server to catch creep early.
- Pairs with the
harness-optimizeragent, which consumes this report as its baseline.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

