claude-usage

Covers both Claude Code and Claude Cowork, plus Cursor if you use it. Extract usage metadata from your local Claude Code data (~/.claude), Claude Cowork sessions (the Claude desktop app’s agent mode) and, when it is installed, Cursor, and view it in one self-contained HTML dashboard. Filter by app, or compare them side by side. If there is no Cursor data, Cursor doesn’t appear anywhere in the dashboard.

Most usage tools only read Claude Code’s ~/.claude folder. Cowork keeps its sessions elsewhere (see Claude Cowork), and this tool reads both. See Cursor for what is read from Cursor.

Live demo (randomly generated sample data)

Dashboard screenshot, sample data

Records tokens, estimated cost, models, tools, latency, errors, subagents, compactions and activity timing. Prompt and response text is never extracted.

Python 3.10+ and the standard library are all you need: no dependencies, no network calls.

Usage

python extract.py                    # ~/.claude -> out/usage.sqlite + out/csv/*.csv
python build_dashboard.py --open     # -> out/dashboard.html
python build_artifact.py             # -> out/artifact.html, ready to publish as a claude.ai Artifact

skill/claude-usage-report.skill packages these scripts as a shareable skill. It contains no data; each person who runs it reads their own.

extract.py --no-titles omits auto-generated session titles. --no-cowork skips Cowork; --cowork-dir PATH points at a non-default Cowork folder. --no-cursor skips Cursor, --cursor-dir PATH points at a non-default Cursor folder, and --cursor-usage-csv FILE (repeatable) adds billed cost from a Cursor usage export.

Everything is written to out/, which is gitignored. Treat it as personal data.

What’s in the dashboard

Every chart has a table view.

Claude Cowork

Cowork (the Claude desktop app’s agent mode) doesn’t write to ~/.claude. Its sessions live in %APPDATA%\Claude\local-agent-mode-sessions on Windows and ~/Library/Application Support/Claude/local-agent-mode-sessions on macOS. Each session there has:

A session’s project is the first folder you picked for it, or “Cowork: scheduled” / “Cowork: no folder”. Typed Cowork prompts carry no origin tag, so a non-subagent prompt that isn’t a tool result or harness message counts as yours.

Cursor

Cursor keeps its chat history in a SQLite database, %APPDATA%\Cursor\User\globalStorage\state.vscdb on Windows (~/Library/Application Support/Cursor/User/globalStorage/state.vscdb on macOS). It is opened read-only, and reading it takes a minute or two because the file is large. From it:

The ItemTable in state.vscdb holds auth tokens and is never read.

Limits:

Notes