← Back to Skills Marketplace
11546
Downloads
30
Stars
103
Active Installs
19
Versions
Install in OpenClaw
/install openclaw-token-optimizer
Description
Reduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session prunin...
Usage Guidance
Review before installing. The code does not show malware or network exfiltration, but treat it as a state-changing OpenClaw workspace tool, not a read-only optimizer. Back up your existing HEARTBEAT.md and AGENTS.md, verify the published package includes the assets listed in .clawhubsafe, and only run the heartbeat/install commands if you are comfortable changing persistent agent behavior.
Capability Analysis
Type: OpenClaw Skill
Name: openclaw-token-optimizer
Version: 3.0.0
The OpenClaw Token Optimizer skill is benign. All Python scripts (`context_optimizer.py`, `heartbeat_optimizer.py`, `model_router.py`, `token_tracker.py`) and the `optimize.sh` wrapper operate locally, without network access, subprocess execution (beyond calling other bundled scripts), or system modifications outside the OpenClaw workspace. While `model_router.py` reads API keys from environment variables, this is solely for detecting the active provider to inform routing logic, not for exfiltration. Prompt injection instructions in `SKILL.md` and `README.md` are present but are benign, guiding the agent towards token optimization and skill installation, without any malicious intent or instructions to deviate from its purpose.
Capability Assessment
Purpose & Capability
The scripts fit the stated purpose of reducing token use through context recommendations, model routing, heartbeat scheduling, and budget checks; I found no executable network calls, exfiltration, or arbitrary code execution.
Instruction Scope
The skill generates operational agent guidance in AGENTS.md.optimized and installs a HEARTBEAT.md workflow, which is purpose-aligned but can affect future agent behavior and is undercut by broad 'no system modifications' claims.
Install Mechanism
Installation is ordinary ClawHub/manual clone configuration, but the bundle is internally inconsistent: .clawhubsafe and docs reference assets and reference files that are not present in the inspected artifact, so integrity verification and the heartbeat wrapper may not work as documented.
Credentials
Runtime access is mostly proportional and local: state is limited to ~/.openclaw/workspace/memory, and model_router only checks whether provider API key environment variables exist rather than reading or transmitting secrets.
Persistence & Privilege
Several commands persist local state or files under ~/.openclaw/workspace, and optimize.sh heartbeat writes HEARTBEAT.md without prompting, backup, or overwrite protection.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install openclaw-token-optimizer - After installation, invoke the skill by name or use
/openclaw-token-optimizer - Provide required inputs per the skill's parameter spec and get structured output
Version History
v3.0.0
**Major update: v3.0 introduces lazy skill loading and restructures optimization logic for maximum token savings.**
- Added native support and documentation for lazy skill loading (SKILLS.md-based), now the largest single optimization.
- Removed bundled cronjob guide and multi-provider reference/config files; external strategies are now referenced but not included.
- Simplified documentation to focus on core, local-only optimizations and integration patterns.
- Updated AGENTS.md and heartbeat optimization templates for compatibility with session pruning and newer OpenClaw features.
- All scripts and documentation updated for consistency with v3.0 best practices.
v1.4.3
v1.4.3: README completely rewritten — correct name (OpenClaw Token Optimizer), version badge (1.4.3), ClawHub install command, Apache 2.0 license, all skill paths corrected. GitHub now shows the right name and current version.
v1.4.2
v1.4.2: Security scan fixes — added homepage/source/author to SKILL.md frontmatter (resolves 'Source: unknown'), added optimize.sh to .clawhubsafe SHA256 manifest (was missing from integrity check), added explicit optimize.sh security section in SECURITY.md with full source disclosure, added Provenance section with GitHub + ClawHub links. All v1.4.0 features intact.
v1.4.1
v1.4.1: Fix public visibility — added .clawhubignore to exclude PR-DESCRIPTION.md (contained shell commands that triggered security scanner) and docs/ dev artifacts. All v1.4.0 features intact: session pruning, bootstrap size limits, cache retention, cache TTL alignment.
v1.4.0
v1.4.0: Native OpenClaw 2026.2.15 features — session pruning, bootstrap size limits, cache TTL alignment. Compliance 72%→92%+.
v1.3.3
Name fix: restored correct display name 'OpenClaw Token Optimizer' (was incorrectly shortened to 'Token Optimizer' in 1.3.1/1.3.2). No code changes from 1.3.2.
v1.3.2
Security transparency fix: (1) SKILL.md frontmatter no longer falsely claims no_network:true for the whole skill — now correctly scopes the no-network guarantee to the 4 executable scripts only; (2) config-patches.json adds _notice and _warning fields clearly marking multi_provider_fallback as requiring external API keys; (3) SECURITY.md rewritten with two-category breakdown (scripts vs reference docs) explaining exactly what VirusTotal flags and why; (4) .clawhubsafe now covers SECURITY.md too; (5) all 10 checksums clean, zero warnings.
v1.3.1
Security fix on v1.3.0: (1) Stripped prose/markdown from .clawhubsafe — file must be pure sha256sum format to avoid 39 parse warnings; (2) Regenerated stale SKILL.md checksum that v1.3.0 missed after updating SKILL.md. All 9 files now verify cleanly: 0 warnings, 0 failures.
v1.3.0
v1.3.0: Full security audit and clearance. SECURITY.md added with complete script-by-script analysis — zero network requests, zero code execution, zero subprocess calls, data stays 100% local. Clears all AV false positives. Audited by Morpheus (code reviewer). Previous versions remain safe — this update adds transparency documentation.
v1.2.10
Security audit by Morpheus (2026-02-17): verified safe, updated SKILL.md with security metadata, enhanced .clawhubsafe with audit badge and checksums
v1.2.9
Security fix: Corrected .clawhubsafe to pure sha256sum format (removed prose that caused 35 parse warnings). Updated stale SKILL.md checksum. All 9 file checksums now verify cleanly with zero warnings.
v1.2.8
Security documentation added: .clawhubsafe with checksums, SECURITY.md with detailed analysis, README.md with safety notes. Addresses false positive AV detections.
v1.2.7
v1.2.7: Name correction + Model flexibility - Sonnet/Opus only support, graceful fallback, AVAILABLE_TIERS config
v1.2.6
v1.2.6: Model flexibility - Sonnet/Opus only support, graceful fallback when Haiku unavailable, AVAILABLE_TIERS config, updated HEARTBEAT and AGENTS templates
v1.2.5
v1.2.5: Model flexibility - Added support for Sonnet/Opus only setups, graceful fallback when Haiku unavailable, AVAILABLE_TIERS config option, updated HEARTBEAT template with Sonnet alternative, context optimization improvements
v1.2.4
Fixed: Restored original skill name 'OpenClaw Token Optimizer'
v1.2.3
Fixed: Restored original skill name
v1.2.2
Security fix: Removed local Ollama setup instructions flagged by ClawHub security scan. Focuses on cloud API optimization only.
v1.2.0
v1.2.0 (2026-02-06)
🛸 Local model fallback (Emergency Fuel Mode) with Ollama integration
📊 Revised savings estimates — now 85-95% (was 50-80%)
📝 Detailed cost analysis with real calculations
📚 New docs/LOCAL-FALLBACK.md setup guide
v1.1.0 (2026-02-06)
✨ Multi-provider support: OpenAI, Google, OpenRouter
🏷️ Provider-agnostic tier system (cheap/balanced/smart)
📦 ClawHub-ready SKILL.md with proper metadata
📝 One-line installation instructions
v1.0.0 (2026-02-05)
🎉 Initial release
Context optimizer, model router, heartbeat optimizer, token tracker
Comprehensive documentation and examples
Metadata
Frequently Asked Questions
What is OpenClaw Token Optimizer?
Reduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session prunin... It is an AI Agent Skill for Claude Code / OpenClaw, with 11546 downloads so far.
How do I install OpenClaw Token Optimizer?
Run "/install openclaw-token-optimizer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is OpenClaw Token Optimizer free?
Yes, OpenClaw Token Optimizer is completely free (open-source). You can download, install and use it at no cost.
Which platforms does OpenClaw Token Optimizer support?
OpenClaw Token Optimizer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created OpenClaw Token Optimizer?
It is built and maintained by Asif (@asif2bd); the current version is v3.0.0.
More Skills