token-efficiency
Skill11 starsChanged 5 months agoMITView on GitHub
Use when context is getting large, when working on long sessions, or when you notice token consumption is high. Use before dispatching subagents, before reading large files, and during context compaction.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- rohitg00/pro-workflowtheir own version, first seen Sep 29, 2026
- prangishviliAbe/agent-skillstheir own version, first seen Sep 26, 2026
- HHU3637kr/skillstheir own version, first seen Sep 22, 2026
- denfry/claude-skillstheir own version, first seen Jul 22, 2026
- Biznomad/claude-skillstheir own version, first seen Jul 14, 2026
- EswarSk/token-leantheir own version, first seen Jul 4, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- rohitg00/pro-workflow★ 2.9ksame name
- HHU3637kr/skills★ 145same name
- prangishviliAbe/agent-skills★ 7same name
- denfry/claude-skills★ 3same name
- d3labs-thomas/claude-code★ 2same name
- EswarSk/token-lean★ 1same name
- vikast908/agent-repo-card★ 1same name
- Biznomad/claude-skills★ 0same name
- Naimul-islam-bd/token-efficiency★ 0same name
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 repository26 other files it gives its agents.
- agent-capability-comparison-methodologySkill
- autonomous-work-signalingSkill
- batch-skill-description-standardizationSkill
- checkpoints-and-rewindSkill
- context-aware-task-decompositionSkill
- context-compaction-verification-and-recoverySkill
- cross-session-execution-frameworkSkill
- hermes-agentSkill
- hermes-improvement-multiphase-planSkill
- hermes-tweetSkill
- multi-agent-browser-text-extractionSkill
- multi-role-synthesis-frameworkSkill
- openclaw-hermes-archSkill
- open-source-adaptation-patternSkill
- planSkill
- requesting-code-reviewSkill
- router-learning-systemSkill
- security-hardening-checklistSkill
- self-regulation-brake-systemSkill
- skill-slimming-strategySkill
- spec-driven-developmentSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- think-toolSkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 11 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Core principle: Only put in context what's needed for the current task.
- Distinctive: line 39
Before dispatching subagents (don't send all context)
- Distinctive: line 40
When working on a long-running session (many turns)
- Distinctive: line 41
When the user mentions cost concerns
- Distinctive: line 42
Before and after context compaction
- Distinctive: line 48
Don't read files until you need them:
- Distinctive: line 66
Instead of saving raw tool output, summarize:
- Very specific: line 118
When dispatching subagents, use the context-inheritance pattern (see references/context-inheritance.md in the subagent-driven-development …
- Distinctive: line 133
When running commands, pipe through filters to reduce output:
- Distinctive: line 155
Rule of thumb: If it's not directly relevant to the current action, don't put it in context.
- Distinctive: line 159
When Hermes triggers context compaction, it's because the window is getting full.
- Distinctive: line 163
Keeping: only the current task state and next steps
“Common” is measured: kept by at least 6 in 10 of the 9 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
Overview
Reduce token consumption by being intentional about what goes into context. Every token costs money and fills the context window. Smart context management can reduce costs by 30-50% without sacrificing quality.
Core principle: Only put in context what's needed for the current task. Everything else is noise.
When to Use
- Context is approaching the window limit
- You notice tool outputs are getting large
- Before dispatching subagents (don't send all context)
- When working on a long-running session (many turns)
- When the user mentions cost concerns
- Before and after context compaction
Techniques
1. Deferred Reading
Don't read files until you need them:
# ❌ Bad: read everything upfront
read_file("src/models/user.py") # 200 lines
read_file("src/models/product.py") # 300 lines
read_file("src/models/order.py") # 250 lines
# → 750 lines in context before you even start
# ✅ Good: read only what you need now
# Start with just the file structure
search_files("*.py", target="files", path="src/models/")
# Read only the file you're about to modify
read_file("src/models/user.py")2. Summarize Before Saving
Instead of saving raw tool output, summarize:
# ❌ Bad: save raw terminal output
# 200 lines of irrelevant log messages
# ✅ Good: save only the summary
# "Build completed: 45 passed, 0 failed, 3 warnings (all pre-existing)"3. Use delegate_task for Heavy Lifting
Heavy operations burn token in a separate context, not the main session:
# ❌ Bad: do heavy search in main session
# browser_navigate → browser_snapshot → browser_scroll × 10
# → hundreds of lines of HTML in main context
# ✅ Good: delegate to subagent
delegate_task(goal="Search GitHub trending...", toolsets=['browser'])
# → only the summary enters main context4. Progressive Disclosure for Skills
Skills should use progressive disclosure (load metadata first, full content only when needed):
# Skill name + 1-line description → Agent decides if relevant
# → Only then load full SKILL.md
# → Only then load reference filesThis is already built into Hermes skills system — make sure descriptions are specific enough for accurate matching.
5. Avoid "Just in Case" Context
# ❌ Bad: "let me read this file just in case I need it"
read_file("src/config/settings.py")
read_file("src/config/database.py")
read_file("src/config/cache.py")
# User only asked to fix a button color
# ✅ Good: read the specific UI file first
read_file("src/ui/components/Button.tsx")
# Only read config files if debugging reveals they're relevant6. Structure Context for Subagents
When dispatching subagents, use the context-inheritance pattern (see references/context-inheritance.md in the subagent-driven-development skill):
Context Package:
- Project: 2-3 lines
- Task: what to do
- Shared State: what's done
- Files: relevant ones only
- Constraints: gotchas to avoidThis reduces subagent context by 60-80% compared to dumping everything.
7. Use Terminal Filters
When running commands, pipe through filters to reduce output:
# ❌ Bad: full output
pytest tests/ -v
# ✅ Good: only failures and summary
pytest tests/ -q --tb=short 2>&1 | tail -20Cost Estimation
Rough token costs (approximate):
| Operation | Tokens | Cost (DeepSeek) |
| Read a 200-line file | ~2,000 | ~$0.0003 |
pytest -v full output | ~5,000 | ~$0.0007 |
| Browser snapshot (full) | ~8,000 | ~$0.0011 |
| delegate_task (typical) | ~5,000 input / ~1,000 output | ~$0.0005 |
| Context compaction | ~10,000 | ~$0.0014 |
Rule of thumb: If it's not directly relevant to the current action, don't put it in context.
Context Compaction
When Hermes triggers context compaction, it's because the window is getting full. Help by:
- Summarizing what was accomplished so far
- Dropping old tool outputs that are no longer relevant
- Keeping only the current task state and next steps
- Recommending checkpoint save so nothing is lost
Integration
- context-inheritance-subagent reference — context package for delegate_task
- subagent-driven-development — uses delegate_task for heavy work
- writing-plans — plans should be concise, not verbose
- checkpoints-and-rewind — save before compaction so nothing lost
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.

