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

Swarm Leak Detector: Free Tool to Scan for Exposed API Keys in OpenClaw Configs
A developer released swarm-leak-detector, a zero-dependency MIT-licensed tool that scans for over 21 credential patterns (OpenAI, Anthropic, OpenRouter, Stripe, etc.) in plaintext JSON config files. Run it with npx swarm-leak-detector scan ~/.clawdbot/ to check for leaks in about 30 seconds.

Testing δ-Mem on Apple Silicon: MLX Implementation and Benchmarks
δ-mem paper implemented via mlx on a MacMini 64GB shows mixed but promising local benchmarks, with gains in realistic replay scenarios.

GlycemicGPT: Self-Hosted AI Diabetes Monitor with BYOAI and Plugin SDK
GlycemicGPT is an open-source, self-hosted platform that connects Dexcom G7 and Tandem pumps to an AI analysis layer. It provides daily briefs, meal analysis, conversational chat, and configurable alerts, all on your own hardware.

ThumbGate Implements Tsinghua's Natural-Language Agent Harness Pattern for AI Safety
The open-source tool ThumbGate implements the Natural-Language Agent Harness pattern from Tsinghua's NLAH paper, mapping four components: contracts to prevention rules from thumbs-down feedback, verification gates to PreToolUse hooks, durable state to SQLite+FTS5 lesson database, and adapters to MCP server adapters for multiple AI coding agents.