Token Usage — Data skill for Claude Code
Local LLM token usage analytics for Claude, Codex, OpenCode, ZCode, WorkBuddy, and Zhipu-AutoClaw — build your own multi-dimensional reports without SQL; CLI and daemon for macOS and Windows.
How to install Token Usage
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open YuLaiZ/token-usage and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Token Usage does
Local LLM token usage analytics for Claude, Codex, OpenCode, ZCode, WorkBuddy, and Zhipu-AutoClaw — build your own multi-dimensional reports without SQL; CLI and daemon for macOS and Windows. — 本地 LLM token 用量分析工具,支持 Claude、Codex、OpenCode、ZCode、WorkBuddy、Zhipu-AutoClaw——无需 SQL 打造自定义多维报表;提供 CLI 与守护进程,支持 macOS 与 Windows。
Alternatives in Data
- Opencode Mem — OpenCode plugin that gives coding agents persistent memory using local vector database 1.5k ★
- Agentlytics — Comprehensive analytics dashboard for AI coding agents — Cursor, Windsurf, Claude Code, VS Code Copilot, Zed 473 ★
- Research System — You are a Database Research Agent specialized in analyzing MySQL database schemas and generating comprehensive 64 ★
README
token-usage
[简体中文](README.zh-CN.md) | English
A local LLM usage analytics tool for collecting, analyzing, and querying token usage across AI clients — and for turning that data into your own multi-dimensional usage reports, no SQL required.
Features
- Message/API-request-level accounting: each actual model invocation is stored independently instead of aggregating tokens by session.
- Accurate attribution across dates and models: messages that span dates, sessions that use multiple models, and forks/branches are neither missed nor double-counted.
- Preserves actual rewind consumption: completed calls before a rewind and new calls after it are kept separately rather than deduplicated.
- Codex rollout replay deduplication: replayed complete token snapshots caused by rate-limit bucket changes are not counted twice, while legitimate resets and multi-turn calls are retained.
- Multiple data sources: Claude Code/Desktop, OpenCode, Codex, WorkBuddy, ZCode, and Zhipu-AutoClaw.
- CC Switch router attribution: backfills the actual provider/model from CC-Switch proxy logs (currently effective only for the Claude family).
- Build your own usage reports — no SQL required: combine
client,model,provider, andprojectinto named multi-dimensional views; compose built-in and custom views into reusable, ordered report groups; set a personal default and run it by name. The guided configuration TUI andquery listmake those views discoverable and easy to maintain. - Two run modes: one-off CLI commands and a real-time monitoring daemon with nginx-style background startup.
- Autostart: macOS launchd and the Windows Registry, configurable through the config TUI or
config set. - Opt-in configuration: every client is disabled by default; enable only the ones you use, while data-source paths fall back to ready-to-use defaults.
- Single-binary distribution: built with Go and pure-Go SQLite (no CGO), with macOS and Windows supp
Related Skills
WhereMyTokens
new Windows system tray app for monitoring Claude Code token usage in real time. Per-session token counts, cos
AIUsageMonitor
Read-only CLI/WPF analytics for Claude Code's local usage data — usage reports, model breakdowns, and cost est
Cc One
Desktop dashboard for AI coding CLIs — turns Claude Code, Codex, Gemini CLI, Grok CLI and OpenCode session log
Verge
Ambient desktop overlay that tracks AI coding agents (Claude Code, Codex/ChatGPT, and more) — real activity, u
Claudoscope
29 Native macOS menu bar app for Claude Code session analytics. Token/cost tracking, full-text search, real-ti
Token Lens
Local-only dashboard for AI coding sessions. Track turns, tokens, and cost across Cursor, Claude Code, and Ope
Related Agents
Slim Wrapper
tfx-route.sh 경유 전용 래퍼 에이전트. 코드를 직접 읽거나 수정하지 않고 Bash(tfx-route.sh)를 통해 Codex/Antigravity에 위임하는 thin wrapper. OS
Byok Token Security Expert
BYOK (Bring-Your-Own-Key) and OAuth token security expert. Deep on cross-platform OS keychain integration (mac
Session Error Analyzer
Analyzes specific AI IDE sessions (Claude Code, OpenAI Codex, OpenCode) for LLM behavior errors and returns a