context-budget
Skill4 starsChanged 9 days agoMITView on GitHub
Measure how many tokens agent context files cost (CLAUDE.md, AGENTS.md, Cursor rules, prompt files), find references in them to files or npm scripts that no longer exist, and plan a trim to a token budget. Use when asked how big these files are, whether they are stale or out of date, or to shrink them. Runs the offline ctxcap CLI with npx.
69 other projects use a version of this.
Adopted by
Most recently taken up by
- KevinLoichot/everything-claude-codetheir own version, first seen Nov 29, 2026
- aayushsoam/clawbot-plustheir own version, first seen Nov 29, 2026
- satvikgbusiness-jpg/Claude-skillstheir own version, first seen Nov 29, 2026
- trac3r00/core-skillstheir own version, first seen Nov 29, 2026
- m1nga/skillstheir own version, first seen Nov 29, 2026
- zhengyanxiong/skillstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use orch-pipeline, agent-payment-x402 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.
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 5 projects that use this
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 8 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 7 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 12 projects that use this
renepfSkillconfig-gc
Garbage collection for your Claude Code configuration. Periodically scans ~/.claude (skills, memory, hooks, permissions, MCP servers, caches) for redundant, stale, orphaned, or low-value items, then walks the user through a confirm-each-deletion cleanup. Use when the user says "clean up my config", "config GC", "too many skills", "audit my setup", "my .claude is bloated", or asks for a periodic config review.
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 13 projects that use this
- +2 more from renepf
Other versions69 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 69
- misskey-dev/misskey★ 11ksame name
- poshan0126/dotclaude★ 871same name
- OneWave-AI/claude-skills★ 378same name
- coco-research/coco★ 324same name
- loulanyue/awesome-claude-notes★ 272same name
- Fmarzochi/EGC★ 61same name
- felvieira/claude-skills-fv★ 29same name
- Fadi88/one-man-startup★ 16same name
- tellmefrankie/ai-investment-skills★ 14same name
- woxiangyangzhimao/skills★ 14same name
59 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.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/ctxcap.mdcCursor rule
- llms.txtllms.txt
- ctxcapSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.
0
Common
Most of the 64 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
If it moved, fix the reference.
- Distinctive: line 39
Only when the user asks to get under a token budget.
- Very specific: line 42
If satisfiable is false, report minAchievable and stop.
- Very specific: line 47
Verify: npx -y ctxcap --verify <planId>.
“Common” is measured: kept by at least 6 in 10 of the 64 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 with ctxcap
ctxcap is an offline CLI. It needs Node 20 or newer and no API key or
config. Run it from the repository root. Counts are approximate (o200k_base
encoding), so compare changes rather than absolute numbers.
Measure
npx -y ctxcap --jsonReport total and each entry in files (path, tokens, delta). delta
is the change against ctxcap-baseline.json; without a baseline it is the
whole size. Add --compare to place the largest file at a percentile in the
Context Budget Index, which is a more useful sentence than a raw count.
Find stale references
npx -y ctxcap --stale --jsonEach entry in findings names a dead reference in ref and its place in
path, startLine, and endLine. Before you change anything, confirm that
the reference is really gone: search for the file or script under a new name.
If it moved, fix the reference. Delete the line only when the thing it
describes no longer exists. A run with no findings means no path or
npm run script failed to resolve; it does not mean the file is current.
Trim to a budget
Only when the user asks to get under a token budget.
- Plan:
npx -y ctxcap --plan --budget <n>. - If
satisfiableis false, reportminAchievableand stop. - Edit by
startLine/endLinefrom eachplanentry. Never rewrite a context file from memory. Never cut a span listed inpreserve; the one exception is acondenseentry on that span, where you apply itscondensedTextexactly as given. - Verify:
npx -y ctxcap --verify <planId>. The budget is met only whensatisfiedis true andviolationsis empty. - Show the user the
git diffand let them decide. Do not commit it for them.
Saved plans are local temporary state and expire after 24 hours; a
PLAN_EXPIRED error means you make a new plan. Do not run --apply in CI.
Keep it from growing back
Offer these once, do not set them up unasked:
npx -y ctxcap --update-baseline, then commitctxcap-baseline.json.- The GitHub Action
Naeha-S/ctxcap@v1withfail-on: increase, which comments the token change on each pull request.
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.

