context-budget

context-budget is a skill for Claude Code, Codex from OneWave-AI/claude-skills. It costs 73 tokens per session (886 once invoked), scanned A, original, MIT.

A guide for managing the limited amount of text an AI coding session can use. It recommends targeted file searches, shorter command output, and writing important decisions down.

In plain words
What is it for?
It helps work in large repositories, reduce token use, and keep long coding sessions usable.
Why use it?
Long files, noisy commands, and unnecessary narration can crowd out information the agent still needs. This keeps extended work focused and reduces forgotten decisions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps work in large repositories, reduce token use, and keep long coding sessions usable.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/onewave-ai/claude-skills/context-budget
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add OneWave-AI/claude-skills --skill context-budget
Clone the repo
git clone --depth 1 https://github.com/OneWave-AI/claude-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-budget

README.md
[![agentmods](https://agentmods.dev/badge/skills/onewave-ai/claude-skills/context-budget/github.svg)](https://agentmods.dev/skills/onewave-ai/claude-skills/context-budget)
Your own site
<a href="https://agentmods.dev/skills/onewave-ai/claude-skills/context-budget"><img src="https://agentmods.dev/badge/skills/onewave-ai/claude-skills/context-budget/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for context-budget

Your own site · 80×15
<a href="https://agentmods.dev/skills/onewave-ai/claude-skills/context-budget"><img src="https://agentmods.dev/badge/skills/onewave-ai/claude-skills/context-budget.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 886 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.00886
Opus 5.5 $0.00029 $0.00354
Sonnet 5.5 $0.00015 $0.00177
Haiku 4.5 $0.00007 $0.00089

Measured 26d ago against content hash 1183ad018835, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

context-budget scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 26d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

context-budget/SKILL.md · 77 lines

How it starts

The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context Budget

Context is the scarcest resource in a long session. It gets spent on three things: files you read, output you generate, and narration nobody asked for. Only the first one is usually worth it.

Core Behavior

Treat the context window like a budget with a balance. Before any expensive action — reading a big file, running a chatty command, dumping a directory tree — ask what the cheapest way to get the same answer is.

Spend Rules

Read narrowly. sed -n '120,190p' file.ts beats reading a 2,000-line file to see one function. Grep for the symbol, then read the 40 lines around it. Read a whole file only when you are about to restructure it.

Search before reading. grep -rn "symbolName" --include="*.ts" costs a few hundred tokens and tells you which of forty files matters.

Silence the noisy commands. Pipe installs, builds, and test runs through a filter instead of dumping them whole:

npm test 2>&1 | tail -30
npm run build 2>&1 | grep -E "error|Error|warning" | head -20
npm install --silent 2>&1 | tail -5
git diff --stat            # not git diff, unless you need the hunks

A passing test suite needs one line of proof, not 400.

Write instead of remembering. Anything that must survive — a plan, a decision, a list of files to touch — goes in a file on disk. Files are re-readable at a cost you choose; context is not.

Do not re-read what you just wrote. If an edit succeeded, it succeeded. Re-reading to "verify" is pure spend.

Cut the narration. No preamble, no recap of what was just shown, no bulleted summary of a diff the user can see. Say what changed and what is next, in a line or two.

Where the Budget Actually Goes

When a session bloats, it is almost always one of these:

Leak Fix
Whole-file reads for one function grep, then a line-ranged read
Full npm install / build logs | tail -n or grep for errors
Directory listings of node_modules, dist, .next prune them in the find/ls
Re-reading files after editing trust the edit result
Long explanations of finished work one line
Pasting a file back to show a small change show the diff hunk only
Repeating the plan every turn plan lives in a file

Read the full file on GitHub · 77 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 26d ago First seen · 77 lines · 73 tokens per session scan A 1183ad018835

Subscribe to this mod's changes

context-budget is a skill published in the GitHub repository OneWave-AI/claude-skills (348 stars, last pushed 14d ago), licensed MIT. It adds 73 tokens to every session and 886 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-20.

Related

Other skills, from other repositories

magic-compact

Compact this Claude Code session.

aerovato/magic-compact · 10 tokens

skill-status

A study-progress companion that reads a saved JSON file to remember your learning plan, progress, predictions, and past notes between sessions.

XBuilderLAB/cheat-on-skill · 95 tokens

audit-context

Measures where a project's Claude context is going before applying any of clean-context's levers. Reports what Glob discovers with and without ignore files applied, the twenty largest files in the repo and which are generated, the cumulative size of every CLAUDE.md loaded for this working directory, and how many MCP…

Malo-T/claude-toolbelt · 218 tokens

dream

A read-only review of project memories, notes, instructions, documents, and selected session records that produces a detailed report and a browser-viewable HTML report. It suggests ideas and insights but does not apply changes.

timoncool/dream-skill · 0 tokens

takenotes

Saves durable knowledge into permanent storage — typed memory, CLAUDE.md, or a docs/ file — and corrects anything already stored that has gone stale. Handles both a single fact and a whole-session harvest. Use when the user says "takenotes", asks you to remember or record something, asks you to save what was learned…

cabaynes/charles-claude-skills · 149 tokens

putdown

Writes a session handoff file that a fresh Claude Code session reads via /pickup, harvests durable knowledge into memory and CLAUDE.md (via /takenotes when installed), then commits and pushes all session work. Use when the user says "putdown", when ending or stepping away from a working session, or when the context…

cabaynes/charles-claude-skills · 98 tokens