Compound Learning
Use this skill to turn completed work into reusable knowledge. The goal is simple: make future work faster and better by storing concrete, searchable lessons.
Setup
Canonical script location:
SKILL_DIR="$HOME/.openclaw/skills/compound-learning-openclaw-skill"
Optional compatibility wrappers for legacy callers:
bash "$SKILL_DIR/scripts/install-compat.sh"
Environment overrides:
COMPOUND_LEARNINGS_DIR(default~/.openclaw/learnings)COMPOUND_LEARNINGS_SCRIPTS_DIR(optional script path override)
When to Trigger
Trigger after any meaningful output:
- feature delivery
- incident response
- code review
- sales or customer conversations
- research synthesis
- operational runbooks
Natural prompts: "what did we learn", "capture this", "what should future me remember", "why did this fail".
Process
- Analyze outcome through lenses:
- pattern: repeatable behavior that worked or failed
- template: reusable structure
- preference: stakeholder/user style preference
- failure: preventable miss and guardrail
- insight: non-obvious connection
- Produce 2-5 discrete insights max.
- Store each insight as its own file with
store-insight.sh. - Suggest search hooks for next similar task.
Store Example
cat > /tmp/insight-body.md << 'EOF'
## Context
[What happened]
## The Learning
[What matters and why]
## When to Apply
[Specific trigger conditions]
## Related
[Optional related files]
EOF
SKILL_DIR="$HOME/.openclaw/skills/compound-learning-openclaw-skill"
bash "$SKILL_DIR/scripts/store-insight.sh" \
--type pattern \
--category operations \
--task "Release deploy with rollback drills" \
--outcome success \
--tags "release,rollback,runbook" \
--takeaway "Pre-deploy rollback rehearsal cuts incident recovery time." \
--title "Rehearse Rollback Before High-Risk Deploys" \
--content-file /tmp/insight-body.md
Optional strict duplicate protection:
bash "$SKILL_DIR/scripts/store-insight.sh" ... --reject-duplicates
Search Before Similar Work
SKILL_DIR="$HOME/.openclaw/skills/compound-learning-openclaw-skill"
bash "$SKILL_DIR/scripts/search-learnings.sh" release
bash "$SKILL_DIR/scripts/search-learnings.sh" --category code --type failure test-flake
bash "$SKILL_DIR/scripts/search-learnings.sh" --limit 10
Anti-Patterns
- Do not store vague statements.
- Do not combine multiple insights into one file.
- Do not skip failure learnings.
- Do not exceed 2-5 insights per task.
Scripts
| Script | Purpose |
|---|---|
extract-learnings.sh | Prompt scaffold for extracting insights |
store-insight.sh | Persist one insight file and update index |
search-learnings.sh | Search insights by keyword/category/type |
install-compat.sh | Create/update legacy wrapper path symlinks |
See references/insight-format.md for file schema and examples.
