Lightweight, reversible self-improvement for agent sessions.
Use it to:
.learnings/.learnings/PROMOTED.mdAfter installation, follow the Setup section to initialize .learnings/, enable the hook, and restart the gateway.
Once active, the model is guided to use the learning workflow in future runs.
The learning process remains model-mediated, so results depend on model capability, instruction-following quality, and task relevance.
SituationActionCommand/operation failsLog to .learnings/ERRORS.mdAPI/external tool failsLog to .learnings/ERRORS.md with integration detailsUser corrects youLog to .learnings/LEARNINGS.mdKnowledge was outdatedLog to .learnings/LEARNINGS.mdFound a better approachLog to .learnings/LEARNINGS.mdUser wants missing capabilityLog to .learnings/FEATURE_REQUESTS.mdSimilar to an existing entryLink with See Also; update recurrence notes if usefulProven recurring patternDistill into .learnings/PROMOTED.mdBehavioral / workflow / tool ruleStore in .learnings/PROMOTED.md under the right category
This skill expects these files under ~/.openclaw/workspace/.learnings/:
LEARNINGS.md — raw learnings, corrections, knowledge gaps, best practicesERRORS.md — failures, exceptions, unexpected tool behaviorFEATURE_REQUESTS.md — missing capabilities requested by the userPROMOTED.md — distilled, durable rules promoted out of raw learningsbash
clawhub install claw-self-improvement
.learnings/#Create missing starter files without overwriting existing .learnings/ history:
bash
SKILL_DIR=~/.openclaw/workspace/skills/claw-self-improvement
mkdir -p ~/.openclaw/workspace/.learnings
[ -e ~/.openclaw/workspace/.learnings/LEARNINGS.md ] || cp "$SKILL_DIR"/assets/LEARNINGS.md ~/.openclaw/workspace/.learnings/LEARNINGS.md
[ -e ~/.openclaw/workspace/.learnings/ERRORS.md ] || cp "$SKILL_DIR"/assets/ERRORS.md ~/.openclaw/workspace/.learnings/ERRORS.md
[ -e ~/.openclaw/workspace/.learnings/FEATURE_REQUESTS.md ] || cp "$SKILL_DIR"/assets/FEATURE_REQUESTS.md ~/.openclaw/workspace/.learnings/FEATURE_REQUESTS.md
[ -e ~/.openclaw/workspace/.learnings/PROMOTED.md ] || cp "$SKILL_DIR"/assets/PROMOTED.md ~/.openclaw/workspace/.learnings/PROMOTED.md
To inject the reminder during agent:bootstrap, install or refresh the hook files:
bash
SKILL_DIR=~/.openclaw/workspace/skills/claw-self-improvement
mkdir -p ~/.openclaw/hooks/claw-self-improvement
cp -R "$SKILL_DIR"/hooks/. ~/.openclaw/hooks/claw-self-improvement/
openclaw hooks enable claw-self-improvement
bash
ls ~/.openclaw/workspace/.learnings
openclaw hooks list
Use the OpenClaw config gate below if you want the hook to inject a stronger instruction for visible learning notices:
json
{
"skills": {
"entries": {
"claw-self-improvement": {
"config": {
"message": true
}
}
}
}
}
If you also want phrasing guidance, add the following preference block to TOOLS.md:
markdown
### claw-self-improvement
- UX preference: when you add a new entry to `.learnings/` during a user-facing reply, append one short confirmation line.
- For raw logs, say: `Noted — logged to .learnings/LEARNINGS.md.`, `Noted — logged to .learnings/ERRORS.md.` or `Noted — logged to .learnings/FEATURE_REQUESTS.md.`
- For promotions, say: `Promoted — new rule to .learnings/PROMOTED.md.`
- Keep the notice brief and only include it once per reply.
- Skip the notice when there is no user-visible reply, or when replying `NO_REPLY`.
bash
openclaw gateway restart
.learnings/ file..learnings/PROMOTED.md.**Status**: promoted**Promoted**: .learnings/PROMOTED.md**Promotion-ID**: PRM-YYYYMMDD-XXX**Promotion-Category**: Behavioral Patterns | Workflow Improvements | Tool Gotchas | Durable RulesPromote to .learnings/PROMOTED.md only when the pattern is mature enough to reuse:
Learning TypePromotion CategoryBehavioral patternsBehavioral PatternsWorkflow improvementsWorkflow ImprovementsTool gotchasTool GotchasDurable facts/rulesDurable Rules
Keep the entry in the raw .learnings/ files when it is:
For exact field definitions, templates, and examples, read:
references/FORMAT.mdThe files in assets/ are minimal starter templates to copy into .learnings/.
bash
openclaw hooks disable claw-self-improvement
bash
rm -rf ~/.openclaw/hooks/claw-self-improvement
bash
rm -rf ~/.openclaw/workspace/skills/claw-self-improvement
If the skill was installed via ClawHub, also remove its local install record from ~/.openclaw/workspace/.clawhub/lock.json.
bash
python3 - <<'PY'
from pathlib import Path
import json
path = Path.home() / '.openclaw/workspace/.clawhub/lock.json'
if path.exists():
data = json.loads(path.read_text())
skills = data.get('skills')
if isinstance(skills, dict):
skills.pop('claw-self-improvement', None)
path.write_text(json.dumps(data, indent=2) + '\n')
PY
.learnings/ Files#The .learnings/ directory is your captured history, not the hook itself. You can keep it for reference, or remove the files if you no longer want the data.
Remove only the files created for this workflow:
bash
rm -f ~/.openclaw/workspace/.learnings/LEARNINGS.md \
~/.openclaw/workspace/.learnings/ERRORS.md \
~/.openclaw/workspace/.learnings/FEATURE_REQUESTS.md \
~/.openclaw/workspace/.learnings/PROMOTED.md
If the directory is empty afterward, you can remove it too:
bash
rmdir ~/.openclaw/workspace/.learnings 2>/dev/null || true
Remove the claw-self-improvement block from TOOLS.md if you added it during installation.
bash
openclaw gateway restart
After restart, future runs will no longer receive the bootstrap reminder from this skill. Existing Markdown history remains unless you explicitly delete it.
Adapted from peterskoett/self-improving-agent.