token-efficiency
Skill4 starsChanged 5 months agoApache-2.0View on GitHub
Token conservation economics, bounded context-window pruning, AST structural query optimization, and high-precision prompt budget discipline.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- REPOZY/superpowers-optimizedtheir own version, first seen Nov 8, 2026
- harshnag/agent-engineering-practicestheir own version, first seen Nov 1, 2026
- viasrijan/crazy-skillstheir own version, first seen Oct 20, 2026
- SmokerGreenOG/ToolCasetheir own version, first seen Oct 15, 2026
- romangalaxys10-spec/fabletheir own version, first seen Oct 13, 2026
- JoaoEquer/Oficinatheir own version, first seen Oct 13, 2026
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- rohitg00/pro-workflow★ 2.9ksame name
- HHU3637kr/skills★ 146same name
- REPOZY/superpowers-optimized★ 146same name
- prangishviliAbe/agent-skills★ 8same name
- romangalaxys10-spec/fable★ 4same name
- JoaoEquer/Oficina★ 2same name
- SmokerGreenOG/ToolCase★ 2same name
- denfry/claude-skills★ 1same name
- Biznomad/claude-skills★ 0same name
- harshnag/agent-engineering-practices★ 0same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository48 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-designSkill
- improve-codebase-architectureSkill
- architectureSkill
- cicdSkill
- cloud-infraSkill
- codebase-navigatorSkill
- code-qualitySkill
- code-reviewSkill
- code-standardsSkill
- configuration-managementSkill
- contract-testingSkill
- dependency-managementSkill
- diagnoseSkill
- documentationSkill
- dynamic-routingSkill
- enterprise-architectureSkill
- enterprise-test-suitesSkill
- git-guardrails-claude-codeSkill
- grill-meSkill
- handoffSkill
- intent-clarificationSkill
- triageSkill
- legacy-modernizationSkill
- llm-evalsSkill
- observabilitySkill
- ops-sreSkill
- performance-optimizationSkill
- to-issuesSkill
- playwrightSkill
- to-prdSkill
- setup-pre-commitSkill
- prototypeSkill
- pr-reviewSkill
- ralph-loopSkill
- requirementsSkill
- root-cause-analysisSkill
- security-auditSkill
- security-patchingSkill
- startup-lifecycleSkill
- tddSkill
- testingSkill
- threat-modelingSkill
- to-issuesSkill
- to-prdSkill
- ux-designSkill
- write-a-skillSkill
- zoom-outSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
6
Distinctive
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 15
When analyzing large codebases or executing multi-agent pipelines, follow the Token Conservation Hierarchy:
- Distinctive: line 36
Never re-read files already present in memory or referenced by previous steps.
- Distinctive: line 37
Prefer targeted inspection: fetch only the exact 30–50 lines of an implementation seam rather than the entire 2,000-line module.
- Distinctive: line 44
Do not run unconstrained recursive text searches that dump thousands of matched lines into the context window.
- Distinctive: line 48
When modifying code, use targeted line replacements rather than rewriting entire files.
- Distinctive: line 53
If an error persists after 3 focused attempts, trip the circuit breaker and request targeted user guidance rather than burning tokens in …
“Common” is measured: kept by at least 6 in 10 of the 12 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.
Files
Token Efficiency & Precision Engineering Skill
This skill enforces strict token conservation, prevents context-window bloat, and optimizes model invocation costs while maximizing code generation and diagnostic accuracy.
1. Token Conservation Hierarchy
When analyzing large codebases or executing multi-agent pipelines, follow the Token Conservation Hierarchy:
[Level 1: Semantic AST Query (Lowest Token Cost: ~50-200 Tokens)]
↳ Query code-review-graph or symbol definitions; avoid loading full files.
↓
[Level 2: Targeted Line-Range Slice (Minimal Cost: ~200-500 Tokens)]
↳ Read only the specific target function / interface lines (StartLine to EndLine).
↓
[Level 3: Compact Handoff Artifacts (Bounded Cost: ~500-1,500 Tokens)]
↳ Never pass entire conversation logs forward; distill decisions into clean markdown handoffs.
↓
[Level 4: Full File Reads (Cautious / Restricted: >2,000 Tokens)]
↳ Read entire files only when strictly required for syntax validation. Never read binary or vendor files.2. The 5 Rules of High-Precision Token Economy
Rule 1: Zero Redundant File Dumps
- Never re-read files already present in memory or referenced by previous steps.
- Prefer targeted inspection: fetch only the exact 30–50 lines of an implementation seam rather than the entire 2,000-line module.
Rule 2: Handoff State Compaction
- At every phase boundary (
Plan -> Build -> Verify -> Ship -> Operate), write a structured summary tohandoffs/<phase>-handoff.md. - Downstream agents only read the handoff file, resetting conversation token depth back to zero and avoiding exponential context degradation.
Rule 3: Structural Search Over Greedy Grep
- Do not run unconstrained recursive text searches that dump thousands of matched lines into the context window.
- Filter queries with file extensions and directory boundaries (e.g.
apps/claims-engine/src/**/*.ts).
Rule 4: Compact Diff Chunks on Edits
- When modifying code, use targeted line replacements rather than rewriting entire files.
Rule 5: Token-Aware Ralph Loop Circuit Breaker
- In the self-correction build loop, if a test fails:
- Extract only the specific failure stack trace (not the full 10,000-line test log).
- If an error persists after 3 focused attempts, trip the circuit breaker and request targeted user guidance rather than burning tokens in endless loops.
3. Token Efficiency Metric Checklist
- Context window initialized using distilled
handoff.mdinstead of full chat transcript - Codebase explored via AST call-graphs instead of bulk file reads
- Test failure outputs pruned to relevant assertion diffs
- Edits applied via surgical replacement chunks
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.

