作者:互联网 时间: 2026-08-10 16:15:01
从源直接安装技能的最快方式。
npx clawhub@latest install self-improving
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
<project>/skills/
优先级:工作区 > 本地 > 内置
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 self-improving。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
自我改进型智能体技能旨在将标准的 AI 智能体转化为能从每次互动中学习的进化实体。通过实施结构化的自我反思循环,智能体根据用户意图评估其工作,主动识别错误,并将经验存储在分级记忆系统中。这确保了 Openclaw 技能随着时间的推移,通过积累知识而变得更加高效,无需人工提示工程。
该技能专注于高实用性学习,区分全局偏好、领域专业知识和项目级细微差别。它完全在本地存储上运行,在确保数据隐私的同时,通过对记忆模式进行系统性的升级和降级,透明地展示智能体逻辑的演进过程。
要初始化主动反思环境,请确保您的目录结构已准备就绪。此技能需要 Openclaw Skills 运行时来管理本地文件交互。
# 确保自我改进目录存在
mkdir -p ~/self-improving/projects ~/self-improving/domains ~/self-improving/archive
# 初始化核心记忆文件
touch ~/self-improving/memory.md
# 如果环境中有安装程序,请运行安装指南
# clawhub install self-improving
该技能将其学习组织成严格的层级结构,以优化上下文窗口并确保高速检索:
| 层级 | 存储位置 | 大小限制 | 逻辑 |
|---|---|---|---|
| 热记忆 (HOT) | memory.md |
≤100 行 | 始终加载;包含全局偏好。 |
| 温记忆 (WARM) | projects/, domains/ |
每文件≤200 行 | 上下文匹配时加载;包含特定专业知识。 |
| 冷记忆 (COLD) | archive/ |
无限制 | 归档衰减模式;可用于显式查询。 |
| 日志 (Logs) | corrections.md |
最近 50 条 | 跟踪错误和改进的原始数据流。 |
| 元数据 (Meta) | index.md |
不适用 | 带有行数统计的主题索引,用于跟踪记忆密度。 |
name: Self-Improving Agent (Proactive Self-Reflection)
slug: self-improving
version: 1.2.10
homepage: https://clawic.com/skills/self-improving
description: Self-reflection + Self-criticism + Self-learning + Self-organizing memory. Agent evaluates its own work, catches mistakes, and improves permanently. Use before starting work and after responding to the user.
changelog: "Sharper setup now lists relevant memory before non-trivial work, with a title that highlights proactive self-reflection."
metadata: {"clawdbot":{"emoji":"??","requires":{"bins":[]},"os":["linux","darwin","win32"],"configPaths":["~/self-improving/"]}}
User corrects you or points out mistakes. You complete significant work and want to evaluate the outcome. You notice something in your own output that could be better. Knowledge should compound over time without manual maintenance.
Memory lives in ~/self-improving/ with tiered structure. If ~/self-improving/ does not exist, run setup.md.
~/self-improving/
├── memory.md # HOT: ≤100 lines, always loaded
├── index.md # Topic index with line counts
├── projects/ # Per-project learnings
├── domains/ # Domain-specific (code, writing, comms)
├── archive/ # COLD: decayed patterns
└── corrections.md # Last 50 corrections log
| Topic | File |
|---|---|
| Setup guide | setup.md |
| Memory template | memory-template.md |
| Learning mechanics | learning.md |
| Security boundaries | boundaries.md |
| Scaling rules | scaling.md |
| Memory operations | operations.md |
| Self-reflection log | reflections.md |
Log automatically when you notice these patterns:
Corrections → add to corrections.md, evaluate for memory.md:
Preference signals → add to memory.md if explicit:
Pattern candidates → track, promote after 3x:
Ignore (don't log):
After completing significant work, pause and evaluate:
corrections.mdWhen to self-reflect:
Log format:
CONTEXT: [type of task]
REFLECTION: [what I noticed]
LESSON: [what to do differently]
Example:
CONTEXT: Building Flutter UI
REFLECTION: Spacing looked off, had to redo
LESSON: Check visual spacing before showing user
Self-reflection entries follow the same promotion rules: 3x applied successfully → promote to HOT.
| User says | Action |
|---|---|
| "What do you know about X?" | Search all tiers for X |
| "What have you learned?" | Show last 10 from corrections.md |
| "Show my patterns" | List memory.md (HOT) |
| "Show [project] patterns" | Load projects/{name}.md |
| "What's in warm storage?" | List files in projects/ + domains/ |
| "Memory stats" | Show counts per tier |
| "Forget X" | Remove from all tiers (confirm first) |
| "Export memory" | ZIP all files |
On "memory stats" request, report:
?? Self-Improving Memory
HOT (always loaded):
memory.md: X entries
WARM (load on demand):
projects/: X files
domains/: X files
COLD (archived):
archive/: X files
Recent activity (7 days):
Corrections logged: X
Promotions to HOT: X
Demotions to WARM: X
| Tier | Location | Size Limit | Behavior |
|---|---|---|---|
| HOT | memory.md | ≤100 lines | Always loaded |
| WARM | projects/, domains/ | ≤200 lines each | Load on context match |
| COLD | archive/ | Unlimited | Load on explicit query |
projects/{name}.mddomains/When patterns contradict:
When file exceeds limit:
See boundaries.md — never store credentials, health data, third-party info.
If context limit hit:
This skill ONLY:
~/self-improving/)This skill NEVER:
~/self-improving/Install with clawhub install <slug> if user confirms:
memory — Long-term memory patterns for agentslearning — Adaptive teaching and explanationdecide — Auto-learn decision patternsescalate — Know when to ask vs act autonomouslyclawhub star self-improvingclawhub sync