Skip to content

Claude Code

Claude Code is the reference platform. Every Token Optimizer feature runs here first, and every other platform page describes its capabilities relative to this one.

Claude Code has two surfaces, and they share one data store.

The CLI is the primary surface. Install it through the Claude Code plugin marketplace and the full feature set activates.

The VS Code extension is a companion VSIX that surfaces the same data in the editor status bar. It runs in VS Code, Cursor, and Windsurf, since all three read the same ~/.claude/token-optimizer/ files the plugin writes.

Install from the Claude Code (CLI) or Claude Code (VS Code) page. The cross-platform grid is at /reference/capability-matrix/.

Plugin install wires every hook automatically through hooks/hooks.json. No manual setup step is required for compaction, quality tracking, or session data collection.

Hook eventWhat it does
PreToolUse: ReadReturns a delta diff or structure-map skeleton instead of re-reading a full file
PreToolUse: BashRewrites eligible commands to shrink their output
PreCompactInjects PRESERVE and DROP guidance into the compact prompt, then saves a checkpoint
SessionStartRestores the matching checkpoint and installs the status line when the slot is empty
UserPromptSubmitUpdates the quality cache that feeds the status bar
Stop and SessionEndCollect session data, refresh the dashboard, and write a continuity checkpoint

Everything works on Claude Code. This is the baseline other platforms are measured against.

CapabilityStatus on Claude Code
Quality scoring (7 signals, dual composite)Works
Smart Compaction (PreCompact and PostCompact)Works
Session continuity and checkpointsWorks
Delta read and structure-map substitutionWorks
Bash output compressionWorks
Per-prompt quality steeringWorks
Status line quality barWorks, terminal on CLI, status bar via the VSIX
Dashboard (visual HTML)Works, port 24842
Bookmarkable daemonWorks, via setup-daemon
Keep-Warm automationWorks, macOS launchd, opt-in
Fleet Auditor and Token CoachWorks
Memory and config audit (CLAUDE.md, MEMORY.md)Works
Crash recoveryWorks, via the StopFailure hook

Nothing is approximated or unavailable on Claude Code.

Claude Code is the default runtime. Commands run without a prefix.

Terminal window
cd ~/.claude/skills/token-optimizer/scripts
python3 measure.py report

On Windows use python, not python3.

Terminal window
cd ~/.claude/skills/token-optimizer/scripts
python3 measure.py doctor

Inside Claude Code, run /token-optimizer for a guided audit. In the VS Code extension, use the Refresh Now button to re-read the cache. The VSIX has no separate doctor; it relies on the plugin’s.

The dashboard serves at http://localhost:24842/token-optimizer. When the daemon is not running, it falls back to the generated dashboard.html. Clicking either VS Code status bar item opens it.

There are no capability gaps on Claude Code. Two operational caveats apply.

The --bare scripted and CI flag skips all hooks and plugin sync, so Smart Compaction, quality tracking, and session data collection do not run under it. This is expected.

Plugin users do not get clobber-restore after /statusline replaces the Token Optimizer status line. No settings cache signal exists to tell an intentional replacement apart from a clobber, so the trade-off is accepted.