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. Triggers on: 'distill this', 'save as skill', 'make this reusable', or automatically at the end of complex tasks when compound learning is enabled. Evaluates task novelty, success, and reuse potential before generating a standard SKILL.md. Prevents skill bloat through quality gates.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "skill-distiller" with this command: npx skills add christianye/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:

  1. 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)
  2. Successful? — Did the task complete with verified results? (Failed tasks produce lessons, not skills — write to memory/lessons-learned.md instead)
  3. 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 <input_file>, <output_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: <slug>
description: "<when to use this skill — be specific about triggers>"
---

# <Skill Name>

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

## Workflow
<Numbered steps — the core of the skill>

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

## Gotchas
<Things that can go wrong and how to handle them>

## References
<Links 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/<slug>/SKILL.md.

If the skill has reference materials, save them to ~/.openclaw/skills/<slug>/references/.

After saving, verify the skill loads:

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

Automatic Distillation Mode

When integrated with trinity-harness's Layer 3 (Compound), distillation happens automatically:

  1. Task completes → Layer 3 Compound phase triggers
  2. Evaluate Novel + Successful + Reusable
  3. If all YES → run distillation process
  4. If NO → write lesson to memory instead
  5. Announce to user: "Distilled skill: <name>. Review with read ~/.openclaw/skills/<slug>/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 <keyword>

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'tWhyDo Instead
Distill every taskSkill bloat, noise drowns signalApply the 3-question gate
Include conversation historyWastes tokens, not reusableExtract only the workflow pattern
Write vague gotchas"Be careful" helps no oneSpecific: "API X returns 429 after 3 concurrent requests"
Hardcode paths/namesNot portableUse <parameter> placeholders
Skip quality checkGarbage skills waste future contextAlways verify before saving

Integration with Memory System

Distillation complements, not replaces, the memory system:

OutputGoes toWhen
Reusable workflow~/.openclaw/skills/<slug>/SKILL.mdNovel + Successful + Reusable
Lesson learnedmemory/lessons-learned.mdSuccessful but one-off, or failed
Quick notememory/YYYY-MM-DD.mdRoutine observations
Core insightMEMORY.mdFundamental principle change

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

智能记忆触发系统

Intelligent system that automatically determines when to create workflow documentation based on task complexity, repetition patterns, and user intent. Transf...

Registry SourceRecently Updated
2110Profile unavailable
Automation

Gougoubi Submit Real Results

Submit real-world outcomes for Gougoubi conditions using deterministic evidence from condition skills and public market data. Use when users want resolved-on...

Registry SourceRecently Updated
2250Profile unavailable
Automation

Task Automation Workflows

Automate repetitive tasks with scripts, workflows, and schedules. Create efficient automation for file operations, data processing, API calls, and scheduled...

Registry SourceRecently Updated
4710Profile unavailable
Automation

Gougoubi Create Prediction

Create public Gougoubi prediction proposals from minimal input with deterministic enrichment, group creation, approval handling, and transaction submission....

Registry SourceRecently Updated
3191Profile unavailable