Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By alexgreensh
Audit context window usage across Claude Code and Codex sessions, identify ghost tokens and waste, recover 5-25% context space through config cleanup and auto-compaction, and monitor session health with actionable savings estimates.
npx claudepluginhub alexgreensh/token-optimizer --plugin token-optimizerAudit token waste across agent systems (Claude Code, Codex, OpenClaw, Hermes, OpenCode). Detect idle burns, model misrouting, and config bloat with dollar savings.
Context window coach analyzing setup overhead, historical usage trends, and session habits. Use when building something new and wanting token efficiency from the start, existing sessions feel sluggish or context fills too fast, designing multi-agent systems, or wanting a quick health check with real numbers. Do NOT use for running the full audit and applying fixes (use /token-optimizer instead).
Open the Token Optimizer dashboard. Collects latest session data, regenerates the dashboard, and opens it in your browser.
Find the ghost tokens. Audit Claude Code or Codex setup, see where context goes, fix it. Use when context feels tight.
Executes bash commands
Hook triggers when Bash tool is used
Modifies files
Hook triggers on file write and edit operations
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Analyze and reduce Claude Code token overhead
Analyze Claude Code chat history to identify context window bloat and get optimization recommendations
Evaluate and optimize .claude/ directory token efficiency. Reduce cost, improve response quality.
Opus 4.7-aware context optimization: 1M-context tuning, prompt coach, smart context packs, ContextShield, CLAUDE.md analyzer, accurate token costs, MCP tool tracking
Resource optimization and performance monitoring toolkit for efficient Claude Code workflows
Session intelligence for Claude Code — find why your sessions fail and fix them
Offline security scanner for AI-agent repos, skills, plugins, and MCP servers
Optimize every session, then watch the dollars add up on the dashboard.
Most token tools only touch one slice of the problem.
They compress command output, which covers 15-25% of your context on a good day. The other 75-85% (bloated configs, unused skills, duplicate system prompts, stale memory, plus the 60-70% you lose on every compaction) goes untouched.
Token Optimizer covers all of it, keeps your work alive across compactions, measures whether the optimization actually helped, and gives you a live dashboard that shows every token, every dollar, and every turn, auto-updated after every session. Runs fully local. Zero baseline context overhead. Zero runtime dependencies.
Works on Claude Code (CLI and VS Code), OpenCode, OpenClaw, Codex, Hermes, and GitHub Copilot (CLI and VS Code, beta) today. Windsurf, Cursor, and more on the way.
Install the plugin. Most of it runs automatically from that point: