| name | token-efficiency |
| description | Global Token Efficiency and Provider Optimization Framework — maximize useful work within available quotas by optimizing prompts, contexts, and delegation. |
Token Efficiency & Provider Optimization
ARAYA optimization layer that maximizes productive work within provider
quotas. Works transparently for ARAYA workflows, direct pi conversations,
agent delegations, and sub-agent executions.
What problem this solves
Rate-limit errors, retry delays, wasted quotas, and oversized prompts
reduce throughput. This skill detects inefficiencies before they waste
tokens and provides optimization strategies per provider.
When to Use
- Before any large task execution
- When rate-limit risk is detected
- For multi-agent orchestration planning
- When context windows approach limits
Core Principles
- Small tasks over giant prompts — decompose, don't compress
- Context reuse over repetition — reference artifacts, don't resend
- Provider-aware execution — optimize per provider profile
- Budget before execution — estimate tokens before invoking
Provider Optimization Profiles
| Provider | Optimize For | Avoid |
|---|
| Codex | Small prompts, incremental, frequent checkpoints | Large plans, full repo scans |
| Claude | Deep reasoning, architecture, governance | Repeating context/standards |
| DeepSeek | Cost efficiency, long workflows, docs | Unbounded context growth |
| Gemini | Large-scale analysis, research, synthesis | Small incremental tasks |
| GitHub Copilot | Local implementation, fast iteration | Architecture discussions |
| OpenCode Go | Lightweight execution, rapid tasks | Heavy planning sessions |
Steps
- Estimate token consumption before execution: input + output + reasoning
- Check rate-limit risk based on recent usage patterns
- If risk detected, recommend: decomposition, compression, or deferral
- Apply provider-specific optimization profile
- Generate context capsules for reusable information
- Track consumption across session
- Report efficiency metrics
Context Capsule Format
# Context Capsule — {topic}
Compressed from: X tokens → Y tokens (Z:1 ratio)
Requirements: REQ-001, REQ-002
Standards: STD-004
Decisions: ARCH-002
Key findings: ...
Dependencies: ...
Expected Output
Token budget report with estimated input/output tokens, rate-limit risk
assessment, optimization recommendations, and provider strategy.
Done Criteria