Skip to content
Back to skills

Ccusage Report

ASecurity

'Report Claude Code token consumption and costs using ccusage. Use

  • 21 stars
  • 0 votes
  • 2 copies
  • 10 views
  • Added September 7, 2026
toolsgoapi

Works with

  • claude code
  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill ccusage-report --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ccusage Report?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ccusage Report
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-ccusage-report/badge)](https://www.skillsdirectory.com/skills/modbender-ccusage-report)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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. Triggers on:
  "show my claude code usage", "how much did I spend", "my token consumption",
  "ccusage report", "usage report", "token consumption", "how much did I
  spend".'
---


# Claude Code Usage Report

Uses `bunx ccusage` to report token consumption and costs from Claude Code sessions.

## Workflow

### 1. Determine the period

Identify the period from the user's message:

| Keyword | Period | Command suffix |
|---------|--------|---------------|
| "today", default | daily | `daily` |
| "this week" | weekly | `weekly` |
| "this month" | monthly | `monthly` |

### 2. Run ccusage

```json
{ "tool": "exec", "command": "bunx ccusage <period> --no-color -z Europe/Paris -o desc" }
```

Add `--breakdown` if the user asks for per-model details.

**Filtering by date range:**
- Today only: `--since $(date +%Y%m%d) --until $(date +%Y%m%d)`
- Last 7 days: `--since $(date -d '7 days ago' +%Y%m%d)`
- Specific month: `--since 20260201 --until 20260228`

### 3. Format the output

```
📊 Claude Code Usage — <period>

Date/Period : <value>
Models      : <comma-separated list>
Input       : <n> tokens
Output      : <n> tokens
Cache read  : <n> tokens
Total       : <n> tokens
Cost        : $<amount> USD
```

For multi-row output (e.g. last 7 days), summarize totals and list each row briefly.

### 4. Deliver

- **Chat**: Send the formatted message directly
- **Telegram (cron context)**: Reply with ONLY the formatted message in a code block — no extra commentary

### 5. Error handling

- If `bunx ccusage` fails → check if bun/bunx is installed, report the error
- If no data for the requested period → inform the user clearly ("No usage data found for this period")
- If the output is empty → suggest checking a broader date range

## 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)` |

Files in this skill

  • CHANGELOG.md148 B
  • README.md492 B
  • SKILL.md2.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.