返回 Skill 列表
extension
分类: 数据与分析无需 API Key

StartClaw-Optimizer

主控优化系统 - 适用于每个响应。分类任务复杂度(简单问题/分析/编码)。简单/导航/提取/状态使用Haiku,仅写作/分析/规划/调试使用Sonnet。监控上下文大小,超过5万token推荐使用/compact。自动化使用调度器包装器。简单任务不加载完整对话历史。心跳仅用Haiku单行,从不用Opus。此技能必须在每次响应前运行,防止超过10万token膨胀。

person作者: idanmann10hubclawhub

OpenClaw Optimizer Skill

Overview

The OpenClaw Optimizer is a comprehensive performance and cost optimization skill designed to enhance the efficiency of Clawdbot's subagent workflows.

Core Components

1. Task Router

  • Intelligent model selection based on task complexity
  • Automatic routing between Haiku, Sonnet, and Opus models
  • Cost prediction and optimization

2. Scheduler

  • Robust task execution with retry mechanism
  • Configurable preflight and postflight hooks
  • Timeout and exponential backoff handling

3. Browser Governor

  • Browser tab serialization
  • Concurrent tab management
  • Circuit breaker for preventing runaway processes

4. Context Compaction

  • Automatic token tracking
  • Summarization at 50,000 token threshold
  • Preserves critical context

5. Real-time Dashboard

  • Monitor daily budget
  • Track task execution
  • Visualize model distribution
  • Circuit breaker status

Expected Savings

Before Optimization: $90/day After Optimization: $3-5/day Savings: 95%

Installation

npm install @startclaw/openclaw-optimizer

Usage

const { TaskRouter, OptimizerScheduler, BrowserGovernor } = require('@startclaw/openclaw-optimizer');

const router = new TaskRouter();
const scheduler = new OptimizerScheduler();
const browserGovernor = new BrowserGovernor();

// Automatic model and cost optimization
const modelSelection = router.selectModel(taskDescription);
await scheduler.execute(task, modelSelection);

Monitoring

# Real-time dashboard
python3 scripts/dashboard.py watch

License

StartClaw Internal Use License