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/anvil-toolset 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.
development
Unified web frontend knowledge base covering CSS architecture, UX psychology, UI components, distinctive aesthetics, and interface design generation. TRIGGER WHEN: working on web styling, design systems, component decisions, responsive strategy, distinctive frontend aesthetics, or exploring multiple interface designs. DO NOT TRIGGER WHEN: the task is purely backend or unrelated to web frontend.
development
Coordinate parallel code reviews across multiple quality dimensions with finding deduplication, severity calibration, and consolidated reporting. Use this skill when organizing multi-reviewer code reviews, calibrating finding severity, or consolidating review results.
tools
Knowledge base for the codebase-mapper plugin. Provides writing guidelines, tone rules, and diagram conventions for generating human-readable project guides. Referenced by all codebase-mapper agents during document generation. TRIGGER WHEN: referenced by codebase-mapper pipeline agents (codebase-explorer, overview-writer, tech-writer, flow-writer, onboarding-writer, ops-writer, config-writer, guide-reviewer) during document generation. DO NOT TRIGGER WHEN: outside the /map-codebase pipeline (general documentation work should use docs:readme-craft or codebase-mapper:docs-create).
tools
Progressive Web App knowledge base for 2025-2026: Web App Manifest, Service Workers (Workbox 7, Serwist), Web Push (VAPID, RFC 8030/8291/8292, Declarative Push for Safari 18.4+), install flows (beforeinstallprompt, Window Controls Overlay), OPFS storage, Project Fugu, Core Web Vitals (INP < 200ms), security (HTTPS, CSP, COOP/COEP), and distribution (Bubblewrap, PWA Builder MSIX, Capacitor). TRIGGER WHEN: building, auditing, or debugging PWAs, including manifest, service worker, Web Push, install flow, OPFS, Background Sync, Wake Lock, vite-plugin-pwa, Next.js Serwist, @angular/pwa, @vite-pwa/nuxt, Bubblewrap, TWA, PWA Builder, or Capacitor wrapping. DO NOT TRIGGER WHEN: the task is generic frontend styling (use frontend), React performance (use react-development:review-react), cross-platform security unrelated to PWA (use platform-engineering), Tauri or Electron wrappers (use tauri-development), or GA4 / analytics (use digital-marketing).