Claude Code Plugin Analyzes Token Waste and Anomalies Locally

A developer has created a Claude Code plugin called claude-token-analyzer that diagnoses token waste in Claude Code sessions by analyzing local data. The tool detects six specific anomaly types: HighCost, LowCacheHitRate, CostInefficient, ExcessiveToolUse, HighTokenUsage, and UnusualModelMix, each with severity scoring to prioritize fixes.
How It Works
The plugin is built as a Rust MCP server that parses Claude Code session data from ~/.claude/projects/**/*.jsonl files into a local SQLite database. It performs statistical analysis using standard deviation thresholds and composite anomaly detection. The system is fully local with no cloud components or telemetry.
What It Found
Scanning 8,392 sessions revealed 1,015 anomalies:
- ExcessiveToolUse was the most common (320 sessions) - far more tool calls than typical
- LowCacheHitRate affected 261 sessions - prompts were re-sent without caching
- 66 sessions were "cost-inefficient" - high cost combined with poor cache hit rate
Installation and Usage
Install with: claude plugin install claude-token-analyzer
After installation, you can ask Claude:
- "cta"
- "how much did I spend?"
- "scan for anomalies"
The plugin exposes 7 MCP tools and 6 workflow skills. It also includes Traditional Chinese workflow skills - you can input "看看狀況", "這個月花多少", or "有異常嗎" for Chinese analysis reports.
The tool is available on GitHub at https://github.com/li195111/claude-token-analyzer under MIT License.
📖 Read the full source: r/ClaudeAI
👀 See Also

Local-Cloud Hybrid AI Architecture: Practical Patterns Inspired by r/LocalLLaMA
The original post proposes a hybrid AI model where a local model handles routine tasks and defers to a cloud model for complex reasoning via a single API call, alongside a deterministic 'hypervisor' for guard rails.

Tycono: Open-Source AI Agent Harness with Org Chart and Autonomous Improvement Loops
Tycono is an open-source harness where you define AI agent roles in YAML (CTO, engineer, QA, etc.) and they work together following an org chart with autonomous improvement loops. The system ran 17 rounds overnight on a pixel running game task, generating 6,796 lines of code across 43 commits.

Specsmaxxing: Fighting AI Psychosis with YAML Specs and ACAI
Acai.sh introduces Specsmaxxing: a method to combat AI agents losing context by writing requirements in YAML and using numbered Acceptance Criteria for AI (ACAI) that agents reference in code.

wmux: Electron Terminal Multiplexer for Windows with Browser Control via MCP
wmux is an open-source Electron terminal multiplexer for Windows 10/11 that provides tmux-style splits, persistent sessions, and browser control via Chrome DevTools Protocol for AI coding agents like Claude Code. It registers as an MCP server automatically and allows agents to interact with browsers while running multiple sessions side-by-side.