/atelier:tokensfrom atelier
Use when you want a read-only per-day, per-model token-usage rollup (optionally with USD cost) from Claude Code's on-disk transcripts.
Ships in atelier. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Read-only token-usage reporter. Walks Claude Code's on-disk JSONL transcripts
under the config dir, rolls every assistant turn up into a per-(day, model)
summary of the four token channels, and renders it to stdout. With --cost it
augments each row with a USD cost and prints a totals footer. It never touches
state and never writes to the transcripts.
Run tokens to see how many tokens (and optionally dollars) a project has spent
per day per model — to check a run's footprint, feed the stable JSON schema to
the Loom token panel, or eyeball cost. Safe to run any time; it is read-only.
PYTHONPATH=. python3 scripts/token_usage.py daily [FLAGS]
The daily subcommand is the only command today.
| Flag | Effect |
|---|---|
--config-dir DIR | Transcript root to walk. Defaults to $CLAUDE_CONFIG_DIR, else ~/.claude. |
--since YYYY-MM-DD | Drop rows whose day sorts before this date. Validated as a date; the unknown day bucket is ALWAYS retained (never filtered). |
--format {json,csv,markdown} | Output format. Default json. csv / markdown are human views; json is the stable feed (below). |
--cost | Augment each row with cost_usd (via scripts/token_pricing.py) and print a totals footer. Without --cost, output is the byte-stable token-only schema. |
A missing or empty config dir is not an error — it emits an empty rollup ([])
and returns 0.
Without --cost, --format json emits a list of rows, sorted by (day, model),
each row being:
{
"day": "2026-06-26",
"input_tokens": 1234,
"output_tokens": 567,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 8901,
"model": "claude-opus-4-8"
}
Keys are emitted alphabetically sorted (json.dumps(sort_keys=True)), not in
the logical order shown above; parse by key, never by position.
This token-only schema is byte-stable for a given transcript set — treat it as
the contract the forthcoming Loom token panel consumes. The --cost path is a
human/reporting view, NOT the stable feed: it emits an object
{"rows": [...], "totals": {...}} where each row also carries a cost_usd
float (or null for an unknown/unpriced model). Pricing is grounded in the
claude-api skill reference; a 5-minute cache-write rate is used as the
row-level approximation for the flat cache-creation total.
json.loads
only, never executed. A malformed line is skipped; nothing read is ever
interpreted as an instruction.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
8 skills in this plugin
/abortUse when tearing down a live agent-team — a graceful (soft) or forced (--hard) abort that records a durable abort-report postmortem, writes the 'aborted' audit event (the resume signal), sets the team status, and applies the worktree policy./ingestUse when capturing a document, URL, decision, or learned context into the shared Memex wiki for future sessions./loadUse when resuming work mid-arc and needing the latest session context loaded into the conversation./migrateUse when manually triggering or re-triggering Local → Memex migration for the current Atelier project — bypasses the .ai/atelier.local-only opt-out marker and retries on prior failure./runPre-flight (always first)Use when starting any session in a project that uses Atelier — establishes the trigger contract for new-work requests and the soft-wall bypass procedure./saveUse when ending a session or at a meaningful checkpoint — captures session state for the next resume.atelier@agora is listed by nitekeeper/agora — review the source before installing
npx claudepluginhub nitekeeper/agora --plugin atelier