agentleFS
ProjectWajaProjectWaja/claude-skillcraft/skills/context-budget/SKILL.md

context-budget

Skill0 starsChanged 6 months agoMITView on GitHub

Enforces token discipline — scoped searches, targeted reads, summarized results, and subagent delegation for heavy research.

54 other projects use a version of this.

Adopted by

Most recently taken up by

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.
  • 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 6 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 5 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 9 projects that use this

  • 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 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 11 projects that use this

  • loulanyueSkill

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

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 50 edited versions we read keep these.

  • 4

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

    Start with the most specific query that could work.

    line 30
  2. Very specific:

    Prefer grep/glob with a path or file-type filter over a repo-wide sweep.

    line 31
  3. Very specific:

    Use files_with_matches mode first.

    line 32
  4. Distinctive:

    Read a file once. Don't re-read to "verify" an edit — the edit tool already confirms success.

    line 37
  5. Very specific:

    Don't read generated files, lockfiles, node_modules, or build output unless the task is about them.

    line 38
  6. Very specific:

    Never paste large command output back to the user.

    line 42
  7. Very specific:

    When reporting findings, give the answer and the file:line pointer — not the full source.

    line 43
  8. Distinctive:

    If a question needs more than ~3 search rounds, spawn a subagent (Explore or general-purpose).

    line 48
  9. Distinctive:

    Before a large read or search, ask: *"What specific question does this answer, and is there a cheaper way to answer it?"* If you can't name …

    line 66

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

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

Context Budget

Context is a finite, billable resource. Spend it like money. The goal is the most progress per token, not the most thorough sweep.

When This Skill Activates

This skill applies to every session, but especially when:

  • Exploring an unfamiliar codebase
  • Searching for where something is defined or used
  • Reading files to answer a question
  • Running commands whose output could be large (logs, test runs, find, git log)
  • Research that spans many files or repos

The Rules

1. Search narrow, then widen

  • Start with the most specific query that could work. Widen only if it misses.
  • Prefer grep/glob with a path or file-type filter over a repo-wide sweep.
  • Use files_with_matches mode first; pull full content only for the files that matter.

2. Read what you need, not the whole file

  • For a known symbol, read the relevant range, not the entire file.
  • Read a file once. Don't re-read to "verify" an edit — the edit tool already confirms success.
  • Don't read generated files, lockfiles, node_modules, or build output unless the task is about them.

3. Summarize, don't dump

  • Never paste large command output back to the user. Pipe through head, grep, or a count.
  • When reporting findings, give the answer and the file:line pointer — not the full source.
  • Truncate logs to the relevant window. Nobody needs 500 lines of stack trace to see one error.

4. Delegate heavy research to subagents

  • If a question needs more than ~3 search rounds, spawn a subagent (Explore or general-purpose).
  • The subagent's large intermediate reads stay out of the main context; only its summary returns.
  • Give the subagent a tight question and ask for a short report.

5. Prefer cheap signals before expensive ones

  • git log --oneline -10 before reading diffs. Directory listing before reading files.
  • A type-check or single test before the full suite, when you only need a quick signal.

Anti-Patterns

  • Reading 10 files "to get context" before knowing which one matters.
  • Running a command, getting 2,000 lines, then reading all of it.
  • Re-grepping the same term with slightly different spellings instead of one good regex.
  • Dumping an entire config/schema into the conversation to reference one field.

The Test

Before a large read or search, ask: "What specific question does this answer, and is there a cheaper way to answer it?" If you can't name the question, don't spend the tokens.

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.