Install
openclaw skills install @paul-tian/claw-self-improvementCapture errors, corrections, knowledge gaps, better practices, and feature requests in `.learnings/`, then distill proven recurring patterns into `.learnings/PROMOTED.md`.
openclaw skills install @paul-tian/claw-self-improvementLightweight, 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.
| Situation | Action |
|---|---|
| Command/operation fails | Log to .learnings/ERRORS.md |
| API/external tool fails | Log to .learnings/ERRORS.md with integration details |
| User corrects you | Log to .learnings/LEARNINGS.md |
| Knowledge was outdated | Log to .learnings/LEARNINGS.md |
| Found a better approach | Log to .learnings/LEARNINGS.md |
| User wants missing capability | Log to .learnings/FEATURE_REQUESTS.md |
| Similar to an existing entry | Link with See Also; update recurrence notes if useful |
| Proven recurring pattern | Distill into .learnings/PROMOTED.md |
| Behavioral / workflow / tool rule | Store 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 learningsclawhub install claw-self-improvement
.learnings/Create missing starter files without overwriting existing .learnings/ history:
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:
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
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:
{
"skills": {
"entries": {
"claw-self-improvement": {
"config": {
"message": true
}
}
}
}
}
If you also want phrasing guidance, add the following preference block to TOOLS.md:
### 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`.
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 Type | Promotion Category |
|---|---|
| Behavioral patterns | Behavioral Patterns |
| Workflow improvements | Workflow Improvements |
| Tool gotchas | Tool Gotchas |
| Durable facts/rules | Durable 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/.
openclaw hooks disable claw-self-improvement
rm -rf ~/.openclaw/hooks/claw-self-improvement
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.
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/ FilesThe .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:
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:
rmdir ~/.openclaw/workspace/.learnings 2>/dev/null || true
Remove the claw-self-improvement block from TOOLS.md if you added it during installation.
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.