Summary
Aggregate TokenWise routing data over a time window (default: last 7 days). Shows trend, top task classes, and cumulative savings. Use when the user asks "show me my weekly/monthly savings", "how am I doing on tokenwise", or runs /tokenwise:summary.
Undo
Restore TokenWise config backups. Lists all .tokenwise-backup-* files found, lets the user pick one to restore in place. Use when the user wants to roll back TokenWise's changes to CLAUDE.md or settings.json, or runs /tokenwise:undo.
Ab
Run an A/B test of the same task at multiple model tiers (Haiku, Sonnet, optionally Opus). Captures outputs, computes structural and semantic diffs, scores quality, writes a markdown comparison report. Use when the user wants to validate "is Haiku good enough for this task class?" or runs /tokenwise:ab "<task description>".
Report
Print a TokenWise session report — tokens per model, $ saved vs all-Opus baseline, escalations, quality flags. Reads from .tokenwise/log.ndjson filtered to the current session. Use when the user asks "how much did I save", "show me tokenwise stats", or runs /tokenwise:report.
Install
Install TokenWise routing rules into the user's Claude Code config (CLAUDE.md and settings.json). Probes the user's Claude Code build for known routing bugs first, shows diffs, backs up originals, asks for per-file confirmation. Supports --guided (default), --manual (print copy-paste only), and --dry-run (preview without writing). Use when the user says "install tokenwise", "set up tokenwise", or…