skill-self-evolution-enhancer: Make Your AI Agent Actually Learn from Mistakes
The Problem: Your AI Has Amnesia You've been using an AI assistant for three months. It's still making the same mistakes it made in week one. Every session s…
- Added to the lab
- Downloads
- 0
- Human review
- Human reviewed
The Problem: Your AI Has Amnesia
You've been using an AI assistant for three months. It's still making the same mistakes it made in week one. Every session starts fresh, every correction evaporates.
This isn't a model limitation — it's a workflow design failure. Most AI tools have no mechanism for cross-session learning.
skill-self-evolution-enhancer does one thing: it gives your AI agent a persistent memory and behavior-correction loop.
What This Skill Does
Three core functions:
- Error capture: When a user corrects the AI ("No, it should be..."), the lesson is automatically extracted and stored in
.learnings/LEARNINGS.md - Failure archiving: When a command fails, the full error context (code, environment, fix steps) goes into
.learnings/ERRORS.md - Behavior promotion: When enough patterns accumulate, validated rules are promoted to
SOUL.mdorAGENTS.md— permanently changing default behavior
Installation
# Install via ClawHub
clawhub install skill-self-evolution-enhancer
Or manually in your OpenClaw workspace
mkdir -p ~/.openclaw/workspace/skills/self-improving-agent
After installation, the skill creates this directory structure:
.learnings/
├── LEARNINGS.md # Behavioral lessons (user-correction triggered)
├── ERRORS.md # Technical failure records (command/API error triggered)
└── FEATURE_REQUESTS.md # Missing capability log
Real-World Usage at SFD Lab
Case 1: API Parameter Memory
Early on, our content agent kept publishing articles with lang: "zh-tw" (lowercase), causing traditional Chinese versions to never appear on the site. After the first correction, LEARNINGS.md captured:
## 2026-03-24 Language codes must use uppercase TW
- Problem: Traditional Chinese lang field used zh-tw (lowercase)
- Impact: Article published successfully but zh-TW version never displayed
- Fix: Always use zh-TW (uppercase TW), updated content-publishing-guide.md
- Status: Verified, use directly next time
This record gets read before every publish. Same mistake: never happened again. No retraining. Just a document.
Case 2: SSH Failure Archive
Our deployment agent hit rsync: [sender] write error: Broken pipe (32). First time required manual investigation (firewall timeout). ERRORS.md preserved the complete diagnostic path and fix commands. Next occurrence: resolved in under 2 minutes.
Case 3: Behavior Rule Promotion
After being reminded 5 times to "check for duplicate slugs before publishing," we promoted that rule from LEARNINGS.md into the AGENTS.md pre-publish checklist. It's now default behavior — no reminder needed.
Common Pitfalls
Pitfall 1: Recording frequency creep. If the agent logs every small event, the file becomes unmanageable. Fix: trigger only on user corrections or operation failures.
Pitfall 2: Conflicting lessons. Two agents in the same workspace might record contradictory lessons on the same topic. Fix: every entry must include an agent identifier; conflicts require human arbitration.
Pitfall 3: Promotion timing. Not every lesson deserves to become a permanent rule. Our threshold: same error class appearing 3+ times before promoting to SOUL.md.
Skill Combinations
- + coding skill: Auto-log failed build environments and fix steps; accumulate a technical debt register
- + multi-agent-cn: Each agent role maintains its own LEARNINGS; prevents cross-role contamination
- + self-improving-agent (OpenClaw built-in): Periodic "experience distillation" summarizes scattered LEARNINGS into structured improvement proposals
Results After 3 Months
Rough measurement across our 15-agent team: repeat errors (same error class occurring a second time) dropped by approximately 70%. More importantly, new agents onboard inheriting existing LEARNINGS — they don't have to stumble through the same mistakes.
SFD Editor's Note: We append this to every agent's system prompt: "After completing any task, evaluate whether any lessons are worth logging." The trigger matters as much as the mechanism. If you try only one skill this year, try this one.