context-minimization
Skill6 starsChanged 4 months agoApache-2.0View on GitHub
Use when a task runs long and the context window is filling -- large files are being read whole, command output is flooding the transcript, or responses are getting verbose and slow.
- Installs packages
In this repository116 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/graphify/references/CLAUDE.mdCLAUDE.md
- agent-config-security-auditSkill
- agent-harness-designSkill
- agent-readable-docsSkill
- agent-runtime-patternsSkill
- agent-session-forensicsSkill
- ai-regression-testingSkill
- ai-slop-cleanerSkill
- api-doc-reviewSkill
- architecture-decision-recordsSkill
- architecture-simplificationSkill
- ask-claudeSkill
- ask-codexSkill
- ask-geminiSkill
- autonomous-delivery-pipelineSkill
- baseline-comparison-reviewSkill
- bigquery-cost-auditSkill
- brainstormingSkill
- browser-automation-safetySkill
- bug-huntSkill
- build-fix-minimal-diffSkill
- canonical-advisor-routingSkill
- change-impact-checkSkill
- changelog-generatorSkill
- ci-failure-readoutSkill
- codebase-migration-batchesSkill
- context-compressionSkill
- context-docsSkill
- context-retrieval-loopSkill
- data-qualitySkill
- dataset-split-reviewSkill
- dbt-incremental-strategy-auditSkill
- dbt-preflightSkill
- dbt-strategySkill
- dead-code-removalSkill
- defuddleSkill
- dependency-cleanupSkill
- deploy-pipeline-runbookSkill
- dispatching-parallel-agentsSkill
- doc-consistency-checkSkill
- environment-doctorSkill
- experiment-tracking-reviewSkill
- failure-triageSkill
- filesystem-mcp-guardrailsSkill
- finishing-a-development-branchSkill
- flaky-test-investigationSkill
- gh-address-commentsSkill
- github-ci-failure-triageSkill
- graphifySkill
- handoff-disciplineSkill
- hard-won-skill-extractorSkill
- hook-safety-reviewSkill
- incident-readoutSkill
- incremental-migrationSkill
- json-canvasSkill
- local-rag-mcpSkill
- log-driven-diagnosisSkill
- managed-codebase-contextSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Before reading: search, do not slurp: Never read a 2,000-line file whole.
- Distinctive: line 31
While reading: parallelize, do not serialize: If you need to inspect 3 files, issue 3 reads/searches in a single turn rather than one per …
- Distinctive: line 41
When outputting: stay terse: Do not explain what a tool does before calling it unless safety requires it.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Purpose
Your context window is the most precious resource. Large contexts make you slow, expensive, and prone to hallucinations. Treat every token read or written as a cost, and apply a continuous discipline: read less, output less, keep the window lean.
When to Use
- Continuously during any long, multi-step task
- About to open a large file (hundreds or thousands of lines)
- A command is about to emit massive logs (installs, verbose builds)
- Responses are drifting into explanation and restatement
Inputs
- The current task and the files/commands it requires
- Awareness of which files are large enough to need targeted reads
Workflow
Before reading: search, do not slurp. Never read a 2,000-line file whole. Locate the relevant region first, then read only that range.
grep -n "functionName" src/module.ts # find the line numbersThen read only the surrounding window (e.g. lines 120-160), not the entire file.
- While reading: parallelize, do not serialize. If you need to inspect 3 files, issue 3 reads/searches in a single turn rather than one per turn. Fewer turns means less context repetition.
When running commands: silence the noise. Suppress bulk output unless you need it to debug, and disable pagers so output is not re-printed.
npm install --silent # drop install chatter (-q on tools that use it) git --no-pager log -n 20 # no interactive pager some-build 2>/dev/null # discard stderr you do not need- When outputting: stay terse. Do not explain what a tool does before calling it unless safety requires it. Do not repeat the user's instructions back verbatim. State the result, not the process.
- After reading: close the file. Once you are done with a file, stop referring to it and do not re-read it. The harness already tracks what you have seen.
Output
- Targeted reads of only the needed line ranges
- Quiet, pager-free command invocations
- Concise responses with no restatement or pre-call narration
Verification
- No whole-file read of a large file without a line range
- Searched for line numbers before reading a large file
- Independent reads/searches batched into a single turn
- Noisy commands silenced and pagers disabled
- Responses contain no instruction restatement or tool pre-explanation
Failure Modes
- Slurping the whole file — reading an entire large file when a grep-located range would do; it floods context and buries the relevant lines.
- Serial reads — opening files one per turn instead of batching, multiplying context repetition across turns.
- Log flooding — running verbose installs or builds without silencing, drowning the transcript in output you never needed.
- Narrating everything — restating instructions and pre-explaining tool calls, spending output tokens on filler.
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.

