context-budget
Skill0 starsChanged 5 months agoMITView on GitHub
Audits what is currently consuming the context window — system prompt, tool definitions, conversation history, attached files, retrieved docs — locates the bloat, and cuts or compresses the lowest-value tokens, treating context as a finite budget to be spent deliberately. Use this skill when the user says "context is full", "what's eating my context", "prune this prompt", or "make this cheaper/faster"; when runs feel slow or costly; when too many tools or huge files are loaded; or whenever you need to reclaim room before continuing.
54 other projects use a version of this.
Adopted by
Most recently taken up by
- 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
- zedarvates/frugal-skillstheir own version, first seen Nov 8, 2026
- pankaj-mahaur/Agent-Daemontheir own version, first seen Nov 6, 2026
- coco-research/cocotheir own version, first seen Nov 1, 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 versions54 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 54
- 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★ 27same name
- Fadi88/one-man-startup★ 16same name
- tellmefrankie/ai-investment-skills★ 14same name
- woxiangyangzhimao/skills★ 14same name
44 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 repository16 other files it gives its agents.
- assumption-auditSkill
- cite-checkSkill
- compactSkill
- confidence-tagSkill
- devils-advocateSkill
- distillSkill
- first-principlesSkill
- handoffSkill
- pre-mortemSkill
- red-teamSkill
- rubber-duckSkill
- scope-cutterSkill
- scratchpadSkill
- self-consistencySkill
- steelmanSkill
- teach-backSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 50 edited versions we read keep these.
2
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 8
Treat the context window as a finite budget: see where the tokens go, then cut or compress the lowest-value ones first.
- Distinctive: line 24
Cut dead weight: Remove tool definitions you won't use, files read once and finished with, stale retrieved docs, and tool outputs already …
“Common” is measured: kept by at least 6 in 10 of the 50 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
Treat the context window as a finite budget: see where the tokens go, then cut or compress the lowest-value ones first.
When to use
- The window is near full and you need headroom to keep working.
- Runs feel slow, expensive, or the model seems to be "losing track" (context rot).
- A prompt, tool set, or set of attachments has grown bloated over time.
- The user asks what's consuming context or to optimize token usage.
When NOT to use
- The context is small and well within budget — don't optimize prematurely.
- Cutting would remove genuinely load-bearing information (then
compactorscratchpadinstead — relocate, don't delete). - The real problem is a missing summary, not bloat — reach for
compact.
The method (numbered, concrete — the heart)
- Inventory the consumers. Account for each category and roughly how much it costs: system prompt, tool/function definitions, conversation history, attached/read files, retrieved docs, and prior tool outputs.
- Rank by value density. For each chunk ask: how likely is this to be needed for the remaining work, per token it costs? Low-likelihood, high-token chunks are the first targets.
- Cut dead weight. Remove tool definitions you won't use, files read once and finished with, stale retrieved docs, and tool outputs already acted upon.
- Compress the rest. Replace full files with the relevant excerpt; replace verbose history with a
compactsummary; replace big results with their conclusion plus a pointer. - Right-size the toolset. Fewer, well-chosen tools beat a giant menu — every definition costs tokens and dilutes attention. Load tools on demand rather than all upfront.
- Push bulk out of the window. Move reference material to files and pull it back on demand (see
scratchpad) instead of keeping it resident. - Tighten the system prompt. Aim for the "right altitude" — specific enough to guide, not a bloated rulebook. Delete redundant, contradictory, or never-triggered instructions.
- Re-measure. Confirm headroom was reclaimed and nothing load-bearing was lost, then continue.
What good looks like
- You can name the top 3 token consumers and justify each one's keep/cut/compress call.
- The biggest savings came from the highest-token, lowest-value chunks — not from nibbling.
- Nothing essential was deleted; it was relocated to a file or a summary instead.
- The toolset is minimal-sufficient; the system prompt is lean and non-redundant.
Anti-patterns
- Trimming the cheap stuff — shaving a short prompt while a 5,000-line file sits ignored in context.
- Deleting instead of relocating — losing information that's needed later instead of offloading it.
- Tool sprawl — loading dozens of tool definitions "just in case", taxing every single turn.
- Pasting whole files — when one function or section was all that mattered.
- Optimizing once and forgetting — budget is a running concern; re-check as the session grows.
Example (short, vivid)
"Context is full and it's crawling." Quick audit:
| Consumer | Tokens | Verdict |
| 3 large files read earlier | ~18k | Cut — task moved on; keep paths only |
| 22 tool definitions | ~6k | Trim — only 4 used this session |
| Raw stack-trace dumps ×5 | ~4k | Compress — keep the one root cause |
| Conversation history | ~12k | Compact — summarize to ~2k |
| System prompt | ~1k | Keep |
Result: ~40k reclaimed by attacking the few fat, low-value chunks — the small system prompt was left alone.
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.

