当前位置: 首页 > Skill >

Skill Distiller

Skill Distiller

Skill Distiller

Distill successful workflows into reusable skills with quality gates. Use after completing multi-step tasks to evaluate if the workflow should be saved. Trig...

2.0.1 2026.11.27 499
获取Skill文件查看使用说明
作 者:周辰 许可证: 更新时间:2026.11.27
本文目录展开

Skill Distiller

Turn successful workflows into reusable skills — with discipline, not enthusiasm.

Built on agentic learning-loop patterns. Hardened by 30+ skill-creation incidents (some real, some embarrassing).

When to Distill — 4-Question Gate

All four must be YES to proceed. This is stricter than v1's 3-question gate (Novel + Successful + Reusable) because we learned the hard way that "looks reusable" without grounding produces hallucinated skills.

  1. Novel? — Is this a workflow you haven't done before? (If similar skill exists, UPDATE it instead of creating new)
  2. Successful? — Did the task complete with verified results? (Failed tasks → write to lessons-learned.md, not a skill)
  3. Reusable? — Will this exact workflow likely be needed again? (One-off → memory note, not skill)
  4. Grounded? 🆕 — Do you have ≥10 real samples to back up the workflow? (Without grounding = LLM hallucination dressed as a skill — see Anti-Pattern: "Sycophancy of Completeness")

Quick scoring:

4/4 YES = CREATE SKILL
Novel + Successful + Reusable, but only 1 sample = STAGE THE SKILL but mark "needs more samples" — don't publish/install yet
Novel + Successful + One-off = MEMORY NOTE
Failed = LESSONS-LEARNED entry
Not Novel = UPDATE EXISTING SKILL

Distillation Process

Step 1: Extract the Workflow

Look back at what you just did. Identify:

  • Trigger: What kind of request started this? (the pattern, not the specific instance)
  • Steps: The key steps in order
  • Tools: Which tools used and how
  • Decisions: Non-obvious choices and why
  • Gotchas: What almost went wrong, what required retry

🆕 Grounding requirement: Before extracting, list the real instances this skill is based on. <3 instances = mark "experimental, do not publish"; 3-9 = "beta, single-user only"; ≥10 = ready for public publish.

Step 2: Generalize

Transform the specific instance into a reusable pattern.

❌ Bad (too specific):

1. Read ch10-multi-agent-comm-patterns.md
2. Convert markdown to docx using python-docx
3. Upload to <internal-folder-token>

✅ Good (generalized):

1. Read source markdown file(s)
2. Convert to docx (see references/docx-patterns.md)
3. Upload to target output destination

Step 3: Write SKILL.md

Standard format:

---
name: <slug>
description: "<when to trigger — be specific>"
version: <semver>
---

# <Skill Name>

## When to Use
<1-2 sentences on the trigger pattern>

## Workflow
<Numbered steps>

## Key Decisions
<Non-obvious choices and rationale>

## Gotchas
<Specific failure modes and handling>

## References
<Links to detailed docs if needed>

Size targets:

  • SKILL.md body: under 200 lines
  • description: under 1024 chars (some registries enforce this)
  • Long-form content → references/ subdirectory

🆕 Trigger keyword discipline: Description's "Triggers:" or "Use when:" section must list 5-15 concrete phrases users actually type. Mix English + native language if your audience is bilingual. Vague triggers ("when needed", "for general use") = skill won't fire.

Step 4: 4-Layer Quality Check

Before saving, verify:

Layer A — Format

  • description states when to trigger (not just what it does)
  • Each step has a clear, atomic action
  • No hardcoded values that should be parameters
  • Gotchas are specific (not "handle errors properly")

Layer B — Grounding

  • Workflow backed by ≥10 real instances (or marked "experimental")
  • Examples in references/ are real, not invented
  • No claim made without source

Layer C — IP Boundary 🆕

  • No private user identifiers (real names, account IDs, internal codenames)
  • No internal project names or customer info
  • No absolute paths revealing user identity (/home/<user>/...)
  • No references to private memory files
  • Description reads like a generic tool, not a personal note

Layer D — Discoverability

  • Triggers list 5-15 concrete user phrases
  • Skill name doesn't collide with existing slugs
  • No near-duplicate skill exists (run ls ~/.openclaw/skills/ | grep -i <keyword>)

Step 5: Save and Register

Save to ~/.openclaw/skills/<slug>/SKILL.md (or workspace skills dir).

Reference materials → ~/.openclaw/skills/<slug>/references/.

Verify it loads:

ls ~/.openclaw/skills/<slug>/SKILL.md

🆕 For skills destined for a public registry (e.g., ClawHub):

  1. Run IP grep on whole skill directory before publish
  2. Track in a SSOT file (e.g., skills/SKILL-REGISTRY.md) — slug, version, owner, publish date
  3. After publish, update SSOT immediately. "Already published" memory across sessions is unreliable.

Skill Classification

🆕 Before saving, decide which class:

Class Naming Goes to Public?
🔴 Internal <owner-prefix>-<name> Owner's private skills dir Never share
🟡 Preparing no prefix Workspace skills dir Polished but not vetted yet
🟢 Shared no prefix Workspace skills dir Ready for public registry
🔵 External original name Skills dir Installed from registry, don't modify

The rule: if the skill references private state (memory files, personal config, user identity), it's Internal — even if the workflow itself is generic.

Automatic Distillation Mode

When integrated with a harness skill's Compound phase (e.g., trinity-harness Layer 3), distillation can happen automatically:

  1. Task completes → Compound phase triggers
  2. Run 4-question gate
  3. If all YES → run distillation process
  4. If NO → write lesson to memory
  5. Always announce what was created (never silent)

🆕 Automatic ≠ silent. Even auto-distilled skills must surface to the user with a one-line summary, so they can review/edit/reject before the skill is used in earnest.

Skill Maintenance

Update vs. Create

Before creating new, check related ones:

ls ~/.openclaw/skills/ ~/.openclaw/workspace/skills/ 2>/dev/null | grep -i <keyword>

Similar exists → update it (add as variant), don't create near-duplicate.

Pruning (during periodic review)

  • Unused 30+ days → archival candidate
  • Overlapping triggers → merge
  • Superseded → mark deprecated

🆕 Skill hash drift detection: For installed external skills, periodically diff the local file against the registry version. Hash change without an explicit update = possible upstream poisoning. Alert the user.

Anti-Patterns

Don't Why Do Instead
Distill every task Skill bloat, noise drowns signal Apply the 4-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 user-specific paths/names Not portable, leaks identity Use <parameter> placeholders
Skip quality check Garbage skills waste future context Always verify all 4 layers
🆕 Sycophancy of Completeness Skill looks polished but invented Require ≥10 real samples before publishing
🆕 Auto-publish without IP grep Real production leak risk Always grep private identifiers before pushing to public registry
🆕 Trust "I already published this" memory Cross-session memory is lossy Maintain a SSOT file with slug + version + date

Integration with Memory System

Output Goes to When
Reusable workflow (4/4 gate passes) Skills dir / SKILL.md Novel + Successful + Reusable + Grounded
Lesson learned memory/lessons-learned.md Successful but one-off, or failed
Quick note memory/YYYY-MM-DD.md Routine observations
Core insight (changes how you work) Persistent memory file Fundamental principle change
Skill in progress Skills dir, marked "experimental" Novel + Successful + Reusable but <10 samples

Pre-Publish Vet (for public registries) 🆕

Before pushing to ClawHub or similar:

  1. IP grep — search the whole skill dir for private identifiers, internal codenames, absolute paths
  2. Anti-injection scan — check description and references for prompt-injection vectors (ignore previous, system:, admin:, etc.)
  3. Self-vet via skill-vetter (or equivalent) — independent reading checks for hallucinated commands, dangerous shell patterns
  4. SSOT update — record slug + version + publish date + owner BEFORE the publish call (so you don't forget afterward)

Quick Reference

Distill?     → 4-question gate (Novel + Successful + Reusable + Grounded)
Classify?    → Internal / Preparing / Shared / External
Quality?     → 4 layers (Format / Grounding / IP / Discoverability)
Publish?     → IP grep → vet → SSOT update → push
Always:      Announce auto-distilled skills, never silent.

相关文章

更多
在不引入重型框架的情况下为Laravel添加轻量级工作流

在 Laravel 中实现轻量级工作流,核心思路是利用 Queue 驱动的任务链( Chains )配合自定义的 Job 类。通过定义一组按顺序执行的 Job ,并利用 Bus::chain() 或手动调用 $job->handle() 时传递上下文数据,即可在不引入如 Spatie Workflow 等重型包的情况下

2026.04.20 697
Laravel工作流方案选型:原生状态机与laravel-workflow对比

在 Laravel 中实现工作流,核心在于选择状态管理方式。若流程简单且无需持久化历史,使用原生 Enum 配合数据库字段即可;若需完整审计、回滚或复杂分支,应选用 laravel-workflow 等专用包。本文通过对比两种方案在状态流转、数据结构和代码实现上的差异,帮助开发者根据业务复杂度做出选型。

2026.05.07 403
Skill 文件
  • SKILL.md
    • Skill Distiller
    • When to Distill — 4-Question Gate
    • Distillation Process
      • Step 1: Extract the Workflow
      • Step 2: Generalize
      • Step 3: Write SKILL.md
      • Step 4: 4-Layer Quality Check
      • Step 5: Save and Register
    • Skill Classification
    • Automatic Distillation Mode
    • Skill Maintenance
      • Update vs. Create
      • Pruning (during periodic review)
    • Anti-Patterns
    • Integration with Memory System
    • Pre-Publish Vet (for public registries) 🆕
    • Quick Reference
  • 项目或源文件

相关 Skill

更多
skill-creator-enhanced skill-creator-enhanced Enhanced skill creator with templates, validation, publishing workflow, and quality gates. Guides through skill creation process with best practices, common patterns, and ClawHub integration.
Perfect Automation Perfect Automation 完美的自动化工作流系统——结合automation‑workflows与n8n‑workflow‑automation的全部优势,具备自动化机会识别、ROI计算、健壮设计、幂等性、错误处理、重试机制、人工审核队列以及可审计输出。触发词:自动化、工作流、自动、减少手动、提效。
Software Development Requesting Code Review Software Development Requesting Code Review "Pre-commit review: security scan, quality gates, auto-fix."
Quality Gates Quality Gates 各开发阶段的质量检查点——从预提交到部署后——包含配置示例、阈值表、绕过协议和CI/CD集成。用于设置质量自动化、配置CI流水线、建立覆盖率阈值或定义部署要求。
Runbook Skill Kit Template Factory Runbook Skill Kit Template Factory Generate a reusable runbook plus self-contained skill kit from a validated workflow. 从一个已验证流程批量生成可复用的 runbook 与自包含 skill 套件。