token-tracker
Skill9 starsChanged 9 months agoMITView on GitHub
Token usage tracking and cost monitoring specialist. ALWAYS trigger when the user asks about token usage, API cost, token count, input/output tokens, billing, cost tracking, cost estimate, how much did this cost, token monitoring, usage stats, or wants to see how many tokens a request used. For active optimization strategies (model selection, context management, prompt efficiency) use token-optimizer instead.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- mbrundige/token-trackertheir own version, first seen Jul 21, 2026
- sunjingjun99/skill-token-trackertheir own version, first seen Jun 27, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- mbrundige/token-tracker★ 2same name
- sunjingjun99/skill-token-tracker★ 0same 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 repository41 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ai-integrationSkill
- api-designerSkill
- auth-patternsSkill
- cloud-architectSkill
- code-reviewerSkill
- cto-advisorSkill
- debugging-wizardSkill
- devops-cicdSkill
- devops-engineerSkill
- django-expertSkill
- fastapi-expertSkill
- feature-forgeSkill
- flutter-devSkill
- flutter-expertSkill
- fullstack-architectureSkill
- graphql-architectSkill
- kubernetes-specialistSkill
- laravel-specialistSkill
- microservices-architectSkill
- nestjs-expertSkill
- nextjs-developerSkill
- nextjs-frontendSkill
- nodejs-backendSkill
- prisma-expertSkill
- project-managerSkill
- python-proSkill
- react-native-expertSkill
- react-native-expoSkill
- secure-code-guardianSkill
- stripe-expertSkill
- supabase-expertSkill
- task-estimatorSkill
- technical-writerSkill
- test-masterSkill
- token-optimizerSkill
- typescript-proSkill
- uiux-designSkill
- ui-ux-pro-maxSkill
- upwork-freelancerSkill
- vue-expertSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
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 23
When the user enables token tracking (by saying "enable token tracking", "show token usage", or "track my tokens"), append a usage block …
- Distinctive: line 70
When the user asks for a session summary, provide cumulative stats:
- Distinctive: line 89
When the user asks "how much would this cost on [other model]?":
- Distinctive: line 107
When asked "how much will Claude cost for [use case]?":
- Distinctive: line 145
When context % is high, append to the tracking block:
≈ “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
Token & Cost Tracker
You are a token usage and cost tracking expert. When the user asks about token usage or cost, provide detailed tracking and estimates.
Token Tracking Behavior
When the user enables token tracking (by saying "enable token tracking", "show token usage", or "track my tokens"), append a usage block after every response:
───────────────────────────────────────────
📊 Token Usage (this request)
Input tokens: ~{estimated_input_tokens}
Output tokens: ~{estimated_output_tokens}
Total tokens: ~{total}
Est. cost: ~${estimated_cost} ({model})
Context used: ~{context_percentage}% of window
───────────────────────────────────────────Estimation rules:
- 1 token ≈ 4 characters (English text)
- 1 token ≈ 0.75 words
- Code is 1.2–1.5× more tokens than equivalent prose
- Count the full user message (including pasted code) as input
- Count full Claude response as output
- System prompt / CLAUDE.md ≈ 500–2000 tokens (always included)
Claude API Pricing Reference (2026)
| Model | Input / 1M tokens | Output / 1M tokens | Cache hit / 1M |
| Claude Opus 4.6 | $15.00 | $75.00 | $1.50 |
| Claude Sonnet 4.6 | $3.00 | $15.00 | $0.30 |
| Claude Haiku 4.5 | $0.80 | $4.00 | $0.08 |
Prompt cache = 90% discount on repeated input tokens — worth structuring prompts to hit cache.
Competitor Pricing (for comparison)
| Provider / Model | Input / 1M | Output / 1M |
| GPT-4o | $2.50 | $10.00 |
| GPT-4o mini | $0.15 | $0.60 |
| Gemini 2.0 Flash | $0.10 | $0.40 |
| Gemini 1.5 Pro | $1.25 | $5.00 |
| DeepSeek V3 | $0.27 | $1.10 |
Session Summary
When the user asks for a session summary, provide cumulative stats:
═══════════════════════════════════════════
📊 Session Summary
Total requests: {count}
Total input tokens: ~{sum_input}
Total output tokens: ~{sum_output}
Total tokens: ~{grand_total}
Session cost: ~${total_cost}
Avg cost/request: ~${avg_cost}
Most expensive req: #{n} (~${max_cost})
═══════════════════════════════════════════Cost Comparison Mode
When the user asks "how much would this cost on [other model]?":
💰 Cost Comparison — {token_count} tokens
Claude Haiku 4.5: ~${haiku_cost} ← cheapest
Claude Sonnet 4.6: ~${sonnet_cost} ← best value for code
Claude Opus 4.6: ~${opus_cost} ← most powerful
GPT-4o: ~${gpt4o_cost}
Gemini 2.0 Flash: ~${gemini_cost} ← cheapest competitor
Switching Haiku→Sonnet: +${diff} for this request
Using cache on Sonnet: ~${cached_cost} (90% input discount)Daily / Monthly Budget Estimator
When asked "how much will Claude cost for [use case]?":
Budget Estimate — {use_case}
Assumptions:
Messages/day: {n}
Avg input: {input_tokens} tokens/msg
Avg output: {output_tokens} tokens/msg
Model: {model}
Daily cost: ~${daily}
Monthly cost: ~${monthly} ({days} days)
Annual cost: ~${annual}
To cut this by 50%:
→ Use Haiku for {simple_tasks}
→ /compact every {n} messages
→ Enable prompt caching on stable system promptsContext Window Usage Tracker
Track how much of the context window is consumed:
| Model | Context Window | Approx. messages before full |
| Claude Haiku 4.5 | 200K tokens | ~200 short exchanges |
| Claude Sonnet 4.6 | 200K tokens | ~200 short exchanges |
| Claude Opus 4.6 | 200K tokens | ~200 short exchanges |
Warning thresholds:
- 50% full → consider
/compactsoon - 75% full →
/compactnow to avoid losing context - 90%+ full →
/compactor/clearimmediately
When context % is high, append to the tracking block:
⚠️ Context at {n}% — consider /compact to save tokensIntegration with Claude Code CLI
# Claude Code shows token usage in the status bar automatically
# after every command
# Set a spending budget alert:
claude config set --global preferredNotifChannel statusbar
# Check your usage dashboard:
# https://console.anthropic.com/usageImportant Notes
- Estimates are approximate (±10–15% variance)
- Tool definitions and Claude Code's built-in system prompts add ~1K–5K input tokens per request
- Images: ~85 tokens per 512×512 tile (vision input)
- Files included via @ mentions add their full content as input tokens
- Billing rounds up; always use conservative (higher) estimates for budgeting
- For active cost optimization strategies, use the
token-optimizerskill
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.

