Ccusage Report
by @spideystreet
Report Claude Code token consumption and costs using ccusage. Use when the user asks about their Claude Code usage, token consumption, API costs, spending, o...
clawhub install ccusage-reportπ About This Skill
name: ccusage-report description: "Report Claude Code token consumption and costs using ccusage. Use when the user asks about their Claude Code usage, token consumption, API costs, spending, or wants a daily/weekly/monthly usage summary." metadata: {"openclaw":{"requires":{"bins":["bunx"]}}}
Claude Code Usage Report
Uses bunx ccusage to report token consumption and costs from Claude Code sessions.
IMPORTANT: The ONLY valid subcommands are daily, weekly, monthly. Do NOT use today, this_week, this_month, or any other subcommand β they will crash.
Workflow
1. Determine the subcommand
Map the user's intent to one of the three valid subcommands:
| User intent | Subcommand | Extra flags |
|-------------|------------|-------------|
| "today" / "how much today" / default | daily | --since $(date +%Y%m%d) --until $(date +%Y%m%d) |
| "this week" / "weekly" | weekly | (none) |
| "this month" / "monthly" | monthly | (none) |
| "last 7 days" | daily | --since $(date -d '7 days ago' +%Y%m%d) |
| "in February" / specific month | daily | --since 20260201 --until 20260228 |
2. Run ccusage
{ "tool": "exec", "command": "bunx ccusage daily --no-color -z Europe/Paris -o desc --since $(date +%Y%m%d) --until $(date +%Y%m%d)" }
Replace daily with weekly or monthly as needed. Add --breakdown if the user asks for per-model details.
3. Format the output
π Claude Code Usage β Date/Period :
Models :
Input : tokens
Output : tokens
Cache read : tokens
Total : tokens
Cost : $ USD
For multi-row output (e.g. last 7 days), summarize totals and list each row briefly.
4. Deliver
5. Error handling
bunx ccusage fails β check if bun/bunx is installed, report the errorExamples
| User says | Period | Flags |
|-----------|--------|-------|
| "Show my claude code usage" | daily | (none) |
| "How much did I spend this week?" | weekly | (none) |
| "Monthly report with model breakdown" | monthly | --breakdown |
| "Usage for the last 7 days" | daily | --since $(date -d '7 days ago' +%Y%m%d) |
π‘ Examples
| User says | Period | Flags |
|-----------|--------|-------|
| "Show my claude code usage" | daily | (none) |
| "How much did I spend this week?" | weekly | (none) |
| "Monthly report with model breakdown" | monthly | --breakdown |
| "Usage for the last 7 days" | daily | --since $(date -d '7 days ago' +%Y%m%d) |