context-budget
Skill2 starsChanged 4 days agoMITView on GitHub
During an active AI session, measure context pressure, apply configurable proportional warning and handover limits, and close phases before context is lost. Checkpoint contents and recovery belong to context-handoff; cumulative cost estimates belong to estimation. Short Q&A needs no persistent budget file.
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
- 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
- Rojios/everything-claude-codetheir 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 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
- felvieira/claude-skills-fv★ 28same name
- Fadi88/one-man-startup★ 16same name
- tellmefrankie/ai-investment-skills★ 14same name
- woxiangyangzhimao/skills★ 14same 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 repository41 other files it gives its agents.
- ai-trace-auditSkill
- ai-workspace-governanceSkill
- archive-maintenanceSkill
- branch-lifecycleSkill
- change-reviewSkill
- cloud-api-integrationSkill
- code-security-reviewSkill
- coding-conventionsSkill
- container-image-managementSkill
- context-handoffSkill
- deployment-patternsSkill
- docker-local-environmentSkill
- documentation-authoringSkill
- estimationSkill
- external-dependency-simulationSkill
- gitlab-webhook-local-gitSkill
- go-patternsSkill
- go-testingSkill
- grpc-proto-contractSkill
- guided-evidence-collectionSkill
- http-api-designSkill
- jenkins-pipeline-jjbSkill
- ldap-rbacSkill
- mysql-migration-safetySkill
- plan-designSkill
- plan-outlineSkill
- plan-reviewSkill
- playwright-e2eSkill
- project-contextSkill
- pytest-patternsSkill
- redis-patternsSkill
- release-readinessSkill
- role-bootstrapSkill
- skill-maintenanceSkill
- subtask-dispatchSkill
- systematic-diagnosisSkill
- task-implementationSkill
- test-strategySkill
- verification-gateSkill
- vue3-developmentSkill
- vue-testingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. 0 are common, 16 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 56 edited versions we read keep these.
16
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use context-handoff for what to save, where to keep it and how to resume.
- Distinctive: line 17
If unavailable, use the smallest evidenced window among applicable candidates and label it an estimate with its basis.
- Distinctive: line 21
When either input is unknown, close phases and checkpoint before large operations without claiming a threshold was crossed.
- Very specific: line 23
Use project warning R and working limit L.
- Very specific: line 25
If the host auto-compacts at A, keep L strictly below A, lowering R as needed.
- Distinctive: line 38
Before loading a large file or tool result, bound the read to relevant sections or a summary when the whole input could cross the limit.
- Distinctive: line 39
If its size is unknown, choose bounded reads rather than treating it as safe.
- Distinctive: line 46
Check in-flight execution first.
- Distinctive: line 48
Follow context-handoff takeover rules to verify, wait or use already authorised controls.
- Distinctive: line 50
Read back and verify that the checkpoint was saved before compaction or opening a replacement session.
- Distinctive: line 51
No writable location, failed write or incomplete read-back -> retain current history and saved material, report the unsaved gap, and do not …
- Distinctive: line 53
Use only an already authorised, supported host compaction or new-session mechanism.
- Very specific: line 56
After one compaction, verify success and obtain a fresh reading.
- Very specific: line 57
If pressure is still at or above R, use a new session through the same persistence and in-flight checks.
- Distinctive: line 65
Use only permitted, visible telemetry.
- Distinctive: line 67
Do not install hooks, change host configuration, poll in the background or assume this text controls host auto-compaction.
- Distinctive: line 68
Do not create a second state store or expand authority to send messages, stop tools or launch sessions.
- Very specific: line 71
No transition is complete while its execution state is unknown.
- Distinctive: line 76
No directly adopted external source.
- Distinctive: line 78
No scripts, hooks, absolute window sizes or host-specific guarantees are included.
- Distinctive: line 79
No third-party license file is required.
“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
Context budget
Decide when to warn, save and continue with less context. Use context-handoff for what to save, where to keep it and how to resume; reuse the project's existing state entry.
Measure
- Take the current model/session, effective window, latest occupancy reading and its sampling time/meaning, project thresholds, host compaction limits and in-flight state.
- Window
W: use the host's current display or applicable project configuration, accounting for host reservations. If unavailable, use the smallest evidenced window among applicable candidates and label it an estimate with its basis; no known minimum means unknown. Recalculate when the model, host or window configuration changes. - Occupancy
C: use current context usage, not cumulative billing, subscription allowance, cache hit rate or child-agent usage. Missing, stale or post-compaction empty readings mean unknown, never zero; do not invent a percentage from message counts or intuition. When either input is unknown, close phases and checkpoint before large operations without claiming a threshold was crossed. - With compatible readings, pressure is
C / W; label measured versus estimated values and keep their basis and sample time in existing state. - Use project warning
Rand working limitL; otherwise default toR = 0.60,L = 0.80, with0 < R < L < 1. These are configurable working lines, not official model limits. If the host auto-compacts atA, keepLstrictly belowA, loweringRas needed. Reserve room for the checkpoint, output/reasoning and pending tool results; reaching the hard window is too late. Invalid thresholds or insufficient margin -> checkpoint now and report the gap; do not continue on an invalid budget. UnknownA-> record the uncertainty and checkpoint early; do not promise to precede host compaction. - Each parent and child session has its own window, readings and warning cycle; never pool them into one occupancy ratio.
Act at a useful boundary
- Warning: on first reaching
R, report pressure, uncertainty, current phase and checkpoint location through the existing communication surface. Warn once per cycle, but always report escalation toL; reset the cycle after a verified successful transition or a confirmed model/window change. In unattended work, write the notice in authorised task state or the receipt and continue the applicable branch without waiting for a reply. A warning creates no approval step. - Working limit: at
L, or before an operation expected to cross it, open no new complex branch; reach a safe point and follow "Preserve before transition". Before loading a large file or tool result, bound the read to relevant sections or a summary when the whole input could cross the limit. If its size is unknown, choose bounded reads rather than treating it as safe. - Phase complete: deliver verified results and refresh any needed continuation checkpoint even below
R. A completed task ends normally; otherwise continue authorised work when capacity permits. Phase closure alone does not require compaction or a new session, and short Q&A creates no state file.
Preserve before transition
- Check in-flight execution first. A subtask or tool running or in an unknown state -> do not compact or change session. Follow context-handoff takeover rules to verify, wait or use already authorised controls; pressure grants no permission to stop work.
- Save through context-handoff to the project's authorised, successor-readable location. Read back and verify that the checkpoint was saved before compaction or opening a replacement session. No writable location, failed write or incomplete read-back -> retain current history and saved material, report the unsaved gap, and do not transition. A copyable continuation note may expose the gap; it is not proof of persistence.
- Use only an already authorised, supported host compaction or new-session mechanism. Without that capability, report the checkpoint entry and the remaining continuation action; never claim it ran. A saved checkpoint does not itself grant session-creation permission.
- After one compaction, verify success and obtain a fresh reading; never infer success or zero occupancy from a request acknowledgement.
If pressure is still at or above
R, use a new session through the same persistence and in-flight checks; do not compact repeatedly. An absent fresh reading remains unknown: retain the continuation entry and use phase-based closure, without retrying compaction in a loop. Failed compaction -> preserve the prior checkpoint and available history, report the actual state and use the supported continuation route. - Resume through context-handoff, checking current facts and authorisation before work. Reset the cycle after a verified successful transition or a confirmed model/window change; retain cumulative cost records separately.
Boundaries and completion
Use only permitted, visible telemetry; do not read credential files or their contents to obtain measurements. Checkpoints must contain no secrets, passwords, authentication tokens or contents from credential paths; record safe evidence locators only. Do not install hooks, change host configuration, poll in the background or assume this text controls host auto-compaction. Do not create a second state store or expand authority to send messages, stop tools or launch sessions.
Completion means the notice or phase result and any required checkpoint are verifiable, with unknown readings, unsaved gaps and the next action explicit.
No transition is complete while its execution state is unknown.
Routine measurement suits low/low; uncertain capacity or transition failures suit normal/high, resolved through the project's resource mapping.
Sources
- No directly adopted external source; this package defines an own-authored proportional scheduling policy.
- Wording and decision flow are own-authored, pending host behaviour verification; general context-budgeting ideas inform the policy. No scripts, hooks, absolute window sizes or host-specific guarantees are included. Checkpoint and recovery contracts remain in context-handoff.
- No third-party license file is required; the root LICENSE applies.
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.

