Agent skill · data analytics · aradotso

claude-usage-dashboard

claude-usage-dashboard — an agent skill for coding agents.

Why this skill is useful

Adds a local SQLite database and CLI commands for parsing and visualizing Claude Code usage logs, which the AI wouldn't generate on its own.

What it needs

Requires python installed locally. About 5k tokens when loaded. Last updated 2026-07-09. 70 stars on the source repository.

What this skill does

bash git clone https://github.com/phuryn/claude-usage cd claude-usage bash macOS/Linux python3 cli.py dashboard # scan + open browser dashboard at http://localhost:8080 python3 cli.py scan # parse JSONL files, populate ~/.claude/usage.db python3 cli.py today # print today's usage summary by model python3 cli.py stats # print all-time statistics Windows python cli.py dashboard python cli.py scan python cli.py today python cli.py stats json { "type": "assistant", "message": { "model": "claude-sonnet-4-6", "usage": { "inputtokens": 1234, "outputtokens": 567, "cachecreationinputtokens": 890, "cachereadinputtokens": 4321 } } } python from scanner import Scanner Scan all Claude Code JSONL logs into ~/.claude/usage.db scanner = Scanner() scanner.scan() Access the SQLite database directly import sqlite3 from pathlib import Path dbpath = Path.home() / ".claude" / "usage.db" conn = sqlite3.connect(dbpath) cursor = conn.cursor() Get total tokens by model cursor.execute(""" SELECT model, SUM(inputtokens) as totalinput, SUM(outputtokens) as totaloutput, SUM(cachereadinputtokens) as totalcacheread FROM usage GROUP BY model ORDER BY totalinput DESC """) rows = cursor.fetchall() for row in rows: print(row) conn.close() python from dashboard import DashboardServer Start the dashboard on a custom port server = DashboardServer(port=9090) server.serve() Opens http://localhost:9090 in browser python import sqlite3 from pathlib import Path from datetime import date, timedelta dbpath = Path.home() / ".claude" / "usage.db" conn = sqlite3.connect(dbpath) cursor = conn.cursor() Today's usage today = date.today().isoformat() cursor.execute(""" SELECT model, SUM(inputtokens), SUM(outputtokens), SUM(cachecreationinputtokens), SUM(cachereadinputtokens) FROM usage WHERE DATE(timestamp) = ? GROUP BY model """, (today,)) print("Today's usage:", cursor.fetchall()) Last 7 days cost estimate (sonnet only) weekago = (date.today() - timedelta(days=7)).isoformat() cursor.execute(""" SELECT SUM(inputtoken …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aradotso/claude-usage-dashboard

View the source on GitHub

Browse the @skills marketplace