Skills

Token Optimizer

Audits a Claude Code or Codex setup for context-window waste, fixes it with the user's...

Install

npx skills add alexgreensh/token-optimizer --skill token-optimizer -g -a claude-code -y
Category
AI and agents
Updated
3d ago
License
See repository
Context cost
Mediumabout 2,367 tokens
Runs scripts
Yes, review before use

What it does

Audits a Claude Code or Codex setup for context-window waste, fixes it with the user's approval, and measures the saving. Use when context feels tight, sessions degrade, or costs climb.

Token Optimizer

Measures where a setup spends its context window, proposes fixes, applies the ones the user approves, and re-measures. The deliverable is a before-and-after the user can verify, with every change backed up. Typical recovery is 5-15% of the window from config cleanup, more when compaction and caching settings are wrong for the way the user works.

Token Optimizer's own skills (token-optimizer, token-coach, token-dashboard, fleet-auditor, resume-checkpoint) are the measurement layer, so leave them out of every unused-skill, archive or consolidation suggestion, however rarely they run.

Step 0: pick the right workflow for this runtime

The audit below reads and edits ~/.claude, which is the wrong target anywhere but Claude Code, so settle the runtime before touching any path. Run exactly this, in this order.

a. Environment check (touches no file; an explicit TOKEN_OPTIMIZER_RUNTIME wins, and Claude plugin variables are checked before stray OPENCODE_* exports, the same order detect_runtime() uses):

Read the whole SKILL.md on GitHub

More in AI and agents