context-budget
Skill2 starsChanged 5 months agoMITView on GitHub
Inventory and recommend prunes for loaded agents, skills, MCP servers, and rules. Reports always-needed / sometimes-needed / rarely-needed buckets with token costs. From affaan-m/ECC context-budget.
57 other projects use a version of this.
Adopted by
Most recently taken up by
- lengrufeng2008/dsh-skill-librarytheir own version, first seen Nov 15, 2026
- LIXIAO199115/skillrigtheir own version, first seen Nov 15, 2026
- roronoazoroshao369/vibe-coding-ostheir own version, first seen Nov 15, 2026
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- cveralyon/axel-setuptheir own version, first seen Nov 8, 2026
- ahmadvahidi/skill-atlastheir own version, first seen Nov 8, 2026
Used with
Projects with it also use agent-payment-x402, openclaw-persona-forge 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.
TironFoxSkillagent-payment-x402
Add x402 payment execution to AI agents — per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents need to pay for APIs, services, or other agents.
Also in 6 projects that use this
TironFoxSkillopenclaw-persona-forge
为 OpenClaw AI Agent 锻造完整的龙虾灵魂方案。根据用户偏好或随机抽卡, 输出身份定位、灵魂描述(SOUL.md)、角色化底线规则、名字和头像生图提示词。 如当前环境提供已审核的生图 skill,可自动生成统一风格头像图片。 当用户需要创建、设计或定制 OpenClaw 龙虾灵魂时使用。 不适用于:微调已有 SOUL.md、非 OpenClaw 平台的角色设计、纯工具型无性格 Agent。 触发词:龙虾灵魂、虾魂、OpenClaw 灵魂、养虾灵魂、龙虾角色、龙虾定位、 龙虾剧本杀角色、龙虾游戏角色、龙虾 NPC、龙虾性格、龙虾背景故事、 lobster soul、lobster character、抽卡、随机龙虾、龙虾 SOUL、gacha。
Also in 5 projects that use this
loulanyueSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 9 projects that use this
renepfSkillorch-pipeline
Shared orchestration engine for the orch-* skill family. Defines the gated Research-Plan-TDD-Review-Commit pipeline, the size classifier, the agent map, and the two human gates that the orch-* operation skills delegate to. Not usually invoked directly.
Also in 4 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 11 projects that use this
loulanyueSkillsanta-method
Multi-agent adversarial verification with convergence loop. Two independent review agents must both pass before output ships.
Also in 8 projects that use this
Other versions57 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 57
- misskey-dev/misskey★ 11ksame name
- poshan0126/dotclaude★ 871same name
- coco-research/coco★ 797same name
- OneWave-AI/claude-skills★ 378same name
- loulanyue/awesome-claude-notes★ 272same name
- Fmarzochi/EGC★ 61same name
- felvieira/claude-skills-fv★ 28same name
- Fadi88/one-man-startup★ 16same name
- tellmefrankie/ai-investment-skills★ 14same name
- woxiangyangzhimao/skills★ 14same name
47 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 repository60 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- analyzeSkill
- animation-disciplineSkill
- api-versioningSkill
- autopilotSkill
- browser-e2eSkill
- characterizeSkill
- clarifySkill
- codemodSkill
- constitution-compactSkill
- constitutionSkill
- creative-webSkill
- db-migrationSkill
- debugSkill
- detect-stackSkill
- dispatch-criteriaSkill
- dreamSkill
- experimentSkill
- fastapiSkill
- flag-cleanupSkill
- flag-rolloutSkill
- flask-realtimeSkill
- framework-detectorSkill
- front-end-designSkill
- grill-meSkill
- handoffSkill
- image-generationSkill
- implementSkill
- initiativeSkill
- instinctSkill
- loopSkill
- nextjsSkill
- observabilitySkill
- okr-alignSkill
- parallel-swarmSkill
- pivotSkill
- planSkill
- pr-bodySkill
- prime-disciplineSkill
- prod-observabilitySkill
- react-nodeSkill
- react-viteSkill
- release-trainSkill
- researchSkill
- reviewSkill
- security-guardSkill
- self-healSkill
- shipSkill
- skill-creatorSkill
- specifySkill
- tailwind-disciplineSkill
- tasksSkill
- tdd-loopSkill
- token-budgetSkill
- typographySkill
- verify-loopSkill
- verifySkill
- wip-checkpointSkill
- <kebab-case-skill-name>Skill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 53 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 87
Don't archive without invocation log: Use .claude/hooks/.log/skill.log (when skill-router records triggers) as ground truth.
- Distinctive: line 88
Never auto-archive agents: Always confirm with the user.
“Common” is measured: kept by at least 6 in 10 of the 53 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
Most agents accumulate skills/agents/rules cruft over time. This skill audits the current load and recommends prunes.
What it scans
| Source | Path | Cost source |
| Agents | .claude/agents/**/*.md | Frontmatter loaded at startup; body loaded on dispatch |
| Skills | .claude/skills/*/SKILL.md | Frontmatter loaded; body on trigger |
| Rules | .claude/rules/*.md (if any) | Loaded by path-glob match |
| MCP servers | .mcp.json | Tool schemas; deferred unless alwaysLoad: true |
| Memory | .claude/memory/MEMORY.md + topic files | First 200 lines auto-loaded |
| Output styles | .claude/output-styles/*.md | Active one loaded into system prompt |
What it computes
For each item:
- Token count (approximate via
wc -c / 4) - Loaded? (yes/no based on
alwaysLoad/ matched paths / active status) - Last invoked (from
.claude/hooks/.log/) - Recommendation: keep / defer / archive
Report format
# Context Budget Report — <date>
## Always-loaded (cost: <N> tokens)
- .claude/CLAUDE.md ████ 1840 tok keep
- .mcp.json: filesystem (alwaysLoad) ██ 920 tok keep
- .mcp.json: git (alwaysLoad) ██ 880 tok keep
- .mcp.json: github (alwaysLoad) ███ 1320 tok keep
## Sometimes-loaded (cost on trigger: <N> tokens average)
- skills/autopilot body 4200 tok invoked 12x this week keep
- skills/self-heal body 1800 tok invoked 4x keep
- skills/research body 1200 tok invoked 1x consider deferring (low usage)
## Never invoked (cost: 0 active, <N> at startup for frontmatter)
- skills/onboard frontmatter only not invoked in 30d consider archiving
- agents/specialists/doc-writer frontmatter only not invoked in 14d keep (low cost)
## MCP tool schemas (with Tool Search)
- chrome-devtools (deferred) 0 tok at start, ~3000 on first use
- playwright (deferred) 0 tok at start
- apify (deferred) 0 tok at start, ~8000 on first search
...
## Total
Startup cost: ~12,400 tokens (CLAUDE.md + agents + skill frontmatter + alwaysLoad MCPs)
Typical session: ~28,000 tokens (after a few skills triggered)
Budget headroom on 1M context: ~972,000 tokens
Recommendation: ✓ healthyRecommendations
- Defer (
alwaysLoad: falseon MCPs, or skill stays in dir but description trimmed) - Archive (move to
.claude/skills/.archive/— not loaded by Claude Code) - Trim (rewrite a verbose skill body to <500 lines)
- Consolidate (two similar skills → one)
Manual usage
/context-budget # generate the report to stdout
/context-budget --archive-stale # auto-archive items not used in 60d
/context-budget --by-cost # sort by token cost descendingCache facts (gap-audit G1/G5)
- "Cache hit rate dropping" is now measurable:
bash .claude/scripts/cost-report.sh daywritescache_hit_rateinto.claude/hooks/.log/cost-summary.json; the statusline showscache:N%and harness-doctor warns belowCACHE_HIT_MIN(default 40%). - TTL is ~5 minutes and not configurable from Claude Code. Turns spaced >5min apart re-pay the full cache write — keep unattended loops tight, and expect the first turn after an idle break to be cache-creation, not cache-read.
Hard rules
- Don't archive without invocation log. Use
.claude/hooks/.log/skill.log(when skill-router records triggers) as ground truth. - Never auto-archive agents. Always confirm with the user.
- Stale ≠ useless. Some agents (release, security) are rarely-but-critically used.
References
- affaan-m/ECC/skills/context-budget (source)
- Anthropic's progressive disclosure pattern (frontmatter cheap, body lazy)
- Claude Code Tool Search (deferred schemas)
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.

