cost-tracker
Skill1 starsChanged 5 months agoMITView on GitHub
Estimates how much your current Claude Code session has cost and suggests cheaper routing for the next pass. Pairs with token-optimizer prompts. Trigger phrases: how much did this cost, cost so far, am I spending too much, /cost, bill estimate. Always activate when the session passes 50K cumulative tokens (proactive warning). /cost — show estimate. /cost full — verbose breakdown by tool call.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- suryast/free-ai-agent-skillstheir own version, first seen Oct 10, 2026
- rohitg00/pro-workflowtheir own version, first seen Sep 29, 2026
- felvieira/claude-skills-fvtheir own version, first seen Sep 2, 2026
- zeuikli/claude-code-workspacetheir own version, first seen Jun 16, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- rohitg00/pro-workflow★ 2.9ksame name
- zeuikli/claude-code-workspace★ 155same name
- felvieira/claude-skills-fv★ 27same name
- suryast/free-ai-agent-skills★ 2same 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 repository12 other files it gives its agents.
- commit-curatorSkill
- context-compactorSkill
- decision-recorderSkill
- mcp-finderSkill
- permission-auditorSkill
- prd-builderSkill
- prompt-matcherSkill
- pr-reviewerSkill
- repo-onboarderSkill
- scope-clarifierSkill
- skill-matcherSkill
- tdd-flowSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Always activate when the session passes 50K cumulative tokens (proactive warning).
- Distinctive: line 40
If not, estimate from observable context size + assistant response count
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
cost-tracker
Estimates how much your current Claude Code session has cost and suggests cheaper routing for the next pass. Pairs with token-optimizer prompts.
When to activate
Trigger phrases: how much did this cost, cost so far, am I spending too much, /cost, bill estimate.
Always activate when the session passes 50K cumulative tokens (proactive warning).
What it shows
Session cost so far
-------------------
Input tokens: 124,300 ($0.37 at sonnet rates)
Output tokens: 18,420 ($0.28)
Cache reads: 98,500 ($0.030)
Cache writes: 12,000 ($0.045)
Total: $0.72 (sonnet 4.6)
If you'd used kimi 2.6: $0.12 (-83%)
If you'd used haiku 4.5: $0.09 (-87%)
If you'd used opus 4.6: $1.80 (+150%)
Top cost contributors:
1. Reading the same 3 files 7 times in tool calls ($0.18)
2. Long initial prompt re-sent each turn ($0.09)
3. Web fetches with verbose output ($0.07)
Recommendations:
- Run `/clear` and start fresh — current context is bloated
- Switch default to kimi 2.6 for the next session (router config: ...)
- Stop re-sending the README every turn (cache the file ref)Process
- Parse session metadata if available (Claude Code exposes session token counts)
- If not, estimate from observable context size + assistant response count
- Apply current pricing table (Sonnet 4.6 / Haiku 4.5 / Opus 4.6 / Kimi 2.6)
- Identify top 3 cost contributors from tool call patterns
- Recommend the cheapest model that could have handled this work
- Suggest specific config changes
Pricing table (update quarterly)
# As of 2026-06, per million tokens
claude-opus-4-8: { input: 5, output: 25, cache_read: 0.50, cache_write: 6.25 }
claude-sonnet-4-6: { input: 3, output: 15, cache_read: 0.30, cache_write: 3.75 }
claude-haiku-4-5: { input: 1, output: 5, cache_read: 0.10, cache_write: 1.25 }
kimi-2.6-instruct: { input: 0.50, output: 2, cache_read: 0.05, cache_write: 0.625 }Inputs
- Session token counts (if exposed by harness)
- Tool call history (to find waste patterns)
Outputs
- Cost summary
- Top 3 waste patterns
- 1-3 concrete recommendations
Slash command
/cost — show estimate. /cost full — verbose breakdown by tool call.
Anti-patterns surfaced
- Re-reading the same file
- Passing whole file contents when a grep would do
- Using premium model for cleanup work
- Verbose web fetches piped raw into context
- Forgetting to
/clearafter a finished task
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.

