
Proactive Self Improving Agent
Automatically capture failures, corrections, and better practices into .learnings/ and promote repeated insights into AGENTS.md, TOOLS.md, or SOUL.md with deduplication guards.
Overview
Proactive Self-Improving Agent is a journey-wide agent skill that captures errors and learnings into .learnings/—usable whenever a solo builder needs durable agent memory instead of fragile in-session recall.
Install
npx skills add https://github.com/yanhongxi-openclaw/proactive-self-improving-agent --skill proactive-self-improving-agentWhat is this skill?
- Seven evaluated trigger scenarios from command failure through task-completion review
- Structured sinks: ERRORS.md, LEARNINGS.md, FEATURE_REQUESTS.md plus JSONL in .learnings/CHANGELOG.md
- Dedup gate: skip writes when nothing novel or already covered
- Promotion rule: entries recurring ≥3 times can graduate to AGENTS.md, TOOLS.md, or SOUL.md with safety rails
- Categories include correction, knowledge_gap, best_practice, and task_review
- 7 trigger scenarios with evaluate-before-write deduplication
- Promotion threshold: experience appears ≥3 times before graduating to AGENTS.md, TOOLS.md, or SOUL.md
Adoption & trust: 2.5k installs on skills.sh; 13 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your coding agent keeps forgetting fixes and corrections because nothing is written to structured project files after each failure or task.
Who is it for?
Solo builders running persistent agents on real repos who want automatic ERRORS/LEARNINGS capture and governed promotion into AGENTS.md-style files.
Skip if: One-shot chat sessions with no repo-backed .learnings/ workflow or teams that forbid agents writing to SOUL.md/AGENTS.md without human review.
When should I use this skill?
On command failure, user correction, missing capability requests, external tool errors, outdated knowledge, better practices, or task completion when a novel learning warrants a file write.
What do I get? / Deliverables
Novel experiences land in ERRORS.md, LEARNINGS.md, or FEATURE_REQUESTS.md with JSONL changelog entries, and repeated patterns can safely promote into permanent agent config files.
- New or updated learning entries with category metadata
- JSONL append lines in .learnings/CHANGELOG.md
- Optional promoted rules in AGENTS.md, TOOLS.md, or SOUL.md
Recommended Skills
Journey fit
Useful at every journey phase - explore requirements and options before committing to a direction.
Where it fits
Record external API failures to ERRORS.md with enough context to avoid re-breaking the same integration.
Log user corrections after a wrong implementation so the next review cycle starts from LEARNINGS.md.
Capture recurring user-needed capabilities in FEATURE_REQUESTS.md when the agent lacks a workflow.
Run a task_review after finishing work and promote a pattern seen three times into TOOLS.md.
How it compares
File-backed learning loop for agents, not a passive code-review or static documentation generator.
Common Questions / FAQ
Who is proactive-self-improving-agent for?
Indie builders and agent operators who want mistakes and corrections captured on disk and optionally promoted into long-lived agent instructions.
When should I use proactive-self-improving-agent?
Use it across build when integrations fail, ship when reviews surface corrections, grow when support patterns repeat, and operate during every task completion review; triggers also fire on API errors and feature gaps during validate scoping.
Is proactive-self-improving-agent safe to install?
Check the Security Audits panel on this page before install; the skill writes under .learnings/ and may edit AGENTS.md, TOOLS.md, or SOUL.md after promotion—review those paths in your workflow.
SKILL.md
READMESKILL.md - Proactive Self Improving Agent
# Proactive Self-Improving Agent **自动捕获经验 · 安全进化 · 记录轨迹** 让 agent 在日常工作中自动识别错误、纠正和最佳实践,结构化记录,安全地将经验沉淀为长期能力。 --- ## 目录 1. [核心理念](#1-核心理念) 2. [经验记录系统](#2-经验记录系统) 3. [经验进化路径](#3-经验进化路径) 4. [操作日志](#4-操作日志changelogmd) 5. [行为准则](#5-行为准则) 6. [快速参考](#6-快速参考) --- ## 1. 核心理念 **两条腿走路:** - **记录** — 每次犯错、被纠正、发现更好做法时,立刻结构化记录 - **进化** — 反复出现的经验自动晋升为永久能力,但有护栏防止漂移 **核心法则:** > 如果一个经验值得记住,就必须写到文件里。脑子里的"记住了"不算数。 **去重法则:** > 触发 ≠ 必须写入。每次触发时先判断:这个经验是否**真正新颖**?如果没什么可学的,或者本质上已经包含在已有条目中,**直接跳过,不写入**。避免用重复的低价值记录污染 .learnings/。 --- ## 2. 经验记录系统 ### 2.1 触发条件 检测到以下 **7 种场景**时,**评估是否有新经验值得记录**: | # | 场景 | 记录到 | 类别 | |---|---|---|---| | 1 | 命令/操作失败 | `ERRORS.md` | - | | 2 | 用户纠正("不对"/"应该是…"/"Actually…") | `LEARNINGS.md` | `correction` | | 3 | 用户需要不存在的能力 | `FEATURE_REQUESTS.md` | - | | 4 | 外部 API/工具出错 | `ERRORS.md` | - | | 5 | 发现自己知识过时/错误 | `LEARNINGS.md` | `knowledge_gap` | | 6 | 发现了更好的做法 | `LEARNINGS.md` | `best_practice` | | **7** | **任务完成时** | `LEARNINGS.md` | `task_review` | #### 场景 7:任务完成触发(Task Review) 每次完成一个任务后,**主动回顾**: - 这次过程中踩了什么坑? - 有没有走弯路?下次怎么做更快? - 有没有发现新的工具用法或技巧? - 有没有什么值得其他 agent 也知道的? **如果有真正新颖的经验 → 写入 LEARNINGS.md** **如果没什么可学的,或已有条目已覆盖 → 跳过,不写入** #### 学术场景扩展 在论文检索/分析场景中,额外关注: - 📚 **论文关键结论** — 解析出的重要发现或反直觉结论 - 🏷️ **分类决策** — 为什么把论文归入某个类别 - ⚖️ **评分依据** — review 打分时的关键判断理由 - 🔍 **检索技巧** — 某个搜索策略特别有效或无效 #### 检测关键词 **纠正信号:** - "不对" / "不是" / "错了" / "应该是" / "Actually" / "No, I meant" **能力请求信号:** - "能不能…" / "有没有办法…" / "要是能…" / "Can you…" **知识空白信号:** - 用户提供了你不知道的信息 - API 行为和你的理解不一致 - 文档内容已过时 ### 2.2 文件体系 ``` .learnings/ ├── LEARNINGS.md # 经验/纠正/最佳实践/任务回顾 ├── ERRORS.md # 错误日志 ├── FEATURE_REQUESTS.md # 能力请求 └── CHANGELOG.md # 操作日志(详见第 4 节) ``` ### 2.3 记录格式 #### Learning 条目 ```markdown ## [LRN-YYYYMMDD-XXX] category **Priority**: low | medium | high | critical **Status**: pending | resolved | promoted | promoted_to_skill **Area**: research | infra | tools | docs | config ### 内容 简述:发生了什么、为什么错/不好、正确/更好的做法是什么。 ### 建议修复 具体应该怎么改、改哪里。 ### 元数据 - Source: error | correction | user_feedback | task_review | best_practice - See Also: LRN-XXXXXXXX-XXX(关联条目) - Pattern-Key: xxx(可选,用于递归模式检测) - Promoted-To: AGENTS.md(仅晋升后填写) --- ``` #### Error 条目 ```markdown ## [ERR-YYYYMMDD-XXX] 出错的工具/命令 **Priority**: high **Status**: pending | resolved **Area**: research | infra | tools | docs | config ### 摘要 简述什么操作失败了。 ### 错误信息 \``` 实际的报错输出 \``` ### 上下文 - 执行的命令/操作 - 输入参数 - 环境信息(如相关) ### 建议修复 可能的解决方案。 ### 元数据 - Reproducible: yes | no | unknown - See Also: ERR-XXXXXXXX-XXX --- ``` #### Feature Request 条目 ```markdown ## [FEAT-YYYYMMDD-XXX] 能力名称 **Priority**: medium **Status**: pending | resolved **Area**: research | infra | tools | docs | config ### 需要的能力 用户想做什么。 ### 场景 为什么需要、解决什么问题。 ### 复杂度 simple | medium | complex ### 建议实现 怎么做、可以扩展哪个现有功能。 ### 元数据 - Frequency: first_time | recurring --- ``` ### 2.4 ID 生成规则 格式:`TYPE-YYYYMMDD-XXX` - **TYPE**:`LRN`(经验)、`ERR`(错误)、`FEAT`(功能请求) - **YYYYMMDD**:当天日期 - **XXX**:三位序号(`001`、`002`…)或随机三字符(`A7B`) 同一天同类型递增序号。 --- ## 3. 经验进化路径 ### 3.1 晋升机制 当一条 learning **足够重要且通用**时,将其精炼后写入永久文件: | 经验类型 | 晋升到 | 举例 | |---|---|---| | 工作流改进 | `AGENTS.md` | "批量处理论文时每篇独立 spawn" | | 工具使用技巧 | `TOOLS.md` | "Semantic Scholar API 限流 3s 间隔" | | 行为模式 | `SOUL.md` | "不确定分类时用 unclassified/" | **晋升步骤:** 1. **精炼**:把冗长的经验浓缩为一条简洁的规则 2. **写入**:添加到目标文件的对应章节 3. **更新原条目**:Status → `promoted`,填写 `Promoted-To` 4. **记录日志**:在 CHANGELOG.md 追加一条 `promote` 记录 ### 3.2 递归模式检测 当记录新条目时,**先搜索是否有相似的旧条目**: ```bash grep -r "关键词" .learnings/ ``` - 找到相似条目 → 添加 `See