Costeamigo — Historical Token Consumption Report
You generate a comprehensive, well-organized report of historical token consumption.
Step 1: Choose platform
Check $ARGUMENTS:
- If
$ARGUMENTS is all → report all platforms combined
- If
$ARGUMENTS is openclaw → report OpenClaw only
- If
$ARGUMENTS is claude → report Claude Code only
- If
$ARGUMENTS is codex → report Codex CLI only
- If
$ARGUMENTS is empty or unrecognized → ask the user to choose:
Use AskUserQuestion with this format:
Choose a platform to analyze:
A) all — Combined report (OpenClaw + Claude Code + Codex)
B) openclaw — OpenClaw sessions
C) claude — Claude Code sessions
D) codex — Codex CLI sessions
Enter A/B/C/D or platform name:
Map the user's response:
- A / all →
all
- B / openclaw →
openclaw
- C / claude →
claude
- D / codex →
codex
Step 2: Generate report data
Run the report script with the chosen source filter:
bash "SCRIPT_DIR/scripts/report.sh" --source <chosen_platform>
(Replace SCRIPT_DIR with the directory where this SKILL.md file lives.)
Valid --source values: all, openclaw, claude-code, codex
Note: user says "claude" but the script expects "claude-code". Map accordingly:
claude → --source claude-code
openclaw → --source openclaw
codex → --source codex
all → --source all
The script outputs JSON with these sections:
overview: total tasks, tokens, cost, time range, sources
by_source: breakdown per platform with models used
by_skill: aggregation per skill
by_model: aggregation per model
by_tool: tool usage ranking
reasoning_vs_tools: reasoning vs tool-invocation split
top_tasks_by_tokens: top 10 most token-heavy tasks
all_tasks: every task with full metrics
Step 3: Analyze and present
Using the JSON data, produce a clear, layered report:
Layer 1: Overview
- Total tasks, total tokens, total cost
- Time range covered
- Platform(s) analyzed
Layer 1.5: By Source Platform (only in all mode)
- Show each platform with: task count, tokens, models used
- Estimate cost for platforms without cost data using model pricing:
- Claude Opus 4.6: $15/MTok input, $75/MTok output, $1.50/MTok cache read, $18.75/MTok cache write
- Claude Sonnet: $3/MTok input, $15/MTok output
- Claude Haiku: $0.80/MTok input, $4/MTok output
- GPT-5.2-codex: $1.75/MTok input, $14/MTok output, $0.175/MTok cache read
- GPT-5.4: $2.50/MTok input, $15/MTok output
Layer 2: By Category
By Skill:
- List each skill with: invocation count, total tokens, total cost, avg cost
- "(conversation)" = non-skill direct chat tasks
By Model:
- List each model with: task count, tokens (input/output/cache split), cost
By Tool:
- Rank tools by total call count
Layer 3: Efficiency Analysis
Reasoning vs Tool Invocation:
- Show the percentage split
- high reasoning % = mostly thinking; high tool % = lots of file I/O
Top Expensive Tasks:
- List top 5 most costly tasks
- Show: task prompt, tokens, cost, tools used
Layer 4: Insights (LLM analysis)
2-3 brief, actionable insights based on the data.
Formatting
- Use tables for structured data
- Use bold for key numbers
- Keep it scannable
- Use Chinese if the user communicates in Chinese, English otherwise
1---2name: costeamigo3description: Historical token consumption report across OpenClaw, Claude Code, and Codex CLI. Rebuilds task index from all session logs and produces a structured summary: per-source breakdown, per-skill aggregation, per-model cost, tool usage patterns, and reasoning vs tool-invocation analysis. Use when: 'token report', 'usage summary', 'how much have I spent', 'token history', 'cost report', 'show usage'.4---56# Costeamigo — Historical Token Consumption Report78You generate a comprehensive, well-organized report of historical token consumption.910## Step 1: Choose platform1112Check `$ARGUMENTS`:1314- If `$ARGUMENTS` is `all` → report all platforms combined15- If `$ARGUMENTS` is `openclaw` → report OpenClaw only16- If `$ARGUMENTS` is `claude` → report Claude Code only17- If `$ARGUMENTS` is `codex` → report Codex CLI only18- If `$ARGUMENTS` is empty or unrecognized → ask the user to choose:1920Use AskUserQuestion with this format:2122```23Choose a platform to analyze:2425A) all — Combined report (OpenClaw + Claude Code + Codex)26B) openclaw — OpenClaw sessions27C) claude — Claude Code sessions28D) codex — Codex CLI sessions2930Enter A/B/C/D or platform name:31```3233Map the user's response:34- A / all → `all`35- B / openclaw → `openclaw`36- C / claude → `claude`37- D / codex → `codex`3839## Step 2: Generate report data4041Run the report script with the chosen source filter:4243```bash44bash "SCRIPT_DIR/scripts/report.sh" --source <chosen_platform>45```4647(Replace SCRIPT_DIR with the directory where this SKILL.md file lives.)4849Valid `--source` values: `all`, `openclaw`, `claude-code`, `codex`5051Note: user says "claude" but the script expects "claude-code". Map accordingly:52- `claude` → `--source claude-code`53- `openclaw` → `--source openclaw`54- `codex` → `--source codex`55- `all` → `--source all`5657The script outputs JSON with these sections:58- `overview`: total tasks, tokens, cost, time range, sources59- `by_source`: breakdown per platform with models used60- `by_skill`: aggregation per skill61- `by_model`: aggregation per model62- `by_tool`: tool usage ranking63- `reasoning_vs_tools`: reasoning vs tool-invocation split64- `top_tasks_by_tokens`: top 10 most token-heavy tasks65- `all_tasks`: every task with full metrics6667## Step 3: Analyze and present6869Using the JSON data, produce a clear, layered report:7071### Layer 1: Overview72- Total tasks, total tokens, total cost73- Time range covered74- Platform(s) analyzed7576### Layer 1.5: By Source Platform (only in `all` mode)77- Show each platform with: task count, tokens, models used78- Estimate cost for platforms without cost data using model pricing:79 - Claude Opus 4.6: $15/MTok input, $75/MTok output, $1.50/MTok cache read, $18.75/MTok cache write80 - Claude Sonnet: $3/MTok input, $15/MTok output81 - Claude Haiku: $0.80/MTok input, $4/MTok output82 - GPT-5.2-codex: $1.75/MTok input, $14/MTok output, $0.175/MTok cache read83 - GPT-5.4: $2.50/MTok input, $15/MTok output8485### Layer 2: By Category8687**By Skill:**88- List each skill with: invocation count, total tokens, total cost, avg cost89- "(conversation)" = non-skill direct chat tasks9091**By Model:**92- List each model with: task count, tokens (input/output/cache split), cost9394**By Tool:**95- Rank tools by total call count9697### Layer 3: Efficiency Analysis9899**Reasoning vs Tool Invocation:**100- Show the percentage split101- high reasoning % = mostly thinking; high tool % = lots of file I/O102103**Top Expensive Tasks:**104- List top 5 most costly tasks105- Show: task prompt, tokens, cost, tools used106107### Layer 4: Insights (LLM analysis)1081092-3 brief, actionable insights based on the data.110111## Formatting112113- Use tables for structured data114- Use bold for key numbers115- Keep it scannable116- Use Chinese if the user communicates in Chinese, English otherwise