Self-iteration and feedback learning engine for AI agent skills. Tracks usage logs, detects performance patterns, triggers skill updates, and proposes new skill creation based on repeated request patterns.
This is a shared component skill — other skills reference it for self-improvement. When updating, ensure backward compatibility with all dependent skills. Users may install this skill standalone for its capabilities.
Maintain a usage log file for each skill that declares dependency:
markdown
# Usage Log: <skill-name>
## [YYYY-MM-DD]
- Request: <brief description>
- Outcome: success | partial | fail
- User corrected: yes | no
- Correction detail: <if yes, what was corrected>
- Lesson: <what to do differently next time>
File location: memory/usage-logs/<skill-name>.md
Evaluate these conditions during each periodic review (default daily, configurable):
ConditionAction3+ consecutive successful invocationsMark skill as "stable" — reduce context allocation2+ failures for the same scenarioFlag for SKILL.md reassessmentSame request type appears 3+ timesEvaluate creating a new dedicated skillUser corrected outputLog correction, adjust future behavior for that scenarioSkill hasn't been reviewed in 30+ daysTrigger review: check if dependencies changed, update examplesExternal tech change detectedCompare against skill's core technology stack, update if needed
yaml
# memory/feedback-loop/<skill-name>.yaml
feedback_loop:
last_review: "2026-05-19"
next_review: "2026-05-26"
status: "stable" | "needs-attention" | "monitoring"
patterns_observed:
- pattern: "user asks for financial data on weekends"
current_response: "check if markets are open"
improvement: "pre-fill with last trading day data"
status: "resolved" | "pending" | "in-progress"
skill_performance:
total_calls: 47
success_rate: 0.96
issues:
- "data freshness on weekends"
SignalDecision80%+ success rate, no user correctionsNo update needed60-80% success rateMinor update: clarify instructions, add edge cases<60% success rateMajor update: redesign workflow, check data sourcesUser corrects same thing 3+ timesFix that specific guidance in SKILL.mdExternal API / tool changedUpdate immediatelyNew competing technology availableEvaluate migration; update if 2x+ better
Create a new skill when:
Document in memory/skill-ideas/:
yaml
proposal:
name: <suggested-slug>
rationale: "Pattern X appeared N times. Existing skill Y handles it poorly because..."
scope: "<bounded description>"
priority: high | medium | low
created: <date>
Other skills declare dependency:
yaml
metadata:
openclaw:
requires:
skills:
- self-iteration-engine
Usage logs are prefixed with the source skill name:
memory/usage-logs/skill-a.mdmemory/feedback-loop/skill-a.yamlWhen this skill updates log format, check ALL dependent skills' parsing logic.
面向AI Agent技能的自迭代与反馈学习引擎。追踪使用日志、检测性能模式、触发技能更新,并基于重复请求模式提出新技能创建建议。
这是一个 共享组件技能——其他技能通过它实现自我改进。更新时需保证向后兼容。用户也可能独立安装此技能使用其能力。
每个声明依赖的技能维护一份使用日志:
markdown
# 使用日志:<skill名称>
## [YYYY-MM-DD]
- 请求:<简述>
- 结果:成功 | 部分成功 | 失败
- 用户修正:是 | 否
- 修正详情:<如果是,修正了什么>
- 经验:<下次应该怎么做>
文件位置: memory/usage-logs/<skill名称>.md
定期审查 时评估以下条件(默认每天,可配置):
条件行动连续成功3次以上标记为"稳定"——减少上下文分配同一场景失败2次以上标记SKILL.md需重新评估同类请求出现3次以上评估创建新专用skill用户修正了输出记录修正,调整后续该场景的行为技能超过30天未审查触发审查:检查依赖是否变更、更新示例检测到外部技术变化与技能核心技术栈对比,需要时更新
yaml
# memory/feedback-loop/<skill名称>.yaml
feedback_loop:
last_review: "2026-05-19"
next_review: "2026-05-26"
status: "stable" | "needs-attention" | "monitoring"
patterns_observed:
- pattern: "用户在周末查询金融数据"
current_response: "检查市场是否开盘"
improvement: "自动填充最近交易日数据"
status: "resolved" | "pending" | "in-progress"
skill_performance:
total_calls: 47
success_rate: 0.96
issues:
- "周末数据新鲜度"
信号决策成功率>80%,无用户修正无需更新成功率60-80%小幅更新:澄清说明、补充边界情况成功率<60%重大更新:重新设计工作流、检查数据源用户修正同一内容3次以上在SKILL.md中修复该指导外部API/工具变更立即更新出现新的竞争技术评估迁移;若2倍以上优于现有则更新
以下情况创建新技能:
记录在 memory/skill-ideas/:
yaml
proposal:
name: <建议的slug>
rationale: "模式X出现了N次。现有技能Y处理不佳因为..."
scope: "<有边界的描述>"
priority: high | medium | low
created: <日期>
其他技能声明依赖的方式:
yaml
metadata:
openclaw:
requires:
skills:
- self-iteration-engine
使用日志以源技能名称为前缀:
memory/usage-logs/skill-a.mdmemory/feedback-loop/skill-a.yaml本技能更新日志格式时,需检查所有依赖技能的解析逻辑。