← 返回 Skills 市场
asif2bd

OpenClaw Token Optimizer

作者 Asif · GitHub ↗ · v3.0.0
cross-platform ⚠ suspicious
11546
总下载
30
收藏
103
当前安装
19
版本数
在 OpenClaw 中安装
/install 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...
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install openclaw-token-optimizer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /openclaw-token-optimizer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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
元数据
Slug openclaw-token-optimizer
版本 3.0.0
许可证
累计安装 447
当前安装数 103
历史版本数 19
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 11546 次。

如何安装 OpenClaw Token Optimizer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install openclaw-token-optimizer」即可一键安装,无需额外配置。

OpenClaw Token Optimizer 是免费的吗?

是的,OpenClaw Token Optimizer 完全免费(开源免费),可自由下载、安装和使用。

OpenClaw Token Optimizer 支持哪些平台?

OpenClaw Token Optimizer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 OpenClaw Token Optimizer?

由 Asif(@asif2bd)开发并维护,当前版本 v3.0.0。

💬 留言讨论