agentsclimarketplace

Case 02377

Skill knownasnaffy/prompthound/dataset/case_02377

Distill successful multi-step OpenClaw sessions into reusable learned skills before compaction. Use when a task involved many tool calls, environment setup, debugging, file edits, browser research, or when the user asks to remember a workflow such as "记下这个流程" or "这招很有用".From its SKILL.md

Install
npx -y skills add knownasnaffy/prompthound --skill case_02377

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.9 KB, 578 tokens by cl100k_base, as published. Nobody here has run it

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-<task-slug>/.
  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

What ships with it: 3 files

12.0 KB alongside SKILL.md, 1 of them executable

agents/

references/

Keep looking

Skills are one crate of 326,861. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.