/install experience-layer
Skill Experience Layer for OpenClaw
A failure-driven learning mechanism that systematically accumulates experience from tool calls, mistakes, and successes. Each tool/skill category has its own experience file with:
- Lessons learned from failures
- Common mistakes pattern matching
- Preventive best practices
- Statistics tracking (total executions, success/failure counts)
Core Philosophy
"The man who repeats the same mistake and expects different results is a fool." - This mechanism eliminates that.
Every failure is a one-time tuition payment for permanent knowledge.
How It Works
1. Pre-execution Experience Loading
Before any tool call, the agent must:
- Identify the experience category
- Read the compact experience file
- Apply learned best practices
- Avoid known mistakes
2. Post-execution Experience Update
If the tool call fails:
- Stop immediately and analyze root cause
- Add/Update the experience entry
- Record the mistake and prevention
- Continue only after updating
If the tool call succeeds:
- Optionally add high-value best practices
- Keep experience lean and actionable
3. Weekly/Monthly Maintenance
- Weekly: Remove outdated experiences
- Monthly: Clean up duplicates, consolidate patterns
Experience Category Structure
{
"type": "skill",
"name": "tool-name",
"lastUpdated": "ISO timestamp",
"totalExecutions": N,
"successCount": N,
"failureCount": N,
"experiences": [
{
"mistake": "Description of what went wrong",
"when": "Context/scenario where it happens",
"avoidance": "How to avoid this mistake",
"count": 1
}
],
"patterns": {
"commonMistakes": [
"List of frequent mistakes"
],
"bestPractices": [
"List of proven best practices"
]
}
}
Built-in Categories
| Category | Description |
|---|---|
read |
File reading, web fetching |
write |
File writing, editing |
edit |
Exact text replacement in files |
exec |
Shell command execution |
browser |
Browser automation |
message |
Message sending, media upload |
search |
Web search tools |
feishu |
All Feishu/Lark API tools |
feishu-* |
Fine-grained Feishu sub-skill experiences |
memory |
Memory search and retrieval |
skill |
Skill management operations |
cron |
Cron job scheduling and delivery modes |
video-frames |
Video frame extraction with ffmpeg |
Installation
clawhub install experience-layer
Or manually:
mkdir -p ~/.openclaw/workspace/memory/experiences
# Copy the empty category template to start
cp templates/empty-category.json ~/.openclaw/workspace/memory/experiences/your-category.json
# Edit the JSON and add your first experience
What's Included
SKILL.md- Complete documentationtemplates/empty-category.json- Starter template for new categoriestemplates/example.json- Real-world example from production usageexamples/- Full production-ready experience files:examples/edit.json- Experience for file editingexamples/exec.json- Experience for shell command executionexamples/feishu.json- Experience for Feishu/Lark APIexamples/message.json- Experience for message sendingexamples/cron.json- Experience for cron job scheduling
Usage in OpenClaw Workflow
- Before calling a tool:
read memory/experiences/{category}.json
apply the best practices and avoid the common mistakes
- After failure:
analyze root cause
update the corresponding experience file
record the lesson learned
then retry
Benefits
- No repeated mistakes - Same mistake only pays tuition once
- Progressive improvement - System gets better over time
- Compact and searchable - JSON format for easy semantic search
- Low overhead - Small files, quick to load
- Open extension - Add new categories as needed
Changelog
1.0.2 (2026-03-18)
- Add
examples/directory with full production experience files - Include 5 complete real-world experience JSON: edit, exec, feishu, message, cron
- Users can drop these directly into their
memory/experiences/to start
1.0.1 (2026-03-18)
- Add template directory with empty category template
- Add complete example JSON from production
- Improve installation documentation
1.0.0 (2026-03-18)
- Initial public release
- 25+ experience categories with real-world lessons from production usage
- Complete JSON schema
- Documentation
Author
jilanfang
License
MIT
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install experience-layer - 安装完成后,直接呼叫该 Skill 的名称或使用
/experience-layer触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Skill Experience Layer 是什么?
Skill Experience Layer - A failure-driven learning mechanism for OpenClaw agents that automatically accumulates lessons and best practices to avoid repeating... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 217 次。
如何安装 Skill Experience Layer?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install experience-layer」即可一键安装,无需额外配置。
Skill Experience Layer 是免费的吗?
是的,Skill Experience Layer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Skill Experience Layer 支持哪些平台?
Skill Experience Layer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Skill Experience Layer?
由 jilanfang(@jilanfang)开发并维护,当前版本 v1.0.2。