Browser

procedural-distiller

Try it

Distill successful multi-step OpenClaw sessions into reusable learned skills before compaction. Use when a task involved many tool calls, environment setup,...

What it does

Use this skill after a task has succeeded and the session contains enough signal to preserve. The goal is to extract procedural knowledge, not to summarize the conversation.

The skill document

Procedural Distiller

Use this skill after a task has succeeded and the session contains enough signal to preserve. The goal is to extract procedural knowledge, not to summarize the conversation.

Triggering Rules

Run the distillation flow when all of the following are true:

  1. The task is finished successfully.
  2. The session contains at least 5 relevant tool calls across exec, read, write, edit, or browser.
  3. At least one of these applies:
    • The user explicitly asks to remember the workflow.
    • The task involved environment setup, debugging, or a multi-step repair.
    • Compaction risk is high and the trace contains concrete parameters worth preserving.

Do not run while the task is still active. Skip trivial sessions dominated by a single read or a one-line answer.

Distillation Workflow

  1. Read the recent trace and keep only relevant tool events.
  2. Separate successful steps from failed attempts.
  3. Preserve concrete commands, file paths, parameter values, and code snippets that materially contributed to the outcome.
  4. Convert the result into three sections:
    • Success Pattern
    • Failure Triggers
    • Snippets
  5. Write a learned skill under skills/learned/learned-/.
  6. Persist a utility score and source metadata in memory.json.

Read references/trace-format.md only if the incoming trace shape is unclear.

Execution Notes

  • Favor exact commands over abstract summaries.
  • Keep failed steps only when they teach a future agent what to avoid.
  • Collapse repetitive probes into one representative line.
  • If a write or edit step changed the final behavior, include the smallest useful snippet.
  • If a trace already contains a user rating, store it. Otherwise default to 3 and let a future caller update memory.json.

Local CLI

Run the bundled script directly:

python distill_logic.py --trace /path/to/trace.json --task "repair build cache" --output-root /path/to/skills

Useful flags:

  • --utility-score 4
  • --learned-root learned
  • --min-tool-calls 5
  • --max-events 20
  • --force

Output Contract

The generated learned skill must contain:

  • SKILL.md with valid frontmatter (name, description) and procedural sections
  • agents/openai.yaml for UI metadata
  • memory.json with utility_score, source task details, and generation metadata

Stop Conditions

Stop and do not emit a learned skill when:

  • the trace is marked unsuccessful
  • there are too few relevant tool calls
  • the trace lacks enough detail to reconstruct a reusable procedure

Related skills

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván559 installs18 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai22 installs8 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván855 installs69 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

More from xiaocaijic

Browse all skills

专业级 AI 短视频配音助手,支持多角色音色映射、自动语速调节及 BGM 建议。

by xiaocaijic19 installs

Organize project, agent, or user memory using an A-MEM-style workflow with structured notes, semantic tags, contextual summaries, explicit links, and lightwe...

by xiaocaijic21 installs

Read meeting minutes or notes from a local file path or URL, or inspect a local meeting-notes directory and report the file count plus file list. Use when th...

by xiaocaijic24 installs

Inspect, back up, search, export, and update OpenClaw long-term memory stored with MemoryOS. Use when Codex needs to manage MemoryOS memory files for an Open...

by xiaocaijic24 installs

Read meeting minutes, produce a short summary with the current conversation model, save the meeting text and summary into local memory, answer follow-up ques...

by xiaocaijic22 installs

电商 AI 语音技能。用于在 OpenClaw 或类似技能宿主中,按不同触发词独立启用两套互不干扰的能力:(1) 售后客服模式,将售后文本咨询按预设退款规则生成客服回复并输出 TTS 音频;(2) 电话推销模式,按产品名称、功能、优势和优惠范围生成推销话术并输出 TTS 音频。适用于需要模式切换、配置确认、音色选...

by xiaocaijic22 installs