claude-cost-optimizer
Cut Claude Code costs with sourced levers -- prompt caching, model routing, Batch -- plus an installable skill, CLI tools, a cost calculator and 12 deep-dive guides
What XERJ indexed
Snapshot
The whole repository at commit 5fad7b8866 (2026-10-09). main is 8 commits ahead.
Selected work

“add haiku 5.5 with prompt-length pricing, plus the october upda…”. 9 files, 382 lines in tools, hooks, templates.
Licence
The repository
LICENSE file checked at the pinned commit; the author agreed to inclusion.
The XERJ corpus
The author agreed by email on 2026-10-10. Same terms as the repository. Answers name the repo, the commit and the file:line.
selected for the XERJ Corpus Hublicence clearedsuggested use: adapt with attribution
ai-codinganthropicbest-practicesclaudeclaude-codecost-optimizationdeveloper-toolsllm
Example questions
- How does claude-cost-optimizer implement ai-coding?
- What does tools do in claude-cost-optimizer?
- Show the anthropic code in claude-cost-optimizer.
Inside the indexed corpus
- 140 files, 1.4 MB in total, about 10.0 KB per file.
- The selected commit changed 9 of those files (6.4%).
- Languages by size: TypeScript 49.8%, Python 32%, CSS 14%, Shell 2.5%, JavaScript 1.2%.
- On GitHub since 2026-03-08, last push 2026-10-23, 111 commits on main.
- The pin is 8 commits behind main; the corpus answers from the pinned code, not the newest.
Licence on GitHub and in the corpus
GitHub reported MIT for Sagargupta16/claude-cost-optimizer on 2026-10-31, and the LICENSE file at commit 5fad7b8866 was reviewed as MIT. They match, so answers from this corpus carry the same terms as the live repository.
Contributors
Sagar Gupta (@Sagargupta16) has 1 selected repository on the hub.
Using XERJ with claude-cost-optimizer
- A local search tool for Codex and Cursor claude-cost-optimizer is tagged ai-coding on GitHub.
- Local code search MCP that uses fewer tokens than grep
- RAG without a vector database: one hybrid index The hub files it under AI, prompts and agents.
- ripgrep vs a code index for coding agents: 30 tasks
The prompt
Paste it into your AI agent. It clones Sagargupta16/claude-cost-optimizer at the pinned commit and indexes it on your machine.
Search the GitHub repository Sagargupta16/claude-cost-optimizer with XERJ (https://hub.xerj.org/corpus/sagargupta16--claude-cost-optimizer). Run these in a shell, in order, and check each result before the next: 1. xerj --help (success: it prints usage). If xerj is missing: curl -fsSL https://xerj.org/get | sh 2. git clone https://github.com/Sagargupta16/claude-cost-optimizer claude-cost-optimizer && git -C claude-cost-optimizer checkout 5fad7b8866e4d69bf3891838b87eb745bc7f8f34 3. Start a local node and leave it running: xerj --insecure --data-dir ./xerj-data 4. xerj autoindex ./claude-cost-optimizer --url http://127.0.0.1:9200 --prefix claude-cost-optimizer --progress plain 5. xerj autoindex map --url http://127.0.0.1:9200 Then answer my question from the indexed files and cite the ax_path of every hit. Query syntax: https://xerj.org/llms.txt Licence: MIT. Keep the copyright notice and credit the authors.
Related
Sagar GuptaAI, prompts and agents corporaxobotyi--cc-foundry-the-workflow-debriefxobotyi--cc-foundry-rustxobotyi--cc-foundry-ai-helpers-skill-engineeringcativo23/lumiralidge-jun/opencodexmarcusaguiarmaciel-cmd/cato-plugin
Stats: GitHub API, fetched 2026-10-31. Snapshot: the git tree at the pinned commit. Selected work and consent: the XERJ registry.