plugins/cc-usage/skills/cc-usage/SKILL.md
Analyze Claude Code token usage, costs, billing blocks, and tool activity from local session data. TRIGGER WHEN: the user asks about their usage, costs, burn rate, or wants a usage dashboard/report. DO NOT TRIGGER WHEN: the task is outside the specific scope of this component.
npx skillsauth add acaprino/alfio-claude-plugins cc-usageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze Claude Code session data to generate usage reports with token counts, cost estimates, billing block tracking, tool usage stats, and per-project breakdowns.
Inspired by paulrobello/par_cc_usage.
Claude Code stores session data as JSONL files in:
~/.config/claude/projects/ (Linux/macOS primary)~/.claude/projects/ (legacy Unix)%USERPROFILE%\.claude\projects\ (Windows, default)CLAUDE_CONFIG_DIR env var (all platforms)The script parses these files, extracts assistant message token usage, deduplicates by request ID, and computes:
Run the analysis script:
python plugins/cc-usage/skills/cc-usage/scripts/cc_usage.py
| Flag | Description |
|------|-------------|
| -d, --days N | Number of days to analyze (default: 7) |
| -p, --project NAME | Filter by project name (substring match) |
| --no-block | Hide current billing block section |
| --no-projects | Hide project breakdown |
| --no-tools | Hide tool usage stats |
| --no-sessions | Hide recent sessions list |
| -n, --top N | Number of top items per section (default: 10) |
| --json | Output raw JSON instead of formatted markdown |
# Last 7 days, full report
python cc_usage.py
# Last 30 days, filter to one project
python cc_usage.py -d 30 -p "my-project"
# Quick overview, no details
python cc_usage.py --no-tools --no-sessions -n 5
# Machine-readable JSON output
python cc_usage.py --json
Run this script for the user when they ask about:
Execute via Bash:
python <path-to-script>/cc_usage.py [options]
Then present the markdown output directly to the user -- it renders as formatted tables.
The script reads Claude Code's native JSONL format. Key fields extracted:
message.usage - token counts (input, output, cache_creation, cache_read)message.model - model identifier for pricing tiermessage.content[].type == "tool_use" - tool call trackingcostUSD - native cost field (used when available, falls back to calculated)requestId - deduplication keytimestamp - for time-based analysisPricing is defined in a single source of truth: scripts/cc_usage.py (see the MODEL_PRICING table near the top). To update prices, edit that table -- this document intentionally does not duplicate the numbers to avoid drift.
When costUSD is present in the JSONL data, that value takes priority over calculated estimates.
tools
Master memory forensics techniques including memory acquisition, process analysis, and artifact extraction using Volatility and related tools. Use when analyzing memory dumps, investigating incidents, or performing malware analysis from RAM captures.
development
Master binary analysis patterns including disassembly, decompilation, control flow analysis, and code pattern recognition. Use when analyzing executables, understanding compiled code, or performing static analysis on binaries.
development
Idiomatic Kotlin implementation patterns: coroutines and structured concurrency, Flow / StateFlow / SharedFlow, Kotlin Multiplatform (KMP) shared-code architecture, Jetpack Compose UI, Ktor server with JWT auth and Exposed, and type-safe DSL design (lambdas with receivers, delegated properties, inline reified, value classes). TRIGGER WHEN: building, writing, or reviewing Kotlin code using coroutines / Flow / suspend functions, expect/actual, Compose composables / ViewModels, Ktor routing, sealed-class state modeling, scope functions, or DSL builders. DO NOT TRIGGER WHEN: libGDX game work (use libgdx-development), Android Java without Kotlin, or pure JVM tuning unrelated to Kotlin language features.
tools
Strategic website planning skill that conducts structured client discovery, produces professional deliverables (website brief, sitemap, design direction, content strategy), and orchestrates frontend-design, frontend-layout, seo-specialist, and content-marketer agents automatically. TRIGGER WHEN: planning a new website or redesign before any code is written. DO NOT TRIGGER WHEN: the task is outside the specific scope of this component.