What do you want to do?
4 use cases
-
Find where Claude Code tokens are wasted
Run one report on your local logs to see savings ranked by how sure they are, in dollars.
View prompt
Run `npx optimaizr` from the optimaizr repo (github.com/blendbunjaku/optimaizr) on this machine and report the Clear waste and Re-reading the conversation figures. Verify that the savings are reported per month and that the three savings tiers are not added together.
-
Hold expensive Claude Code messages before they go
Guard holds a message to an idle long conversation once, with its cost, and a cache countdown shows time left.
- REPO
blendbunjaku/optimaizr - Claude Code
- Software and DevOps
- Intermediate
View prompt
In the optimaizr repo (github.com/blendbunjaku/optimaizr), run `optimaizr guard on` and then `optimaizr guard` on this machine. Report how many messages were held and the cost each would have written. Verify that a held message was not sent until it was sent again.
- REPO
-
Track token use in your own Anthropic or OpenAI app
Wrap your existing API client in one line so optimAIzr can read your app's calls.
- REPO
blendbunjaku/optimaizr - Software and DevOps
- Intermediate
View prompt
In the optimaizr repo, wrap the API client in <app path> with optimaizr.wrap, run the app once, then run `npx optimaizr` and report the Where it goes breakdown. Verify that the app still returns the same responses it returned before the wrap.
- REPO
-
Check whether compacting at 200K actually saved money
Apply the change, wait several days, then compare cost per prompt and each trade-off to the days before.
View prompt
In the optimaizr repo, after context compaction has been applied for several days, run `optimaizr results` on this machine and report cost per prompt before and after. Verify that every row that got worse is marked as a trade-off before you draw a conclusion.
Quick start with Optimaizr
- Check you have what it needs: Node.js 20.11 or later (22.13 or later to read opencode history); Existing usage logs from Claude Code, Codex or opencode on this machine; A terminal.
- Open blendbunjaku/optimaizr on GitHub and read the README and license.
- Run
npx optimaizrin a terminal. - Read the Savings found section and the Where it goes breakdown.
- Run
optimaizr sessionsto see your costliest conversations. - Run
optimaizr whyto see spend by model, project and kind of work.
These steps come from our top use case, Find where Claude Code tokens are wasted, which also has a copy-paste agent prompt.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for blendbunjaku/optimaizr
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeAbout this repo
- Who it is forDevelopers and heavy users who pay for Claude Code, Codex or opencode, or call the Anthropic or OpenAI API, and want to see where their token spend goes.
- Why it is hot213 stars, launched 40 days ago, talked about in 2 AI sources we track
- LanguageTypeScript
- Sourcegithub.com/blendbunjaku/optimaizr · Back to Hot repos
Requirements
- Node.js 20.11 or later (22.13 or later to read opencode history)
- Existing usage logs from Claude Code, Codex or opencode on this machine
- A terminal
Add this badge to your README
Maintain Optimaizr? Show readers where to find these use cases.
Markdown
[](https://dedupedai.com/use-cases/blendbunjaku-optimaizr/?utm_source=github&utm_medium=badge&utm_campaign=blendbunjaku-optimaizr)
HTML
<a href="https://dedupedai.com/use-cases/blendbunjaku-optimaizr/?utm_source=github&utm_medium=badge&utm_campaign=blendbunjaku-optimaizr"><img src="https://dedupedai.com/badge/blendbunjaku/optimaizr.svg" alt="Use cases on Deduped" height="20"></a>
A static image, no tracking script. About the badge
Questions about Optimaizr
What is Optimaizr?
A local CLI that finds wasted tokens in Claude Code, Codex, opencode and your own API calls, and fixes some of it. It is an open-source project on GitHub: https://github.com/blendbunjaku/optimaizr.
How do I use Optimaizr?
Run npx optimaizr in a terminal; then read the Savings found section and the Where it goes breakdown; run optimaizr sessions to see your costliest conversations. The use cases on this page give the full steps and a copy-paste agent prompt for each job.
Who is Optimaizr for?
Developers and heavy users who pay for Claude Code, Codex or opencode, or call the Anthropic or OpenAI API, and want to see where their token spend goes.
What can I do with Optimaizr?
4 use cases so far, for example: Find where Claude Code tokens are wasted; Hold expensive Claude Code messages before they go; Track token use in your own Anthropic or OpenAI app. Each has steps and a copy-paste agent prompt.
What do I need to run Optimaizr?
Node.js 20.11 or later (22.13 or later to read opencode history); Existing usage logs from Claude Code, Codex or opencode on this machine; A terminal.
What are alternatives to Optimaizr?
Other hot AI repos in Software and DevOps: Skills, Claude Mem, Freellmapi, Andrej Karpathy Skills, Agent Desktop.
Is Optimaizr safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.