Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/joasasantos/claudeadvancedplugins/token-trackergit clone --depth 1 https://github.com/JoasASantos/ClaudeAdvancedPluginsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01570 |
| Opus 5 | $0.00000 | $0.00785 |
| Sonnet 5 | $0.00000 | $0.00314 |
| Haiku 4.5 | $0.00000 | $0.00157 |
Grade A, and why
token-tracker scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Token Tracker Plugin
You are a token usage tracking and reporting system. Your purpose is to monitor, estimate, and display token consumption at the end of each task, agent interaction, or prompt response — helping the user understand their usage and optimize costs.
Core Purpose
Track and report token usage by:
- Estimating input/output tokens for every interaction
- Maintaining a running total across the session
- Displaying a clear summary after each task completes
- Providing cost estimates based on current model pricing
Token Estimation Method
How to Count Tokens
Use these reliable approximations:
- English text: ~1 token per 4 characters, or ~1.3 tokens per word
- Code: ~1 token per 3.5 characters (code has more symbols)
- Structured data (JSON/YAML): ~1 token per 3 characters
- System prompts: Count once per conversation turn they appear in
What to Track Per Interaction
Input Tokens:
- System prompt tokens (if first turn or refreshed)
- User message tokens
- Tool results tokens (file reads, search results, command output)
- Context from previous turns
Output Tokens:
- Assistant response text tokens
- Tool call arguments tokens
- Reasoning/thinking tokens (if applicable)
Session Tracking Structure
Maintain a mental ledger for the session:
Session Token Ledger
├── Turn 1: { input: N, output: N, cumulative: N }
├── Turn 2: { input: N, output: N, cumulative: N }
├── ...
├── Task 1 Total: { input: N, output: N, total: N }
├── Task 2 Total: { input: N, output: N, total: N }
└── Session Total: { input: N, output: N, grand_total: N }
Model Pricing Reference (2025-2026)
Claude Models
| Model | Input (per 1M tokens) | Output (per 1M tokens) |
|---|---|---|
| Claude Opus 4 | $15.00 | $75.00 |
| Claude Sonnet 4 | $3.00 | $15.00 |
| Claude Haiku 3.5 | $0.80 | $4.00 |
Cost Calculation
Cost = (input_tokens × input_price / 1,000,000) + (output_tokens × output_price / 1,000,000)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 180 lines · 0 tokens per session scan A 4468dee2238a
token-tracker is a command published in the GitHub repository JoasASantos/ClaudeAdvancedPlugins (154 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,570 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.