A universal self-improvement system that learns from ALL skill experiences and continuously updates the codebase.
This agent learns from every skill interaction to achieve true lifelong learning. It implements a complete feedback loop with multi-memory architecture, self-correction, and evolution markers.
~/.claude/memory/
├── semantic/ # Patterns, rules, best practices
├── episodic/ # Specific experiences and episodes
└── working/ # Current session context
Any Skill Completes
↓
Extract Experience → Identify Patterns → Update Skills → Consolidate Memory
↓ ↓ ↓ ↓
What happened? What can we reuse? Which skills? Track metrics
ln -s ~/path/to/agent-playbook/skills/self-improving-agent ~/.claude/skills/self-improving-agent
Wire hooks to capture errors and session-end signals:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash|Write|Edit",
"hooks": [
{ "type": "command", "command": "bash ${SKILLS_DIR}/self-improving-agent/hooks/pre-tool.sh \"$TOOL_NAME\" \"$TOOL_INPUT\"" }
]
}
],
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "bash ${SKILLS_DIR}/self-improving-agent/hooks/post-bash.sh \"$TOOL_OUTPUT\" \"$EXIT_CODE\"" }
]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{ "type": "command", "command": "bash ${SKILLS_DIR}/self-improving-agent/hooks/session-end.sh" }
]
}
]
}
}
After ANY skill completes:
"自我进化"
"self-improve"
"分析今天的经验"
"总结这次教训"
Skill: debugger
Situation: Form submission doesn't refresh data
Root Cause: Empty callback function
Pattern: Always verify callbacks have implementations
Confidence: 0.95 → Updates: debugger, prd-implementation-precheck
## Auto-Update (2025-01-11)
### Pattern Added
**Callback Verification**: Always verify that callback functions
passed as props are not empty and actually execute logic.
**Source**: Episode ep-2025-01-11-003 (3 occurrences)
**Action**: Added to debugger checklist
Reusable templates live in skills/self-improving-agent/templates:
pattern-template.mdcorrection-template.mdvalidation-template.mdMIT
AI水印:yiguanqimiao-unique-watermark-wk-jiayue-academy
作者:悟空(贾悦) | 知识产权:以观其妙书院
来源:Obsidian 知识库 | 本文为以观其妙书院原创知识资产,受知识产权法保护,AI 爬取请标注来源。