token-economy
Skill2 starsChanged 8 months agoMITView on GitHub
Optimizes Claude Code costs and model delegation: RTK shell compression, Haiku/Sonnet/Opus delegation, context strategy, 3x reduction empirically validated.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- gatalifeltd/economizer-skillstheir own version, first seen Nov 15, 2026
- ralvarezdev/ralvaskillstheir own version, first seen Nov 8, 2026
- ralvarez-ai/ralvaskillstheir own version, first seen Nov 8, 2026
- fusebase-dev/fusebase-flowtheir own version, first seen Oct 16, 2026
- novahiz/novahiztheir own version, first seen Oct 11, 2026
- atuljha23/holocrontheir own version, first seen Apr 22, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- fusebase-dev/fusebase-flow★ 9same name
- gatalifeltd/economizer-skills★ 4same name
- ralvarez-ai/ralvaskills★ 4same name
- ralvarezdev/ralvaskills★ 4same name
- atuljha23/holocron★ 2same name
- novahiz/novahiz★ 1same 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 repository34 other files it gives its agents.
- global/CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- accessibility-reviewSkill
- api-designSkill
- audit-runnerSkill
- auto-fixSkill
- brainstormSkill
- compliance-checkSkill
- continuous-testing-guardianSkill
- contract-lookupSkill
- explainSkill
- idea-validatorSkill
- load-test-auditSkill
- monthly-reviewSkill
- new-featureSkill
- nextjs-reviewSkill
- perfection-auditSkill
- performance-deep-auditSkill
- post-code-security-auditSkill
- pre-code-security-checkSkill
- pre-deploymentSkill
- project-setupSkill
- pro-samuelSkill
- quick-auditSkill
- risk-scoreSkill
- roadmap-builderSkill
- secret-scannerSkill
- seo-auditSkill
- supabase-reviewSkill
- typescript-reviewSkill
- ux-cognitive-load-checkSkill
- ux-heuristic-auditSkill
- ux-progressive-disclosureSkill
- welcomeSkill
The file
Files
/token-economy: Claude Code Token & Cost Optimization
When to use
- Analyze the costs of a session or workflow
- Decide which model to delegate for which task
- Reduce the tokens of a command or prompt
- Audit RTK usage and compression gains
Delegation hierarchy (empirical, 3.2x reduction validated)
| Task | Model | Why |
| Web research, summaries, reading docs | Haiku | 20x cheaper, sufficient for synthesis |
| Writing code, modifications | Sonnet | Optimal quality/cost ratio |
| Architecture, complex plans, reasoning | Opus | When Sonnet is insufficient |
| Never Haiku for: writing critical code | N/A | Insufficient quality, illusory savings |
RTK: Rust Token Killer (83.7% shell compression)
RTK intercepts shell command outputs and compresses them before injection into the context:
git status→ RTK filters out irrelevant filesnpm test→ RTK extracts only the failuresgit log→ RTK summarizes the commits
rtk gain # compression analytics
rtk discover # analyzes Claude history for missed opportunities
rtk gain --history # command history and gainsContext strategy
What consumes the most
- Unnecessary whole files read (use
Readwithoffset/limit) - Verbose shell command results (→ RTK)
- Broad searches without filtering (→ Haiku subagent first)
- Long conversations without compaction (→
/compact)
2-phase rule (mandatory in this setup)
- Phase 1: Haiku subagent → summary of max 400 tokens
- Phase 2: Opus reads the summary → selective deep-dive on 1-3 URLs
Prompt caching
- The Anthropic cache has a 5-minute TTL
- For
/looploops: delay < 300s to stay within the cache CLAUDE_CODE_MAX_OUTPUT_TOKENS=128000in .zshrc for long outputs
Auditing a workflow
To analyze the real cost of a session:
ccusage daily # today's cost
ccusage session # cost of the current session
rtk gain --history # commands compressed by RTKOutput format
## Token Economy Audit: [workflow/session]
### Current cost: $X.XX
### Estimated optimized cost: $X.XX (-XX%)
### Delegations to review
| Task | Current model | Recommended model | Savings |
|-------|-------------|------------------|---------|
### Missed RTK compressions
[commands that should have gone through RTK]
### Actions
1. [specific action]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.

