context-budget
Skill28 starsChanged 3 months agoApache-2.0View on GitHub
Mede e reduz o peso de contexto carregado pelo agente. Trigger em: "contexto inchado", "context overflow", "quanto contexto estou usando", "sessao lenta", "respostas degradadas", "context budget", "tokens carregados", "custo fixo de contexto", "overhead de rules", "overhead dos agents", "impacto do MCP no contexto", "headroom de contexto".
60 other projects use a version of this.
Adopted by
Most recently taken up by
- Lucface/claude-skillstheir own version, first seen Nov 16, 2026
- yuanJewel/skillstheir own version, first seen Nov 16, 2026
- hmohammed7/claude-skillstheir own version, first seen Nov 16, 2026
- 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
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
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
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
loulanyueSkillsanta-method
Multi-agent adversarial verification with convergence loop. Two independent review agents must both pass before output ships.
Also in 9 projects that use this
Other versions60 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 60
- 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
- Fadi88/one-man-startup★ 16same name
- tellmefrankie/ai-investment-skills★ 14same name
- woxiangyangzhimao/skills★ 14same name
- mxrsv/agents-skills★ 11same name
50 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 repository92 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- po-feature-specSkill
- ui-ux-designSkill
- backend-apiSkill
- frontend-integrationSkill
- qa-testingSkill
- security-reviewSkill
- deploy-dockerSkill
- context-managerSkill
- orchestratorSkill
- documenterSkill
- reviewerSkill
- motion-designSkill
- marketing-copySkill
- seo-specialistSkill
- mobile-tauriSkill
- image-generatorSkill
- repo-auditorSkill
- asset-librarianSkill
- observability-sreSkill
- data-analyticsSkill
- accessibility-specialistSkill
- migration-refactor-specialistSkill
- release-managerSkill
- ai-integration-architectSkill
- prompt-engineerSkill
- video-integration-specialistSkill
- claude-md-generatorSkill
- design-intelligenceSkill
- cost-trackerSkill
- session-summarySkill
- smart-suggestionsSkill
- detective-specSkill
- static-analysisSkill
- skill-authorSkill
- web-asset-generatorSkill
- tdd-engineerSkill
- architecture-deepenerSkill
- program-routerSkill
- parallel-dispatcherSkill
- blog-publisherSkill
- blog-screenshotSkill
- canary-deploymentSkill
- zoom-outSkill
- handoff-contextSkill
- post-deploy-canary-monitorSkill
- pattern-conformitySkill
- research-prepSkill
- direct-response-copySkill
- ux-researchSkill
- ui-polishSkill
- doubt-driven-reviewSkill
- video-analysisSkill
- marketing-reporting-analyticsSkill
- responsive-conversionSkill
- mobile-ux-foundationsSkill
- i18n-localizationSkill
- closed-loop-revenueSkill
- app-reference-architectureSkill
- The first 60 shown.
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 56 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 78
Use o limite efetivo da janela do modelo fornecido pelo host, se disponível.
“Common” is measured: kept by at least 6 in 10 of the 56 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
Skill 49 — Context Budget
Objetivo
Auditar o peso observável de contexto carregado nesta sessão: instruções raiz, saída de hooks, regras ativas, skills invocadas e catálogo de tools MCP habilitadas. Não confunda bytes em disco com tokens enviados ao modelo.
Distinção crítica:
- Skill 30 (
cost-tracker) → rastreia tokens/$ gastos em runtime (completions, tool calls) - Skill 49 (
context-budget) → audita tokens carregados no contexto antes de qualquer completion (system prompt, CLAUDE.md, rules, skills, MCP descriptions)
Quando usar
- Sessão com latência alta ou model degradation (possível context overflow)
- Repo novo com
.bot/— auditoria do que foi instalado - Antes de habilitar novo MCP server ou subagent
- Após instalar rules system path-scoped — verificar overhead real
- Quando
/savingsmostrar contexto inchado
Protocolo
Fase 0 — Identificar componentes carregados
Listar o que está no contexto da sessão:
1. Instruções raiz efetivamente carregadas (AGENTS.md/CLAUDE.md, global e projeto, conforme host)
2. Catalogo de skills do plugin: name + description de TODAS as skills habilitadas (todo turno; nao e lazy)
3. Body de SKILL.md / subagents invocados nesta sessao (lazy — so os disparados)
4. Rules path-scoped ativas nesta tarefa
5. Descrições/schema de tools MCP realmente anunciadas pelo host (todo turno, por servidor enabled)
6. Contexto adicional emitido por hooks, arquivos lidos e histórico desta sessãoFase 1 — Estimar peso por componente
Estimar tokens somente para componentes observados, com caracteres ÷ 4 como proxy explícito:
- Bytes no arquivo medem armazenamento, não provam que o host carregou aquele arquivo.
scripts/skill-catalog-budget.mjsescripts/skill-health.mjsreportam inventário local em chars e bytes; seus tokens são proxy, não medição.- Descrições/schema de MCP ou agents são diferentes dos corpos completos em
agents/*.md; sem catálogo runtime, reportar como não mensurado. - Histórico, prefixo de sistema e cache do provedor exigem telemetria da sessão para medição real; não inventar percentual de headroom.
Para separar as camadas:
- Em disco: bytes UTF-8 dos arquivos conhecidos.
- Inventário de catálogo:
name + descriptionencontrados no frontmatter; não afirmar que o host injetou todos. - Payload observado: capture o JSON do hook e passe
--observed <arquivo>aos scripts; contesystemMessage/additionalContext. - Host não exposto: MCP, prefixo, cache, histórico e skills não anunciadas permanecem “não mensurados”.
Não execute --apply durante uma auditoria. A compactação pode descartar triggers; revise o relatório e rode os evals antes de qualquer mudança.
Fase 2 — Categorizar por urgência
| Categoria | Fonte | Como medir |
| Sempre presente quando o host carrega | Instruções raiz, name+description de cada skill do plugin, schema das tools MCP enabled | Medir os arquivos/payloads reais. Catalogo do kit: node scripts/skill-catalog-budget.mjs |
| Sob demanda | Body do SKILL.md e corpos de subagents invocados | Verificar os invocados |
| Path-scoped | .claude/rules/*.md | Verificar paths/globs ativados |
| Histórico | Conversa acumulada | Consultar telemetria do host |
Fase 3 — Relatório de budget
Reporte, quando observável, caracteres e estimativa por fonte: instruções raiz (global/projeto), saída real dos hooks, skills invocadas, rules ativas e catálogo MCP habilitado. Informe separadamente o que está apenas em disco e o que o host não expôs. Use tamanho de janela do modelo somente se comprovado pela sessão; sem isso, não estime headroom nem use tabelas fictícias como evidência.
Fase 4 — Alertas de overflow
Use o limite efetivo da janela do modelo fornecido pelo host, se disponível. Calcule alertas em 80% e 95% da janela medida; sem limite ou histórico da sessão, apenas descreva crescimento observado, sem declarar overflow.
Sinais de overflow iminente:
- Respostas ficam genéricas ou "esquecem" instruções anteriores
- Tool calls começam a falhar com erros estranhos
/savingsmostra context_tokens subindo exponencialmente
Ações corretivas: reduza leitura/reinjeção desnecessária; carregue skill e rule quando o alvo justificar; desabilite MCP não usado apenas após verificar os ativos e obter aprovação para modificar configuração. Para histórico longo, compacte de forma controlada ou abra sessão nova com handoff. Não altere agentes globais baseado só no inventário de arquivos.
Integração com kit
- Invocar após
/savingsquando contexto parecer inchado - Invocar antes de habilitar novo MCP server
- Usar em conjunto com skill 30 (cost-tracker) para visão completa: custo fixo (contexto) + custo variável (completions)
- Output de Fase 3 pode ser salvo em
memory/context-budget-YYYY-MM-DD.md
Exemplo de invocação
Skill({ skill: "dev-team-kit-fv:49-context-budget" })
// Carrega playbook; agente executa Fases 0-3 e reportaOu via comando:
/context-budgetDoes 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.

