Claude Code Token Lens — Data skill for Claude Code
A beautiful, local-first usage tracker and analytics dashboard for AI coding agents (Claude Code, etc.).
How to install Claude Code Token Lens
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open AIKnightPanda/claude-code-token-lens and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Code Token Lens does
A beautiful, local-first usage tracker and analytics dashboard for AI coding agents (Claude Code, etc.). (一款美观、本地优先的 AI 编程助手使用量追踪与分析面板)
Alternatives in Data
- Claude Code Usage Monitor — by Maciek-roboblog - A real-time terminal-based tool for monitoring Claude Code token usage 7k ★
- Agentsview — Local-first session intelligence and analytics for coding agents, supporting Claude Code, Codex, and 14 other 824 ★
- Memex — Open-source, local-first AI journal app for iOS and Android 697 ★
README
Claude Code Token Lens
[🇨🇳 中文版 (Chinese Version)](./README_zh.md)

**Claude Code Token Lens** is a beautiful, local-first token usage tracker and analytics dashboard for AI coding agents.
Initially built to parse local logs for **Claude Code**, the architecture is designed to be platform-agnostic, allowing future support for other AI agents (Cursor, Aider, GitHub Copilot CLI, etc.). It aggregates token usage, calculates exact costs, and visualizes daily trends with rich, interactive drill-down capabilities (Project > Session > Conversation > Turns).
✨ Features
- 🔒 Local-First & Secure: Runs entirely on your local machine. It reads your agent's local JSON logs without sending your private codebase or prompt history to any external server. Your data stays yours.
- 📊 Detailed Dashboards: View your total cost, token consumption, and active days at a glance through a modern, glassmorphism-inspired UI.
- 📈 Daily Trends & Aggregation: Beautiful bar charts and line graphs showing input/output/cache tokens and costs per day.
- 🔍 Deep Drill-Down UI: Seamlessly filter and navigate from Projects -> Sessions -> Conversations -> Individual Turns.
- 🏷️ Smart Filtering: Inline filter bubbles make it easy to see exactly what context you are viewing, with one-click clearing.
- 💵 Cost Tracking: Uses the latest pricing models (e.g., Claude 3.5 Sonnet) to accurately compute your API costs based on real usage.
🚀 Getting Started
Prerequisites
- Node.js 18 or higher
- Local AI Agent logs (currently supports
~/.claude/projects/*.jsonlgenerated by Claude Code)
Installation
Clone the repository:
git clone https://github.com/AIKnightPanda/claude-code-token-lens.git cd claude-code-token-lensInstall the dependencies:
npm install # or yarn install / pnpm install
Usage
- Run the d
Related Skills
Token Lens
Local-only dashboard for AI coding sessions. Track turns, tokens, and cost across Cursor, Claude Code, and Ope
Token Dashboard
See where Claude Code is burning tokens - turn raw JSONL transcripts into local cost analytics, hotspot views,
Dashboard For Claude Code
A local Claude Code dashboard for personal analytics: track token usage, API-equivalent cost, sessions, tools,
Tokonto
本地 AI 用量账本:只读会话文件或数据库,汇总 token 用量并按模型、日期和时段估算费用。支持仪表盘、CLI 与脚本插件。Local AI usage ledger: read-only session files
Dsh Agent Token Stats
Cross-agent token usage dashboard for DeepSeek Harness: aggregates local logs of Claude Code, OpenCode, Cursor
Code Insights
8 Local-first CLI and dashboard for analyzing AI coding sessions from Claude Code, Cursor, Codex CLI, Copilot
Related Agents
Usage Scout
Read-only scout for session, token, and cost code in this FastAPI tracker. Use when the user asks where usage
Token Tracker
Logs token usage estimates for each agent run to .claude/token-stats.json. Call this after any agent completes
Excalidraw Diagram Skill
Skill to give Claude Code (and any coding agent) the ability to generate beautiful and practical Excalidraw di