Claude Code Token Lens
Description
A beautiful, local-first usage tracker and analytics dashboard for AI coding agents (Claude Code, etc.). (一款美观、本地优先的 AI 编程助手使用量追踪与分析面板)
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
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
mcp-server-postgres
Read-only PostgreSQL database access.
Data mcp-server-sqlite
SQLite database interaction and querying.
Data mcp-server-google-maps
Google Maps integration for location data.
Data Bitbucket Data Center
---
Data Private Gpt
Complete API layer for private AI applications on local models: RAG, skills, tools, MCP, text-to-sql, and more
Data Csv Data Summarizer
Automatically analyze CSV files and generate comprehensive insights with visualizations
Data