Agent skill
token-efficiency
Maximise AI interaction value per token - techniques, patterns, integration with cost estimation
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/token-efficiency-baphled-dotopencode
SKILL.md
Skill: token-efficiency
What I do
I optimise every AI interaction for maximum value per token: being explicit about intent, structuring information clearly, removing noise, and using iteration instead of perfection in one shot. I provide efficiency techniques that reduce costs identified by token-cost-estimation.
When to use me
- When asking complex questions or requesting implementations
- When dealing with large codebases (summarise, don't dump)
- When writing prompts that will be reused
- When you have limited token budget
- When token-cost-estimation identifies optimisation opportunities
Core principles
- Explicit intent - State what you need, why, what success looks like
- Structured information - Sections, bullets, clear formatting over prose
- Cut noise - Remove unnecessary words and irrelevant context
- Context efficiency - One good example beats ten vague descriptions
- Iterate - Expect refinement, don't demand perfection first try
Efficiency Techniques
Prompt Structure (saves 10-20%)
Bad: "I need help with the authentication system,
it's not working properly and I've tried a
few things but nothing works..."
Good:
Goal: Fix auth token validation
Error: JWT expired check failing
Tried: Updated token library (no effect)
Need: Root cause + fix
Context Provision (saves 15-25%)
- Provide relevant code snippets, not entire files
- State assumptions explicitly
- Include error messages verbatim
- Reference specific line numbers
Efficient Patterns
| Pattern | Token Savings | Example |
|---|---|---|
| Focused context | 20-30% | Snippet vs full file |
| Clear structure | 10-15% | Bullets vs prose |
| Explicit success criteria | 10-20% | "Done when X passes" |
| Example over description | 15-25% | Show, don't tell |
Integration with token-cost-estimation
Pre-Session
- Review token-cost-estimation breakdown
- Identify high-cost phases
- Apply efficiency techniques to reduce
During Session
- Use structured prompts throughout
- Provide focused context
- Iterate in small steps
Post-Session
- Compare actual vs estimated
- Identify which techniques helped
- Store learnings in memory-keeper
Quantitative Metrics
Track these to measure efficiency:
- Tokens per task completed
- First-attempt success rate
- Iteration count per task
- Context rebuild frequency
Anti-patterns to avoid
- ❌ Dumping entire files when snippet suffices
- ❌ Vague requests ("fix this")
- ❌ Expecting perfection on first try
- ❌ Repeating context unnecessarily
- ❌ Not learning from high-cost sessions
KB Reference
~/vaults/baphled/3. Resources/Knowledge Base/AI Development System/Skills/Workflow-Orchestration/Token Efficiency.md
Related skills
token-cost-estimation- Quantifies costs, identifies savingspre-action- Clarify before promptingparallel-execution- Efficiency through parallelismscope-management- Scope affects token usagecontext-efficient-tools— Tool result filtering (complements prompt-level efficiency)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?