| name | token-optimizer |
| description | OpenClaw Token Optimizer v3.2.0 — practical cost-control toolkit for OpenClaw agents. Lazy context loading, Sonnet/Opus-aware routing, heartbeat scheduling, local token budgets, cache-TTL guidance, and security-audit-safe command behavior for current OpenClaw 2026.6.x installs. |
| version | 3.2.0 |
| homepage | https://github.com/Asif2BD/OpenClaw-Token-Optimizer |
| source | https://github.com/Asif2BD/OpenClaw-Token-Optimizer |
| author | Asif2BD |
| metadata | {"openclaw":{"emoji":"💸","requires":{"bins":"[Truncated]"},"install":["[Truncated]","[Truncated]"]}} |
| security | {"verified":true,"auditor":"Oracle (Matrix Zion)","audit_date":"2026-06-22T00:00:00.000Z","scripts_no_network":true,"scripts_no_code_execution":true,"scripts_no_subprocess":true,"scripts_data_local_only":true,"explicit_workspace_writes":true,"default_commands_no_overwrite":true,"reference_files_describe_external_services":true,"optimize_sh_is_convenience_wrapper":true,"optimize_sh_only_calls_bundled_python_scripts":true} |
OpenClaw Token Optimizer v3.2.0

Built for current OpenClaw 2026.6.x agents by Asif2BD · GitHub · Security Notes
Security notice: local-only optimization toolkit. The Python scripts make no network requests and do not execute dynamic code. Commands that write files are explicit, documented, and backup-safe.
Install
openclaw skills install @asif2bd/openclaw-token-optimizer
What's New in v3.2
Modern ClawHub Card
The skill card now leads with a clearer product promise, current OpenClaw compatibility, security posture, and practical commands instead of the older long-form v3.0 copy.
Current OpenClaw Model Routing
Routine Anthropic work maps to anthropic/claude-sonnet-4-5; only explicitly complex reasoning routes to anthropic/claude-opus-4-5.
Audit-Safe Writes
context_optimizer.py generate-agents prints to stdout by default.
- Writing an optimized
AGENTS.md requires --output or --workspace-output.
./scripts/optimize.sh heartbeat previews only by default.
./scripts/optimize.sh heartbeat install writes HEARTBEAT.md only after backing up an existing file.
What It Optimizes
Context Loading
Stop loading every workspace file into every session. Recommend only the context needed for the current prompt.
python3 scripts/context_optimizer.py recommend "hi"
Typical result: SOUL.md + IDENTITY.md only for a greeting.
Model Routing
Keep standard work on Sonnet and reserve Opus for deep reasoning.
python3 scripts/model_router.py
python3 scripts/model_router.py