agentleFS
m1ngam1nga/skills/context-budget/SKILL.md

context-budget

Skill2 starsChanged 3 months agoMITView on GitHub

Reduce repeated reading and implementation work while preserving the requested result. Use for incremental research or RedBot saved-library updates, large tool output, repeated source/history reads, token costs, 省 token / 上下文消耗, and Ponytail reuse checks before implementation.

69 other projects use a version of this.

Adopted by

Most recently taken up by

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.
  • renepfSkill

    orch-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

  • TironFoxSkill

    agent-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

  • TironFoxSkill

    openclaw-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

  • loulanyueSkill

    nuxt4-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

  • renepfSkill

    config-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-labsSkill

    token-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

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 64 edited versions we read keep these.

  • 2

    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
  1. Distinctive:

    When there is no suitable built-in comparison for two local record snapshots, use snapshot comparison.

    line 25
  2. Very specific:

    Keep a short observable record in the existing task: the component considered, the reuse/adapt/reject decision and the real entry-point …

    line 31
  3. Distinctive:

    When requested, show the observed reuse decision and the check that passed through the real entry point.

    line 33

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Context Budget

Reach the requested result with less irrelevant context and less repeat work. Preserve the evidence, scope, permissions and checks that make the result usable.

Enter through the existing workflow

When the host has enabled this skill for relevant work, apply it at the natural task entry without waiting for the user to repeat its name. Installation and implicit invocation make the skill available; they do not prove a running agent loaded it. Keep routing in the host's existing instruction entry point, not a new timer, agent or background service. An explicit invocation always applies. Keep small answers and trivial edits direct.

For repeated research, including RedBot collection updates, use the incremental workflow. Before implementation, perform the Ponytail reuse check below. Do not start a benchmark on every run: reuse a validated route and measure again when the source shape, implementation or acceptance requirements materially change.

Choose the expensive step

Start from the current goal, the existing result and the smallest evidence needed for the next decision. Identify whether the cost comes from reading sources, tool output, repeated history, implementation and rework, or the response. Make one targeted change first. Small requests usually need direct work.

  • Repeated sources: use an existing index, Git diff or stable IDs and versions. Compare the whole agreed scope with code. Send counts, changed references and exceptions to the model, then read the necessary original material. Keep a separate record of what was actually reviewed. Check an unversioned source when its freshness matters. A previously seen ID is not evidence that its contents were read or accepted.
  • Large tools and logs: select relevant fields, files and line ranges before loading the output. Preserve failure status and enough surrounding evidence to explain it. Keep original output retrievable. Expand the read when a missing definition, changed authority, hidden error or unclear boundary could change the decision.
  • Long handoffs: carry current intent, active constraints, source versions, unresolved decisions and the exact next step from the authoritative task record. Reuse existing memory and owner records. Split work only when authorized and when the added context and coordination pay for themselves.
  • Long responses: give the result and decision-relevant evidence first. Retain exact identifiers, reasoning needed for a decision, and material uncertainty.

When there is no suitable built-in comparison for two local record snapshots, use snapshot comparison. Its helper reports a bounded delta with recoverable source references. An item missing from a partial scan remains unresolved.

Ponytail reuse check

Before writing or rebuilding, find the existing implementation and read the actual entry point, affected callers and the required output. Reuse a compatible working component, source project or platform feature when it saves adaptation and maintenance. Check the source version, license and fit when adapting external material. Prove one representative slice with real inputs before expanding. If reuse makes the full job harder, change the smallest part that reaches the outcome.

Keep a short observable record in the existing task: the component considered, the reuse/adapt/reject decision and the real entry-point check. Calling an approach "Ponytail" or reading its instructions is not execution evidence. Preserve surrounding error handling when moving or combining code.

When requested, show the observed reuse decision and the check that passed through the real entry point. Preserve required behavior, accessibility, failure recovery, data and security checks. Apply the check to the current task.

Measure when it matters

For a usage claim, a costly workflow or a comparison, read measurement. Compare equivalent completed tasks. Report measured payload size, actual tokens, wall time and official subscription usage as separate quantities. Keep cache reuse and extra setup, verification and retries in view. Keep provider and account settings under their existing authority.

Adopt an optimization only after the same acceptance checks pass. Missing source evidence, a changed conclusion caused by omitted material, extra recovery work or slower completion must be reported and resolved; restore the needed context or narrow the change. One paired run supports that case, not a universal percentage or a guarantee of unchanged quality.

A short excerpt is sufficient only when it supports the decision. Use the original for exact quotations, new or contested evidence, approvals and release verification. Deliver the requested result and the relevant evidence once the necessary checks pass.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.