A community-driven registry for the Claude Code ecosystem. Not affiliated with Anthropic.
Are you the author? Sign in to claim
Live token monitor for Claude Code & Codex sessions — cost tracking, optimization analysis, LLM-powered suggestions
Live token & cost monitor for Claude Code and Codex sessions.
Tracks every API call you make, finds what's wasting money, and lets you fix it — automatically.
If you use Claude Code or Codex heavily, your token spend compounds fast — long sessions, large context files, wrong models for the job, keepalive probes eating cache writes. This dashboard reads your local session files in real time, quantifies the waste, and gives you actionable fixes.
Built for people who ship with AI agents every day and want to stay in control of the cost.
Real-time breakdown of every token you've consumed across Claude Code and Codex sessions.
Group sessions by project. Click into any project to see every session that ran inside it.
Every 2 hours, Claude Haiku analyses your projects using your existing OAuth session — no API key needed.
Detected patterns:
Each finding includes a projected savings estimate, a concrete recommendation, and example sessions. For actionable findings (model pinning, CLAUDE.md trim, Codex reasoning config), you can apply the fix directly from the UI — the tool writes the change and creates a timestamped backup.
CLAUDE.md across your projects, sized by byte countAGENTS.mdThe dashboard never sends a full payload twice. Only changed sessions are pushed on each update — typically 99%+ bandwidth reduction vs naive full-refresh, visible in the footer.
Overview — live KPIs with USD cost per token category, Claude Code vs Codex split, token composition bar

Projects — every project as a card with tokens, cost, composition bar and per-category breakdown

Analysis — Haiku-powered waste detection, per-project findings with severity, impact $ and apply button

Charts — daily token/cost bar chart (Today / 7 Days / 30 Days) and context file size inventory

git clone https://github.com/gocenalper/agent-optimization
cd agent-optimization
# Run setup: builds Docker image, installs LaunchAgent, opens browser
bash setup.sh
The setup script:
restart: always)http://localhost:4317 in your browsergit clone https://github.com/gocenalper/agent-optimization
cd agent-optimization
npm install
npm run dev
# → http://localhost:4317
The Analysis page works out of the box using Claude Code's OAuth session — the same login as your claude CLI. No API key needed.
If the analysis shows ⚙ Heuristic instead of ✦ Haiku, check that claude CLI is authenticated:
claude --version # should respond without prompting for login
The tool shells out to the bundled claude.exe binary in node_modules/@anthropic-ai/claude-code/bin/ with HOME pointing at your host home directory, so it picks up your existing OAuth tokens automatically.
~/.claude/projects/**/*.jsonl ──┐
├──► server.js parses & aggregates
~/.codex/sessions/**/*.jsonl ──┘ │
│ file watcher (chokidar)
▼
incremental parse cache
(only changed files re-read)
│
┌─────────────┴──────────────┐
│ Express + WebSocket │
│ delta patches only │
└─────────────┬──────────────┘
│
┌─────────────▼──────────────┐
│ Browser dashboard │
│ plain JS, no framework │
│ Chart.js for charts │
└────────────────────────────┘
Every 2h: claude.exe (Haiku, OAuth) ──► per-project analysis
results cached, delta-pushed via WebSocket
Data never leaves your machine. Session files are read locally. The only outbound traffic is the Haiku analysis call — which sends only aggregated stats (no conversation content).
# docker-compose.yml (simplified)
services:
agent-optimization:
restart: always # auto-restarts with OrbStack
ports: ["4317:4317"]
volumes:
- /Users/${USER}:/host-home # read your session files
environment:
- HOST_HOME=/host-home
- USE_POLLING=true # reliable on Mac FUSE volumes
File watching uses polling inside Docker (USE_POLLING=true) because Mac's FUSE filesystem layer doesn't propagate inotify events into containers.
| File | Purpose |
|---|---|
.env | ANTHROPIC_API_KEY if you prefer API key over OAuth |
pricing.js | Token rates per model — update when Anthropic changes pricing |
docker-compose.yml | Port, volume mounts, polling interval |
com.agent-optimization.plist | macOS LaunchAgent definition |
Claude Opus 4/3.5/3 · Claude Sonnet 4/3.5/3 · Claude Haiku 4/3.5/3 · GPT-5 · GPT-4o · GPT-4.1 · o1 · o3 · o4-mini · Codex-mini
Unknown models fall back to Sonnet-tier pricing with a ≈ indicator.
cd ~/Desktop/agent-optimization
git pull
docker compose up -d --build # rebuilds image with new code
| Anthropic dashboard | This | |
|---|---|---|
| Granularity | Per-month aggregate | Per-session, per-message |
| Codex | ✗ | ✓ |
| Project grouping | ✗ | ✓ |
| Waste detection | ✗ | ✓ (LLM-powered) |
| Auto-apply fixes | ✗ | ✓ |
| Real-time | ✗ | ✓ (WebSocket) |
| Offline / private | ✗ | ✓ (reads local files) |
| Cost | Included in plan | Free to run |
ws WebSocket + chokidar file watchernode:22-alpine@anthropic-ai/claude-code (bundled claude.exe, OAuth auth)MIT
1000+ skills curated from Anthropic, Vercel, Stripe, and other engineering teams
Design enforcement with memory — keeps your UI consistent across a project
Universal SEO skill for Claude Code. 25 sub-skills + 18 sub-agents covering technical SEO, E-E-A-T, schema, GEO/AEO, bac
Route Claude Code traffic to any of 17 provider backends including free or local models