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 skills add techwolf-ai/ai-first-toolkit --skill token-doctorgit clone --depth 1 https://github.com/techwolf-ai/ai-first-toolkitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/techwolf-ai/ai-first-toolkit/token-doctor)<a href="https://agentmods.dev/skills/techwolf-ai/ai-first-toolkit/token-doctor"><img src="https://agentmods.dev/badge/skills/techwolf-ai/ai-first-toolkit/token-doctor/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/techwolf-ai/ai-first-toolkit/token-doctor"><img src="https://agentmods.dev/badge/skills/techwolf-ai/ai-first-toolkit/token-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00123 | $0.04302 |
| Opus 5.5 | $0.00049 | $0.01721 |
| Sonnet 5.5 | $0.00025 | $0.00860 |
| Haiku 4.5 | $0.00012 | $0.00430 |
Grade C, and why
token-doctor scanned grade C with 1 finding 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 2mo 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- The user can `rm -rf out/` to wipe everything. How it starts
The opening of the file, as written. The whole thing — 314 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Token Doctor
Platforms: Claude Code / Cowork and Codex.
scripts/inventory.pydetects the host (via theplatformstampinstall.shwrites, orAI_FIRST_PLATFORM) and routes: Claude Code (~/.claude/projects) + Cowork transcripts, or Codex rollouts (~/.codex/sessions). Codex token usage comes from Codex's own per-responsetoken_countevents; cost uses OpenAI list rates inpricing.py(gpt-5.4 family; unknown models show token counts with no fabricated cost). Antigravity is unsupported: its IDE store is AEAD-encrypted at rest and its CLI store has no parseable turn/token content, so the skill prints a clear "not available" message and exits.
Two-stage diagnostic. Stage 1 is fast and lands directly in the terminal so the user always walks away with their numbers. Stage 2 is opt-in, fans out subagents over hotspots, and writes a tight Markdown report.
Read this whole file before running.
When to run
Trigger phrases: "diagnose my Claude habits", "why am I spending so much", "where are my tokens going", "audit my spend", "token doctor", "what's driving my Claude bill".
Do NOT trigger for:
- "what tasks do I do with Claude" → that's
task-profile. - "where did I work on X" → that's
session-search.
The line is: token-doctor is about cost shape, not task inventory or recall.
Prerequisites
- Claude Code transcripts:
~/.claude/projects/*/*.jsonl(CLI and desktop app) - Sub-agent transcripts:
~/.claude/projects/*/<sid>/subagents/**/*.jsonl, including workflow agents undersubagents/workflows/<wf>/ - Claude Cowork transcripts (optional):
~/Library/Application Support/Claude/local-agent-mode-sessions/*/*/local_*/audit.jsonl - Python 3, stdlib only. No external services.
If neither path exists, stop and say so.
What counts as one session
Sub-agent transcripts are separate files but the same piece of work, so their cost rolls into the parent session rather than appearing as sessions of their own. This matters when you read the report:
What ships with it
11 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/antipattern-taxonomy.md 6.8 KB
- references/diagnosis-rubric.md 6.0 KB
- references/pricing.md 1.4 KB
- references/recommendation-templates.md 3.0 KB
- scripts/build_payloads.py 6.1 KB runs code
- scripts/codex_sessions.py 8.8 KB runs code
- scripts/host_platform.py 3.8 KB runs code
- scripts/inventory.py 21 KB runs code
- scripts/personal_stats.py 9.7 KB runs code
- scripts/pick_hotspots.py 3.9 KB runs code
- scripts/pricing.py 2.5 KB runs code
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.
- 2mo ago Changed · +31 lines 138493ba3e12
- 3mo ago First seen · 283 lines · 123 tokens per session scan C 15251766e0cb
token-doctor is a skill published in the GitHub repository techwolf-ai/ai-first-toolkit (150 stars, last pushed 2mo ago), licensed MIT. It adds 123 tokens to every session and 4,302 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
token-doctor compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| token-doctortechwolf-ai/ai-first-toolkit | Skill | 150 | 2mo ago | MIT | C | 123 | Claude Code |
| managing-mcp-serversJetBrains/thinkrail | Skill | 8.5k | yesterday | Apache-2.0 | A | 62 | Claude Code, Codex |
| todosJetBrains/thinkrail | Skill | 8.5k | yesterday | Apache-2.0 | A | 58 | Claude Code, Codex |
| writing-workflow-skillsJetBrains/thinkrail | Skill | 8.5k | yesterday | Apache-2.0 | A | 60 | Claude Code, Codex |
| writing-specsJetBrains/thinkrail | Skill | 8.5k | yesterday | Apache-2.0 | A | 59 | Claude Code, Codex |
| financetravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 48 | Claude Code |
| newsletter-creatortravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 36 | Claude Code |