← 返回 Skills 市场
idanmann10

StartClaw-Optimizer

作者 idanmann10 · GitHub ↗ · v1.0.2
cross-platform ⚠ suspicious
2538
总下载
1
收藏
6
当前安装
3
版本数
在 OpenClaw 中安装
/install startclaw-optimizer
功能描述
Master optimization system - APPLIES TO EVERY RESPONSE. Before responding, classify task complexity (simple question vs analysis vs coding). Use Haiku for simple/navigation/extraction/status. Use Sonnet ONLY for writing/analysis/planning/debugging. Monitor context size - if >50k tokens, recommend /compact. For automations, use scheduler wrapper. Never load full conversation history for simple tasks. Heartbeats always Haiku, single-line only. Never use Opus. This skill MUST run before every response to prevent 100k+ token bloat.
安全使用建议
This package looks like a legitimate optimizer library, but several inconsistencies and sloppy packaging elements mean you should be cautious: 1) The description insists it must run before every response, but the registry flags do not enforce that — decide deliberately whether you want it auto-invoked. 2) The code references model names (Haiku/Sonnet/Opus) but requests no API keys; verify how your agent would supply model credentials before trusting automatic routing. 3) package.json omits dependencies (the code requires 'tiktoken'); prefer installing from a vetted source or run the bundled code in a sandbox to inspect runtime behavior. 4) The dashboard reads ~/.clawdbot/optimizer/config.json and compaction logs sessionKey and token counts — check that file for sensitive info and consider logging redaction. 5) Because the package owner and homepage are unknown, verify the npm package integrity (if you plan to npm install) and review the code locally. If you want to proceed, audit/modify the SKILL.md to remove the hard "MUST run before every response" instruction (or set always:true intentionally) and add explicit dependency and credential guidance. If you are not able to review or sandbox it, do not install it into production or grant it autonomous execution.
功能分析
Type: OpenClaw Skill Name: startclaw-optimizer Version: 1.0.2 The skill bundle provides components for optimizing AI agent workflows, including task routing, scheduling, browser management, and context compaction. The `scripts/dashboard.py` file reads a specific configuration file (`~/.clawdbot/optimizer/config.json`) which is a plausible action for a dashboard, and its network metric fetching is explicitly simulated. The `context-compaction.js` file contains a placeholder for a future API call but does not make any actual network requests in its current state. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection attempts against the agent.
能力评估
Purpose & Capability
The name/description claim ("MUST run before every response / APPLIES TO EVERY RESPONSE") is not reflected in the registry flags (always:false). The SKILL.md and README claim it will route traffic to Haiku/Sonnet/Opus models and reduce cost, but the package does not declare or require any model credentials or cloud provider access. The included code implements routing, scheduling, browser-governor and compaction utilities which are consistent with an optimizer, but the strong claim that it must run on every response is out of proportion with the registry metadata and the absence of an 'always' flag.
Instruction Scope
SKILL.md instructs agents to install and require @startclaw/openclaw-optimizer and says the skill should run before every response and use particular poetic models for outputs. The runtime instructions do not request reading secrets or system-level files, but the dashboard script reads a config path (~/.clawdbot/optimizer/config.json) and the compactor logs sessionKey and token counts. The top-level imperative (run before every reply) is broad and conflicts with the skill metadata; that open-ended instruction could lead to overly-broad agent usage if followed.
Install Mechanism
No install spec is provided in the registry entry, but SKILL.md shows an npm install command. The skill bundle included source files and a package.json, so installation risk is low (no external arbitrary download URLs). However package.json does not list dependencies (the code requires 'tiktoken'), indicating sloppy packaging and a missing dependency declaration which may cause runtime surprises or hidden install steps if a consumer tries to install from npm instead of using the provided bundle.
Credentials
The skill declares no required environment variables or credentials, and the code contains no network endpoints or explicit credential-handling. That is consistent with the included placeholder summarization (summarizeWithHaiku does not actually call an external API). However there is an implicit expectation of model invocation (anthropic model names are present) that in a real deployment would require API keys; the skill does not request or justify any credentials. Also the dashboard reads a config path under the user's home, which could contain sensitive data in some setups—this access is not declared in requires.config and should be considered.
Persistence & Privilege
Registry flags do not grant permanent/autonomous inclusion (always:false) and disable-model-invocation remains false (normal). The skill does not modify other skills or system configuration in the provided code. It logs compaction events (sessionKey, token counts) and reads an optional config file for the dashboard. The mismatch between the description's insistence on running before every response and the registry flags is notable but does not on its own demonstrate elevated privilege.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install startclaw-optimizer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /startclaw-optimizer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
- Migrated all major components from Python scripts to modular JavaScript files for better integration and performance. - Introduced automatic context compaction with token tracking and summarization at 50,000 tokens. - Enhanced task routing logic with intelligent model selection and real-time cost prediction. - Improved scheduler with robust preflight/postflight hooks and fault-tolerant execution. - Added real-time dashboard for budget, task, and model usage monitoring. - Removed legacy scripts and static state files, streamlining the architecture.
v1.0.1
startclaw-optimizer 1.0.1 - Updated router and cost_guard scripts to use latest Anthropic model names (e.g., `anthropic/claude-3-5-haiku-latest` instead of `anthropic/claude-haiku-3-5`). - Revised documentation in README.md and SKILL.md to reflect updated model selection and usage. - Improved clarity of workflow examples and command outputs. - No changes to core orchestration or routing logic.
v1.0.0
OpenClaw Optimizer 1.0.0 — initial release - Introduces a mandatory optimization system to classify every task (simple vs analysis vs coding) and select the most efficient model/strategy. - Enforces strict context management: stops all processing and auto-compacts if session context exceeds 50k tokens. - Applies tailored model usage: uses Haiku for simple tasks and heartbeats, Sonnet only for complex writing, analysis, or coding. - Includes automation scheduler, browser session governor, cost guard, and telemetry components for robust orchestration, cost control, and automated learning. - Ensures all automations use scheduler wrapper for safe and efficient execution. - Designed to prevent runaway token growth, browser collisions, and unexpected costs in every session.
元数据
Slug startclaw-optimizer
版本 1.0.2
许可证
累计安装 7
当前安装数 6
历史版本数 3
常见问题

StartClaw-Optimizer 是什么?

Master optimization system - APPLIES TO EVERY RESPONSE. Before responding, classify task complexity (simple question vs analysis vs coding). Use Haiku for simple/navigation/extraction/status. Use Sonnet ONLY for writing/analysis/planning/debugging. Monitor context size - if >50k tokens, recommend /compact. For automations, use scheduler wrapper. Never load full conversation history for simple tasks. Heartbeats always Haiku, single-line only. Never use Opus. This skill MUST run before every response to prevent 100k+ token bloat. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2538 次。

如何安装 StartClaw-Optimizer?

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

StartClaw-Optimizer 是免费的吗?

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

StartClaw-Optimizer 支持哪些平台?

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

谁开发了 StartClaw-Optimizer?

由 idanmann10(@idanmann10)开发并维护,当前版本 v1.0.2。

💬 留言讨论