npx claudepluginhub timgranlundmarsden/claude-agent-flowThis skill uses the workspace's default tool permissions.
Analyse Claude Code session token costs inline. All formatting is done by the CLI — no LLM work required for data crunching or display.
Analyzes Claude Code conversation logs for token usage, costs, cache hit rates, workflow patterns (skills, agents, hooks), and cost optimizations. Generates interactive HTML dashboard.
Runs local Python CLI dashboard analyzing Claude Code JSONL transcripts for per-prompt token costs, heatmaps, cache analytics, project comparisons, and optimization tips.
Displays per-session token usage breakdown for the last N days (default 7). Invoke via /token-usage or /token-usage <days> to track AI costs.
Share bugs, ideas, or general feedback.
Analyse Claude Code session token costs inline. All formatting is done by the CLI — no LLM work required for data crunching or display.
$CLAUDE_SESSION_ID)--today — sessions from 00:00 local time today to now--24h — sessions from exactly 24 hours ago to now (rolling window)--week — sessions from last 7 days--session <uuid> — specific session by UUID--models — add per-model usage breakdown (answers "did agents use different models?")Always include --breakdown --models to produce the richest output by default. Only omit them if the user explicitly asks for a minimal view.
python3 .claude/skills/token-analyser/token-analyser \
[--today | --24h | --week | --session <uuid>] \
--breakdown --models \
[--project-path <cwd>]
⚠️
--project-pathmust be the actual working directory Claude Code was invoked from (i.e.$PWD), not the git root. Defaults to$PWDautomatically.
Capture and print the full stdout output verbatim — it contains the complete Markdown dashboard.
Print the CLI stdout verbatim. The dashboard includes:
If the user wants to prevent the detected issues going forward:
python3 .claude/skills/token-analyser/token-analyser \
[--today | --24h | ...] \
--write-guidelines
Appends applicable token-efficiency guidelines to <project-path>/CLAUDE.md. Safe to re-run — uses a marker to avoid duplicates.
python3 .claude/skills/token-analyser/token-analyser \
[--today | --24h | ...] \
--report
Saves to .claude/reports/token-analyser-YYYY-MM-DD-HH-MM.md and opens the file on macOS.
Included by default (--models). Shows a MODEL BREAKDOWN table with calls/tokens/cost per model and warns if all calls used a single model — indicating that agent model: frontmatter overrides are not being applied (subagents inherit the parent session model).
Included by default (--breakdown). Shows a CALL BREAKDOWN table with each API call: raw (uncached) input, cache writes (new tokens written to cache), cache reads (tokens reused from cache), total context Claude saw, and output. Annotates the call with the largest cache write spike.
python3 .claude/skills/token-analyser/token-analyser --json
Outputs raw JSON from the underlying parse-logs.py parser.
parse-logs.py lives alongside this CLI in the same skill directory~/.claude/projects/<encoded>/subagents/*.jsonl