Token Saver
Reduce OpenClaw AI costs with model-aware optimization. Features dynamic compaction presets based on your model's context window, intelligent file compression, and robust model detection with fallback
Reduce OpenClaw AI costs with model-aware optimization. Features dynamic compaction presets based on your model's context window, intelligent file compression, and robust model detection with fallback
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
💡 Did you know? Every API call sends your workspace files (SOUL.md, USER.md, MEMORY.md, AGENTS.md, etc.) along with your message. These files count toward your context window, slowing responses and costing real money on every message.
Token Saver v3 is model-aware — it knows your model's context window and adapts recommendations accordingly. Using Gemini's 1M context? Presets scale up. On GPT-4o's 128K? Presets adjust down.
| Feature | v2 | v3 |
|---|---|---|
| Compaction presets | Fixed (80K/120K/160K) | Dynamic (% of model's context) |
| Model detection | Fragile, env-only | Robust fallback chain |
| Context windows | Not tracked | Full registry (9 models) |
| Model info | Hardcoded pricing | JSON registry, easy updates |
| Already-optimized | Re-compressed | Smart bypass |
| Command | What it does |
|---|---|
| Full dashboard — files, models, context usage % |
| Compress workspace files (auto-backup) |
| Chat compaction control (model-aware) |
| Apply balanced preset (60% of context) |
| Custom threshold (compact at 120K) |
| Detailed model audit with registry |
| Restore backups, disable persistent mode |
Shows current model, context window, and usage percentage:
🤖 Model: Claude Opus 4.5 (200K context) Detected: openclaw.json📊 Context Usage: [████████░░░░░░░░░░░░] 42% (84K/200K)
Scans all
.md files, shows token count and potential savings. Smart bypass skips already-optimized files.
File-aware compression:
Presets adapt to your model's context window:
| Preset | % of Context | Claude 200K | GPT-4o 128K | Gemini 1M |
|---|---|---|---|---|
| Aggressive | 40% | 80K | 51K | 400K |
| Balanced | 60% | 120K | 77K | 600K |
| Conservative | 80% | 160K | 102K | 800K |
| Off | 95% | 190K | 122K | 950K |
24+ models with context windows, pricing, and aliases:
Detection priority:
--model=...)SKILL_MODEL, OPENCLAW_MODEL)~/.openclaw/openclaw.json)Unknown model handling:
opus-6.5 won't fuzzy-match to opus-4.5scripts/models.jsonAdds writing guidance to AGENTS.md for continued token efficiency:
| File | Writing Style |
|---|---|
| SOUL.md | Evocative, personality-shaping |
| AGENTS.md | Dense instructions, symbols OK |
| USER.md | Key:value facts |
| MEMORY.md | Ultra-dense data |
.backup extension/optimize revert restores everythingclawhub install token-saver --registry "https://www.clawhub.ai"
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.