- Home
- Skills
- Agents & Orchestration
- claude code token optimizer
Works with the AI Agents you already use
claude code token optimizer
Built and used daily on real Claude Code sessions, not a theoretical framework.
$7.99
claude code token optimizer
Example session with this skill installed
Before I start this task, help me figure out what to delegate: find every place we call the old fetchUser API across the repo (~40 files), update each call site to the new fetchUserProfile signature, and write tests for the files most likely to break.
- Read your context and instructions
- Compiled the claude code token
Summary
Classified the task, delegated the mechanical scan and the rewrite, kept the risk call on the main session.
| Step | Task | Tier | Routed to |
|---|---|---|---|
| 1 | Find every fetchUser call site (~40 files) | T0 Mechanical | Agent(scout) - Haiku |
| 2 | Rewrite each call site to fetchUserProfile | T1 Standard | Agent(builder) - Sonnet |
| 3 | Write tests for the highest-risk files | T1 Standard | Agent(builder) - Sonnet |
| 4 | Decide which files are highest-risk | T2 Hard | Kept on the main session |
scout: grepped fetchUser( across 40 files - 6.8k tokens (Haiku)
builder: rewrote 40 call sites to fetchUserProfile() - 41k tokens (Sonnet)
builder: added tests for auth.ts, session.ts, profile.ts - 29k tokens (Sonnet)
Next steps
Run the test suite, then review the three new test files before committing. None of the mechanical work touched the expensive top-level model, only the risk call stayed with you.
Connects securely to your tools. The creator never sees your data.
About this skill
Same quality, fewer tokens. This skill classifies every task before you touch it, mechanical work (file search, grep, reading logs, formatting) goes to Haiku, standard work (code, tests, content) goes to Sonnet, and only genuinely hard work (architecture, security, irreversible decisions) stays with you on the expensive model.
What it does
Classifies tasks into three tiers and tells you exactly when to delegate instead of burning your top-level model on busywork Works with named subagents (Agent(scout), Agent(runner), Agent(builder)) or a plain model: override, zero setup required either way Ships a local, read-only, stdlib-only token-audit script (no network calls) so you can see your actual per-model usage split monthly A token-hygiene checklist covering the small habits that add up: read only the line ranges you need, grep before you read, batch independent tool calls, /clear between unrelated tasks Advisory, not a hook: copy one folder into ~/.claude/skills/, nothing to install, nothing to uninstall
Install: copy this folder to ~/.claude/skills/token-optimizer (every project) or <project>/.claude/skills/token-optimizer (one project). That’s it.
Built and used daily on real Claude Code sessions, not a theoretical framework. Full source and the open-source hard-enforcement plugin variant (for anyone who wants a structural guarantee instead of an advisory one) are on GitHub: github.com/HUZ5253/token-optimizer-plugin
API savings are higher than subscription savings. Haiku price spikes above 100K tokens. Some environment builds may fail to respect subagent model overrides.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 24 days ago
Requires
Permissions
File Scopes
The optional token-audit.py script reads local Claude Code session transcripts (~/.claude/projects/**/*.jsonl) to report real token usage and cost per model. It's read-only, stdlib-only Python with no network calls and no writes. The skill itself (SKILL.md) is advisory instructions only and doesn't touch the filesystem on its own.