Install
openclaw skills install learn-reflectThis skill should be used when the user asks to "record what we learned", "save lessons", "knowledge capture", "reflect on what happened", "write down experience", "what did we learn", "lessons learned", "retrospective", "log this plan", "what were we doing", "save plan log", or after completing a task that involved trial and error.
openclaw skills install learn-reflectCapture knowledge and experience from work sessions. Turn mistakes into system improvements through structured reflection and self-annealing.
Every learning opportunity follows this cycle:
Explore → Attempt → Observe Result → Reflect → Record → Anneal
Record the actions taken, in order:
Analyze results honestly:
Write each lesson in this format:
## [Topic]: [One-line summary]
**Context:** What we were doing when we learned this.
**What happened:** The specific event or error.
**Root cause:** Why it happened (not just what happened).
**Fix/Solution:** What we did to resolve it.
**Lesson:** The reusable knowledge (applicable beyond this specific case).
**Prevention:** What mechanism prevents this from happening again.
The most important step. A lesson that only lives in notes will be forgotten. Annealing means embedding the lesson into the system itself:
Error occurred
→ Fix the immediate problem
→ Update the tool/script that failed
→ Test the updated tool
→ Update the directive/documentation
→ System is now stronger against this class of error
Annealing targets (in order of durability):
| Target | Durability | Example |
|---|---|---|
| Code/Script | Highest | Add validation, fix the bug, add error handling |
| Automated check | High | Add to pre-push script, CI check, linter rule |
| Directive/Playbook | Medium | Update the SOP with new step or warning |
| Memory/Notes | Lowest | Save as memory for future conversations |
Always aim for the highest durability target. A lesson embedded in code cannot be forgotten.
When the user asks to reflect or record lessons, follow this exact process:
Step 1: Inventory List everything that happened in the session — actions, errors, fixes, discoveries.
Step 2: Classify For each event, ask: Is this a fact, inference, or assumption?
| Type | Definition | Example |
|---|---|---|
| Fact | Verified by output, test, or tool | "API returns 404 when token is expired" |
| Inference | Likely based on evidence, but not directly tested | "The rate limit is probably per-IP based on the error pattern" |
| Assumption | Believed but not verified | "This endpoint probably supports pagination" |
Step 3: Extract Lessons For each non-trivial event, write the structured lesson (Context → What happened → Root cause → Fix → Lesson → Prevention).
Step 4: Anneal For each lesson, identify the highest-durability target and implement the prevention mechanism.
Step 5: Verify Read back the recorded lessons. Ask:
Weak annealing (just a note):
"Remember to check CI after pushing."
Strong annealing (embedded in tooling):
Added
gh pr checkscall topre_push_check.py. Script now blocks if CI hasn't been checked. The lesson cannot be forgotten because the tool enforces it.
Weak annealing:
"Don't use
\sin grep character classes."
Strong annealing:
Added shell script linter rule that flags
\sinside[...]. Also added to the shell script checklist in the directive. Two layers of prevention.
Attention drift is real. You start with Plan A, get pulled into a side task, and forget what you originally set out to do. The Plan Log solves this.
Every time a plan is created or a non-trivial task begins, save a timestamped snapshot:
PlanLog/
├── 202604111430_apify-skills-collection.md
├── 202604111600_clawhub-distribution.md
├── 202604111730_clawhub-deep-dive.md
└── 202604111800_learn-skill-update.md
# Plan: [Title]
**Created:** YYYY-MM-DD HH:mm
**Status:** in-progress | completed | paused | abandoned
**Original goal:** [What we set out to do]
## Tasks
- [x] Completed task
- [ ] Pending task
- [ ] Task that got deferred
## Outcome
[What actually happened — filled in at the end]
## Drift Log
[If attention shifted, record when and why]
- HH:mm — Shifted to X because Y
- HH:mm — Returned to original plan / Decided to continue with X instead
| Knowledge type | Where to save |
|---|---|
| Technical fact (reusable) | Directive or knowledge base file |
| Project-specific context | Memory system or project notes |
| Tool bug or limitation | Comment in the tool's source code |
| Process improvement | Update the relevant SOP/playbook |
| One-time context | Don't save — it's ephemeral |