context-budget

Featured

Use when a coding session is burning context fast, output is drowning in noise, the model keeps forgetting earlier decisions, or the user asks to reduce tokens, stop the verbose narration, work in a huge repo, or make a long session survive. Covers what to read, what to summarize, what to write to disk, and when to start fresh.

AI & Automation 307 stars 53 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
83
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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: ```bash 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...

Details

Author
OneWave-AI
Repository
OneWave-AI/claude-skills
Created
11 months ago
Last Updated
3 days ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category