OpenClaw Agent Optimization
Use this skill to tune an OpenClaw workspace for cost-aware routing, parallel-first delegation, and lean context.
Default posture
This skill is advisory first.
It should produce:
- - audit,
- options,
- recommended plan,
- exact patch proposal,
- rollback,
- verification plan.
No persistent mutations without explicit approval.
Quick start
1) Full audit (safe, no changes)
Audit my OpenClaw setup for cost, reliability, and context bloat. Output a prioritized plan with rollback notes. Do NOT apply changes.
2) Context bloat / transcript noise
My OpenClaw context is bloating (slow replies / high cost / lots of transcript noise). Identify the top offenders (tools, crons, bootstrap files, skills) and propose the smallest reversible fixes first. Do NOT apply changes.
3) Model routing / delegation posture
Propose a model routing plan for (a) coding/engineering, (b) short notifications/reminders, (c) reasoning-heavy research/writing. Include an exact config patch + rollback plan, but do NOT apply changes.
What good output looks like
- - Executive summary
- Top drivers
- cost
- context
- reliability
- operator friction
- - Options A/B/C with tradeoffs
- Recommended plan (smallest safe change first)
- Exact proposals + rollback + verify
Safety contract
- - Do not mutate persistent settings without explicit approval.
- Do not create/update/remove cron jobs without explicit approval.
- If an optimization reduces monitoring coverage, present options and require choice.
- Before any approved change, show:
1. exact change,
2. expected impact,
3. rollback plan,
4. post-change verification.
High-ROI optimization levers
1) Output discipline for automation
Make maintenance loops truly silent on success.
2) Separate work from notification
If you want alerts but want interactive context lean:
- - do the work quietly
- notify out-of-band with a short human receipt
3) Bootstrap discipline
Keep always-injected files short and load-bearing only.
Move long runbooks into
references/ or adjacent notes.
4) Ambient specialist surface reduction
A common hidden tax is
too many always-visible specialist skills.
If a workflow is low-frequency or specialist:
- - prefer on-demand worker/subagent usage,
- do not keep it permanently ambient in main-chat prompt surface.
5) Measure optimizations authoritatively
Prefer fresh-session
/context json or equivalent receipts over “feels better”.
High-signal fields include:
- - INLINECODE2
- INLINECODE3
- INLINECODE4
- INLINECODE5
- INLINECODE6
6) Verification-first ops hygiene
After any approved optimization, verify:
- - core chat still works
- recall/behavior did not degrade
- new session actually picks up the change
- rollback path is proven, not theoretical
Workflow (concise)
- 1. Audit rules + memory: keep restart-critical facts only.
- Audit skill surface: trim ambient specialists before touching tool surface.
- Audit transcripts/noise: silence cron and heartbeat success paths.
- Audit model routing and delegation posture.
- Recommend the smallest viable change first.
- Verify on a new session when skill/bootstrap snapshotting exists.
Notes
- - Some runtimes snapshot skills/config per session. If you install/update skills and do not see changes, start a new session.
- Prefer short
SKILL.md + references/ for long runbooks. - If context bloat is the main complaint, pair this skill with
context-clean-up (audit-only).
References
- - INLINECODE10
- INLINECODE11
- INLINECODE12
- INLINECODE13
- INLINECODE14
- INLINECODE15
- INLINECODE16
- INLINECODE17
- INLINECODE18
OpenClaw Agent 优化
使用此技能来调整 OpenClaw 工作区,实现成本感知路由、并行优先委派和精简上下文。
默认姿态
此技能以建议为主。
它应生成:
- - 审计报告,
- 可选方案,
- 推荐计划,
- 精确补丁方案,
- 回滚方案,
- 验证计划。
未经明确批准,不得进行持久性变更。
快速入门
1) 全面审计(安全,无变更)
审计我的 OpenClaw 设置,针对成本、可靠性和上下文膨胀。输出带有回滚说明的优先级计划。请勿应用更改。
2) 上下文膨胀/对话记录噪音
我的 OpenClaw 上下文正在膨胀(响应慢/成本高/对话记录噪音多)。识别主要问题(工具、定时任务、引导文件、技能),并首先提出最小的可逆修复方案。请勿应用更改。
3) 模型路由/委派姿态
为 (a) 编码/工程、(b) 简短通知/提醒、(c) 推理密集型研究/写作,提出模型路由计划。包含精确配置补丁和回滚计划,但请勿应用更改。
优秀输出的标准
- 成本
- 上下文
- 可靠性
- 操作摩擦
- - 方案 A/B/C 及权衡
- 推荐计划(先做最小安全变更)
- 精确方案 + 回滚 + 验证
安全契约
- - 未经明确批准,不得修改持久设置。
- 未经明确批准,不得创建/更新/删除定时任务。
- 如果优化会降低监控覆盖范围,需提供选项并要求选择。
- 在任何批准的变更之前,需展示:
1. 精确变更,
2. 预期影响,
3. 回滚计划,
4. 变更后验证。
高投资回报率优化杠杆
1) 自动化输出规范
使维护循环在成功时真正静默。
2) 工作与通知分离
如需接收警报但保持交互上下文精简:
- - 静默执行工作
- 通过带外方式发送简短人工收据进行通知
3) 引导规范
保持始终注入的文件简短且仅承载必要内容。
将长运行手册移至 references/ 或相邻笔记中。
4) 减少常驻专家技能
一个常见的隐性成本是
过多始终可见的专家技能。
如果工作流是低频或专家型的:
- - 优先使用按需工作器/子代理,
- 不要将其永久常驻在主聊天的提示表面。
5) 权威衡量优化效果
优先使用新会话的 /context json 或等效收据,而非“感觉更好”。
高信号字段包括:
- - eligible skills
- skills.promptChars
- projectContextChars
- systemPrompt.chars
- promptTokens
6) 验证优先的操作规范
在任何批准的优化之后,验证:
- - 核心聊天仍正常工作
- 召回/行为未降级
- 新会话实际应用了变更
- 回滚路径是经过验证的,而非理论上的
工作流程(简洁版)
- 1. 审计规则 + 记忆:仅保留重启关键信息。
- 审计技能表面:在触及工具表面之前,先精简常驻专家技能。
- 审计对话记录/噪音:静默定时任务和心跳成功路径。
- 审计模型路由和委派姿态。
- 首先推荐最小的可行变更。
- 在存在技能/引导快照的新会话上进行验证。
备注
- - 某些运行时按会话快照技能/配置。如果安装/更新技能后未看到变化,请启动新会话。
- 对于长运行手册,优先使用简短的 SKILL.md + references/。
- 如果上下文膨胀是主要问题,可将此技能与 context-clean-up(仅审计)配合使用。
参考
- - references/optimization-playbook.md
- references/model-selection.md
- references/context-management.md
- references/agent-orchestration.md
- references/cron-optimization.md
- references/heartbeat-optimization.md
- references/memory-patterns.md
- references/continuous-learning.md
- references/safeguards.md