token-usagelisted
Install: claude install-skill citedy/skills
# Token Usage Analyzer
Analyze token consumption patterns and estimate costs from Claude Code session files (`~/.claude/projects/`).
## What It Does
- Parses all JSONL session files to extract token metrics (input, cache creation, cache read, output)
- Groups usage by project and session
- Estimates costs based on Claude model pricing
- Identifies most expensive sessions and subagent usage
- Supports time range filtering (today, week, month, N days, specific date)
- Generates a detailed markdown report
## Usage
Run the analyzer with a time range argument:
```bash
python3 .claude/skills/token-usage/scripts/analyze.py $ARGUMENTS
```
### Arguments
| Argument | Example | Description |
|----------|---------|-------------|
| *(empty)* | | All time |
| `today` | `today` | Since midnight UTC |
| `week` | `week` | Last 7 days |
| `month` | `month` | Last 30 days |
| N (number) | `3` | Last N days |
| Date | `2026-04-01` | Since that date |
| Datetime | `2026-04-01 11:00` | Since that datetime |
### Additional flags
- `--compare` — show current period vs previous period of same length
Example: `--compare week` shows this week vs last week.
### Output
The script prints a summary to stdout and saves a detailed report to:
```
~/.claude/token-usage-reports/token_report.md
```
## Cost Estimation
Prices are per million tokens, detected automatically per model:
| Model | Input | Cache Create | Cache Read | Output |
|-------|-------|-------------|------------|--------|
| Opus |