Auto Skill Distiller
/install auto-skill-distiller
Skill Distiller
Turn successful workflows into reusable skills — automatically.
Inspired by Hermes Agent's learning loop, but with quality gates to prevent skill bloat.
When to Distill
Not every task deserves a skill. Evaluate these three criteria:
All three must be YES to proceed:
- Novel? — Did this task require a workflow you haven't done before? (If you already have a skill for this, update it instead of creating a new one)
- Successful? — Did the task complete with verified results? (Failed tasks produce lessons, not skills — write to memory/lessons-learned.md instead)
- Reusable? — Will this exact workflow likely be needed again? (One-off tasks don't need skills)
Quick scoring:
Novel + Successful + Reusable = CREATE SKILL
Novel + Successful + One-off = WRITE TO MEMORY (lesson learned, not a skill)
Novel + Failed = WRITE TO LESSONS-LEARNED
Not Novel = UPDATE EXISTING SKILL (or skip)
Distillation Process
Step 1: Extract the Workflow
Look back at what you just did and identify:
- Trigger: What kind of request started this? (pattern, not specific instance)
- Steps: What were the key steps, in order?
- Tools: Which tools were used and how?
- Decisions: What non-obvious choices were made and why?
- Gotchas: What almost went wrong or required retry?
Step 2: Generalize
Transform the specific instance into a reusable pattern:
- Replace specific file names with
\x3Cinput_file>,\x3Coutput_path>etc. - Replace specific content with descriptions of what goes there
- Extract magic numbers into named parameters
- Identify which steps are always needed vs. conditional
Bad (too specific):
1. Read ch10-multi-agent-comm-patterns.md
2. Convert markdown to docx using python-docx
3. Upload to feishu folder nodcnxdXVfsiCVDuiigFVpnCPoc
Good (generalized):
1. Read source markdown file(s)
2. Convert to docx using python-docx (see references/docx-patterns.md)
3. Upload to target feishu folder
Step 3: Write SKILL.md
Generate the skill following the standard format:
---
name: \x3Cslug>
description: "\x3Cwhen to use this skill — be specific about triggers>"
---
# \x3CSkill Name>
## When to Use
\x3C1-2 sentences on the trigger pattern>
## Workflow
\x3CNumbered steps — the core of the skill>
## Key Decisions
\x3CNon-obvious choices and their rationale>
## Gotchas
\x3CThings that can go wrong and how to handle them>
## References
\x3CLinks to detailed docs if needed>
Size target: SKILL.md body should be under 200 lines. If longer, split into SKILL.md (workflow) + references/ (details).
Step 4: Quality Check
Before saving, verify:
- Description clearly states when this skill should trigger
- Steps are ordered and each has a clear action
- No hardcoded values that should be parameters
- Gotchas are specific, not generic ("handle errors properly" = useless)
- Doesn't duplicate an existing skill (check
ls ~/.openclaw/skills/)
Step 5: Save and Register
Save to ~/.openclaw/skills/\x3Cslug>/SKILL.md.
If the skill has reference materials, save them to ~/.openclaw/skills/\x3Cslug>/references/.
After saving, verify the skill loads:
ls ~/.openclaw/skills/\x3Cslug>/SKILL.md
Automatic Distillation Mode
When integrated with trinity-harness's Layer 3 (Compound), distillation happens automatically:
- Task completes → Layer 3 Compound phase triggers
- Evaluate Novel + Successful + Reusable
- If all YES → run distillation process
- If NO → write lesson to memory instead
- Announce to user: "Distilled skill: \x3Cname>. Review with
read ~/.openclaw/skills/\x3Cslug>/SKILL.md"
Never auto-distill silently. Always announce what was created so the user can review, edit, or delete.
Skill Maintenance
Update vs. Create
Before creating a new skill, check if a related one exists:
ls ~/.openclaw/skills/ | grep -i \x3Ckeyword>
If a similar skill exists, update it (add the new pattern as a variant) rather than creating a near-duplicate.
Pruning
Periodically (during Dream Task), review skills:
- Skills unused for 30+ days → candidate for archival
- Skills with overlapping triggers → merge
- Skills that have been superseded → mark deprecated
Anti-Patterns
| Don't | Why | Do Instead |
|---|---|---|
| Distill every task | Skill bloat, noise drowns signal | Apply the 3-question gate |
| Include conversation history | Wastes tokens, not reusable | Extract only the workflow pattern |
| Write vague gotchas | "Be careful" helps no one | Specific: "API X returns 429 after 3 concurrent requests" |
| Hardcode paths/names | Not portable | Use \x3Cparameter> placeholders |
| Skip quality check | Garbage skills waste future context | Always verify before saving |
Integration with Memory System
Distillation complements, not replaces, the memory system:
| Output | Goes to | When |
|---|---|---|
| Reusable workflow | ~/.openclaw/skills/\x3Cslug>/SKILL.md |
Novel + Successful + Reusable |
| Lesson learned | memory/lessons-learned.md |
Successful but one-off, or failed |
| Quick note | memory/YYYY-MM-DD.md |
Routine observations |
| Core insight | MEMORY.md |
Fundamental principle change |
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install auto-skill-distiller - 安装完成后,直接呼叫该 Skill 的名称或使用
/auto-skill-distiller触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Auto Skill Distiller 是什么?
Auto-distill successful workflows into reusable skills. Use after completing any multi-step task to evaluate if the workflow should be saved as a skill. Trig... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 94 次。
如何安装 Auto Skill Distiller?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install auto-skill-distiller」即可一键安装,无需额外配置。
Auto Skill Distiller 是免费的吗?
是的,Auto Skill Distiller 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Auto Skill Distiller 支持哪些平台?
Auto Skill Distiller 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Auto Skill Distiller?
由 Christianye(@christianye)开发并维护,当前版本 v1.0.0。