Skip to content
Development
Skill

/distill

When there's a failure, bug, unexpected behavior, or important finding, distills it into a verified general rule saved under .loop/memory/. Invoke right after resolving a gate (test/typecheck) failure, right after fixing a verifier-graded fail, or right after pinning down a

From plugin
loopcraft
24 skills1 agent3 hooks

Claude Code

$ npx -y skills add hiphapis/loopcraft --skill distill --agent claude-code

SKILL.md

distill.SKILL.md
name: distill
description: When there's a failure, bug, unexpected behavior, or important finding, distills it into a verified general rule saved under .loop/memory/. Invoke right after resolving a gate (test/typecheck) failure, right after fixing a verifier-graded fail, or right after pinning down a cause through debugging. Exclude failures with no lesson, e.g. a plain typo fix.
argument-hint: "[one-line summary of the failure/finding]"

Distill — distill a failure into verified knowledge

Do the 5 stages in order. Don't skip any.

1. Fail — record in the ledger

Add a row to the `.loop/memory/LEDGER.md` table: `| YYYY-MM-DD | <symptom one-liner> | fail | |`

2. Investigate — find the cause

Find the cause, not the symptom. Check the relevant code/logs/commits and form a hypothesis.

3. Verify — pin the diagnosis down as fact

Verify the hypothesis by reproduction or refutation (reproduce the failure → apply the fix → confirm it passes is best). On success, set the LEDGER stage to `verify`. If you can't verify, record the note with `verified: false` and state in the body that it's a "hypothesis".

4. Distill — abstract into a general rule

  • **Prefer updating an existing note over creating a new one.** Look for a related note in `notes/` first

(INDEX category + grep), and if there is one, update it.

  • A new note is `notes/<kebab-slug>.md`:
---
title: "<the general rule as a sentence>"
tags: [<domain tags>]
category: debugging   # debugging | pattern | environment | decision
confidence: high      # high | medium | low
verified: true        # whether it passed stage 3
created: YYYY-MM-DD
updated: YYYY-MM-DD
sources: ["commit:<sha>", "session:<date-id>"]
---
<Describe the environment-specific fact and the general rule separately.
Not "in this project it was X" but "under condition C, Y happens. This project's case: X">
Related: [[other-note-slug]]
  • Add a `[[this note slug]]` backlink to the related existing note. Broken links are allowed

(a marker for knowledge to be written later).

  • Add a line to the matching category in `INDEX.md`, and update the top stats (note count · verified ratio ·

update date).

  • The matching LEDGER row: set the stage to `distilled`, and put `[[slug]]` in the note column.

5. Consult — confirm reachability

Confirm the note you wrote is reachable from INDEX (present in the category table of contents). The next session learns this note exists via SessionStart injection.

Read more
@hiphapis
Ships withloopcraft

Loop engineering plugin for Claude Code — instead of steering the model with ever-longer prompts, design loops where it self-corrects from environment feedback and accumulates memory across sessions.

24 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
2
Star history of hiphapis/loopcraft on GitHub, a chart by star-history.com

Other skills on loopcraft.

loop-init

loop-init

Onboards loopcraft into a project — scans the repo to detect gate commands, confirms the backlog and rubrics through an…

@hiphapis@hiphapisInstall Skill
loop-run

loop-run

Traverses the backlog unattended, applying the loop-task cycle (rubric · verifier · gate · Loop-Verified commit) to each item.…

@hiphapis@hiphapisInstall Skill
loop-task

loop-task

Runs non-trivial implementation/fix work that needs a verifiable output through a rubric + independent verifier grading cycle.…

@hiphapis@hiphapisInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about distill.

Which coding agents can use distill?
distill installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.