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).
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.
Quick scoring:
text
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
Look back at what you just did. Identify:
🆕 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.
Transform the specific instance into a reusable pattern.
❌ Bad (too specific):
text
1. Read ch10-multi-agent-comm-patterns.md
2. Convert markdown to docx using python-docx
3. Upload to <internal-folder-token>
✅ Good (generalized):
text
1. Read source markdown file(s)
2. Convert to docx (see references/docx-patterns.md)
3. Upload to target output destination
Standard format:
markdown
---
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:
🆕 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.
Before saving, verify:
Layer A — Format
Layer B — Grounding
Layer C — IP Boundary 🆕
/home/<user>/...)Layer D — Discoverability
ls ~/.openclaw/skills/ | grep -i <keyword>)Save to ~/.openclaw/skills/<slug>/SKILL.md (or workspace skills dir).
Reference materials → ~/.openclaw/skills/<slug>/references/.
Verify it loads:
bash
ls ~/.openclaw/skills/<slug>/SKILL.md
🆕 For skills destined for a public registry (e.g., ClawHub):
skills/SKILL-REGISTRY.md) — slug, version, owner, publish date🆕 Before saving, decide which class:
ClassNamingGoes toPublic?🔴 Internal<owner-prefix>-<name>Owner's private skills dirNever share🟡 Preparingno prefixWorkspace skills dirPolished but not vetted yet🟢 Sharedno prefixWorkspace skills dirReady for public registry🔵 Externaloriginal nameSkills dirInstalled 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.
When integrated with a harness skill's Compound phase (e.g., trinity-harness Layer 3), distillation can happen automatically:
🆕 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.
Before creating new, check related ones:
bash
ls ~/.openclaw/skills/ ~/.openclaw/workspace/skills/ 2>/dev/null | grep -i <keyword>
Similar exists → update it (add as variant), don't create near-duplicate.
🆕 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.
Don'tWhyDo InsteadDistill every taskSkill bloat, noise drowns signalApply the 4-question gateInclude conversation historyWastes tokens, not reusableExtract only the workflow patternWrite vague gotchas"Be careful" helps no oneSpecific: "API X returns 429 after 3 concurrent requests"Hardcode user-specific paths/namesNot portable, leaks identityUse <parameter> placeholdersSkip quality checkGarbage skills waste future contextAlways verify all 4 layers🆕 Sycophancy of CompletenessSkill looks polished but inventedRequire ≥10 real samples before publishing🆕 Auto-publish without IP grepReal production leak riskAlways grep private identifiers before pushing to public registry🆕 Trust "I already published this" memoryCross-session memory is lossyMaintain a SSOT file with slug + version + date
OutputGoes toWhenReusable workflow (4/4 gate passes)Skills dir / SKILL.mdNovel + Successful + Reusable + GroundedLesson learnedmemory/lessons-learned.mdSuccessful but one-off, or failedQuick notememory/YYYY-MM-DD.mdRoutine observationsCore insight (changes how you work)Persistent memory fileFundamental principle changeSkill in progressSkills dir, marked "experimental"Novel + Successful + Reusable but <10 samples
Before pushing to ClawHub or similar:
ignore previous, system:, admin:, etc.)text
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.