360 Secure SkillHub
360 安全技能中心

Self-Improvement (OpenClaw Edition)

核心功能:通过单一Markdown文件记录错误、模式、洞察等学习条目,按日期归档,任务前可检索回顾,还能将通用经验迁移到对应文档。典型场景:命令执行失败、用户纠正、发现知识缺口等6种情况。输入为指定格式的Markdown条目,输出为结构化学习记录,可通过grep检索,也能集成到记忆系统做周度回顾优化。

ciklopentan
ciklopentan
热度 18.85
最近更新 2026-04-05 16:11:47
分类:效率依赖:代码执行 / 读写文件应用场景:笔记整理 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add self-improvement-ciklopentan
Metadata
name
self-improvement
description
Captures learnings, errors, and corrections for continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects the agent, (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Agent realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.
metadata
null

Self-Improvement Skill — v2.0 (2026-04-05)

Log learnings and errors. Review them. Stop repeating mistakes.

Core Idea

When something goes wrong or surprises you — write it down. Next time, check before acting.

Setup

One file. That's it.

mkdir -p ~/.openclaw/workspace/.learnings
touch ~/.openclaw/workspace/.learnings/LEARNINGS.md

Already exists: ~/.openclaw/workspace/.learnings/LEARNINGS.md with existing entries (confirmation rules, triggers, categories). New v2.0 format is backward compatible — just append in the new format.

Format

## YYYY-MM-DD

- [error] pm2 restart deepseek failed → fix: pm2 delete && pm2 start deepseek-daemon.js
- [pattern] DeepSeek session collision when reusing generic names → use dt-topic-date
- [insight] grep search IS enough for <200 entries, no need for complex dedup
- [correction] unit_state[MainPID] is wrong for systemctl status → use Active/Loaded lines
- [knowledge_gap] Tailscale Serve survives gateway restart without reconfiguration

---

Rules:

  • No IDs. Date is the key.
  • No area tags. Use grep -i "pm2\|deepseek" to find entries.
  • No priority levels. If it's worth logging, it matters.
  • One-liner: problem → solution/insight
  • Append-only. Don't edit past entries.

Detection Triggers

Automatically log when:

Trigger Category
Command fails unexpectedly [error]
User corrects you ("No, that's wrong...") [correction]
You discover something works differently than you thought [pattern] or [insight]
You find a better approach for a recurring task [pattern]
User asks for capability you don't have [knowledge_gap]
Documentation or API behavior differs from your understanding [knowledge_gap]

Review

Before starting a non-trivial task, scan learnings:

grep -i "keyword" ~/.openclaw/workspace/.learnings/LEARNINGS.md

Or just read today + yesterday's entries in memory/episodic/.

Promotion

When a lesson is broadly applicable, promote it to the right file:

Learning goes to Example
AGENTS.md — workflow rules "After API changes: regenerate client"
SOUL.md — behavioral patterns "Don't apologize, fix instead"
TOOLS.md — tool gotchas "Git push needs auth configured first"
MEMORY.md — key facts "Port 18789 = gateway"

After promoting, don't remove the learning — it documents why the rule exists.

When NOT to Use

  • Simple typos (everyone makes typos)
  • Known limitations already documented
  • Time-sensitive one-offs that won't recur
  • Secrets or sensitive data ever

Integration with Memory System

LEARNINGS.md feeds into memory/procedural/lessons-learned.md during weekly review:

  • Recurring errors → procedural patterns
  • One-off mistakes → ignore
  • New conventions → update AGENTS.md/SOUL.md

Canonical Owner Rule: Errors and corrections go in LEARNINGS.md. Derived rules go in AGENTS.md. Procedural patterns go in memory/procedural/lessons-learned.md. No duplication.