token-optimizer
Token Optimizer is a local (external Python) tool/plugin that audits and reduces “ghost tokens” in Claude Code / OpenClaw sessions by measuring context degradation, detecting wasted/duplicate content, tracking compaction loss, and providing checkpoint/restore and archival tooling for tool results.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
README claims execution as an external Python process and provides features like caching, reading, and archiving tool results to disk, but it does not describe threat model, data handling/retention, TLS usage specifics, or secret redaction practices. curl|bash installer increases supply-chain risk if not pinned/verified. Authentication/scoping for any network API is not applicable/unspecified.
⚡ Reliability
Best When
You frequently run long Claude Code / OpenClaw sessions with heavy custom skills/MCP/tooling overhead and you experience fast context degradation or frequent compactions.
Avoid When
You cannot allow local filesystem access/read-cache/archival artifacts, or you need strict governance on code execution (e.g., disallowing bash installers).
Use Cases
- • Diagnose context/window overhead (“ghost tokens”) in Claude Code sessions
- • Improve prompt efficiency by blocking redundant file reads and ignoring files via .contextignore
- • Measure session quality drift over time (7-signal quality score and efficiency grading)
- • Recover from compaction by restoring checkpoints and expanding archived tool results
- • Analyze and trim large JSONL session artifacts and detect duplicates (tooling utilities)
- • Restructure CLAUDE.md to improve attention placement (attention-optimize)
Not For
- • Producing a hosted, centrally-managed analytics service (it appears to run locally per platform)
- • Security-critical workflows where you must guarantee zero data retention on remote services (the README does not provide such guarantees)
- • Environments where you cannot execute the provided installer script (curl | bash)
Interface
Authentication
No authentication mechanism is described for Token Optimizer itself; it appears to operate as a plugin/script alongside Claude Code/OpenClaw and external Python tooling.
Pricing
Pricing for the package is not provided in the provided content.
Agent Metadata
Known Gotchas
- ⚠ Installer uses a curl|bash approach; automated agents should prefer pinned, reviewed installation steps when possible.
- ⚠ Behavior depends on environment variables/config (e.g., read-cache modes); ensure correct settings per environment.
- ⚠ Local caching/archival implies filesystem artifacts; agents should clean up or manage storage if running many sessions.
Alternatives
Full Evaluation Report
Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for token-optimizer.
AI-powered analysis · PDF + markdown · Delivered within 30 minutes
Package Brief
Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.
Delivered within 10 minutes
Score Monitoring
Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.
Continuous monitoring
Scores are editorial opinions as of 2026-03-30.