π¦ ClawHub
OpenClaw Token Optimizer
by @ccjingeth
Optimize OpenClaw token usage and cost by auditing context injection, trimming workspace files (AGENTS.md/SOUL.md/MEMORY.md and daily memory), enabling promp...
TERMINAL
clawhub install openclaw-token-saveπ About This Skill
name: openclaw-token-optimizer description: Optimize OpenClaw token usage and cost by auditing context injection, trimming workspace files (AGENTS.md/SOUL.md/MEMORY.md and daily memory), enabling prompt caching, heartbeat, context pruning, compaction, memory search or qmd, subagents, model tiering, and cron frequency. Use when a user asks to reduce OpenClaw token spend, speed up sessions, shrink context, or configure openclaw.json and memory search settings.
OpenClaw Token Optimizer
Overview
Deliver a practical audit and configuration plan that cuts input tokens and unnecessary calls while keeping answer quality. Provide concrete config edits, workspace file trimming guidance, and a prioritized rollout plan.Workflow
1) Scope and locate configuration
~/.openclaw/openclaw.json, .openclaw/openclaw.json, or project root config).AGENTS.md, SOUL.md, TOOLS.md, IDENTITY.md, USER.md, HEARTBEAT.md, MEMORY.md, and memory/YYYY-MM-DD.md).2) Baseline token sources
3) Input reduction (highest ROI)
AGENTS.md: keep only essential agent rules and policies.
- SOUL.md: reduce to short persona bullets.
- MEMORY.md: keep durable facts only; archive the rest.
- memory/YYYY-MM-DD.md: prune or rotate daily logs.
TOOLS.md or IDENTITY.md is unused).4) Cache and context control
cacheRetention to a long window and keep a consistent system prompt to maximize cache hits.5) Call reduction
6) Model strategy
7) Deliverables
Provide:openclaw.json.References
references/openclaw-token-optimization.md for configuration snippets, checklists, and qmd guidance.