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.
