discovery-token-usagelisted
Install: claude install-skill timothymeyers/discovery-tools
# discovery-token-usage — Discovery App Token Miner
Mine `.discovery/` exhaust from any Discovery workspace and produce a
comprehensive read-out of token usage across engines, models, and
interactive chat.
## When to use
Trigger when the user asks anything like:
- "Review token usage in this Discovery workspace"
- "How many tokens did the science-engine burn?"
- "Give me a read-out of tokens by model / by engine"
- "Mine .discovery/ for token info"
- "Compare Clio vs copilot-cli spend"
- "What prompts did the engines run?"
- "Show me the TokenJournal / SESSION_SHUTDOWN metrics"
Do NOT trigger for:
- General Azure or GitHub Copilot billing questions (no `.discovery/` involved)
- Interactive-only chat token questions divorced from Discovery App
## Vocabulary (be precise when the user asks)
Discovery emits telemetry at three different granularities. The miner
output uses these terms exactly:
| Term | Means | Source | Typical ratio |
|---|---|---|---|
| **run** | One engine execution (like "Complete DX-3 subtree") | `engine-runs/*/meta.json` | 1 |
| **SDK call** | Clio entering the Copilot SDK once | `clio-stderr.log` (1 line per invocation) | ~10 per run |
| **msg** | One `ASSISTANT_MESSAGE` event (per-model attribution comes from these) | `conversation_history.json` | ~40 per SDK call |
| **API req** | One HTTP request to a model (used for `--with-cost` × static multiplier) | `SESSION_SHUTDOWN.ShutdownModelMetric.requests.count` | ~10 per SDK call |
| **prompt** | One