agentleFS
alexio777alexio777/learn-on-the-job/skills/distill-skill/SKILL.md

distill-skill

Skill0 starsChanged 4 months agoMITView on GitHub

Use when the user wants to crystallize project memory into auto-loading repo skills, run a learn-on-the-job distill pass, turn repeated session patterns into SKILL.md files, or pair with skill-audit to keep those skills from rotting.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. ShulkwiSEC/bb-huge★ 22same name
    2. amajorai/skills★ 3same name
    3. m381532187-netizen/ClaudeSkills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never dump memory verbatim.

    line 26
  2. Distinctive:

    Keep: repeated procedures, stable file/command facts, multi-hit gotchas, lasting decisions.

    line 27
  3. Distinctive:

    No hits → stop; say what you looked for.

    line 40
  4. Distinctive:

    Search deploy, build, core domain, recurring bugs.

    line 44
  5. Very specific:

    Placement hard-fail before NEW: prefer code/config/tests/docs.

    line 61
  6. Distinctive:

    No interactive UI → take defaults and say so.

    line 67
  7. Distinctive:

    Read files, run relevant commands, check configs.

    line 79
  8. Very specific:

    Use .claude/skills/ only if that is already the repo convention.

    line 84
  9. Distinctive:

    Commit only if the user asked.

    line 124

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Distill Skill

Turn project memory into curated, auto-loading repo skills. Durable patterns and non-obvious gotchas become a SKILL.md the agent loads on matching future tasks.

Topic = skill name or free text from the user. Empty topic = batch (every dense cluster). Named topic = single skill.

Hard principle

Memory is raw. Skills are curated.

  • Never dump memory verbatim.
  • Keep: repeated procedures, stable file/command facts, multi-hit gotchas, lasting decisions.
  • Drop: fixed one-offs, dead ends, timestamps, PR numbers, superseded claims.
  • Verify every load-bearing claim against live files. Unverified → hedge, not assertion.

Procedure

1. Memory surface (fail closed)

Detect first available backend and scope to this repo. Details: references/memory-backends.md.

Order: mem0 (or similar) → claude-mem / local store → notes/transcripts the user provides.

No hits → stop; say what you looked for. Never invent memories.

2. Cluster → candidates

Search deploy, build, core domain, recurring bugs. Good target = multiple memories across sessions about a repeatable procedure with non-obvious traps.

Each candidate: kebab-case name, one-line scope, rough count.

2a. Dedup and label

Inventory project skills (.agents/skills/*/SKILL.md, .claude/skills/*/SKILL.md). User-global skill dirs are read-only.

LabelMeaning
NEWCreate
UPDATECompact rewrite (never append)
SKIPNothing new
PRUNESubject gone → propose delete

Placement hard-fail before NEW: prefer code/config/tests/docs. Only skill what cannot live there cleanly. See references/skill-shape.md.

2b. Selection

Present labelled candidates. Batch defaults to all non-SKIP; single maps the named topic. No interactive UI → take defaults and say so. Only selected continue.

3. Pull, anti-stale, tag

Pull cluster memories. Also search stale|superseded|deprecated|renamed|removed.

Tag: durable · gotcha · superseded (newer wins) · transient (drop) · needs-verification.

Filter meta-observations ("distilled skill X", PR chatter) — not domain evidence.

4. Verify live

Read files, run relevant commands, check configs. Correct drift. Hedge the rest.

5. Write

One project tree, consistently. Prefer .agents/skills/<name>/SKILL.md (cross-agent). Use .claude/skills/ only if that is already the repo convention. No dual-write.

LabelAction
NEWFresh file from assets/skill-template.md
UPDATEFull compact rewrite — no "Recent updates" sections
PRUNEPropose delete at review gate; no silent rm
SKIPLeave untouched

Shape and line budget: references/skill-shape.md.

5b. Ledger

Sidecar next to the skill tree (never under skills/):

.agents/distill-skill-ledger.json or .claude/distill-skill-ledger.json

Schema: references/ledger-schema.md.

Set source_of_truth, last_verified_git (git rev-parse --short HEAD), source_memory_ids. Drop entries for PRUNEd skills. Keep minimal.

5c. Keep-iff-improves gate

Map skills → whole-file live drift-check. Discipline skills → optional RED/GREEN when the host can run a fresh subagent pass.

Protocol: references/behavioral-gate.md.

Gate fails → do not write; keep last-good; report needs manual revision.

6. Quality gate, report, no silent commit

Per touched skill: frontmatter valid · name == dir · trigger crisp · claims verified · line budget · ledger updated · gate passed (or needs-manual-revision).

Deliver path + label, facts kept (memory → live-file), noise dropped, hedges, gate outcome. Batch: summary skill · label · #kept · #dropped. If >5 skills or a huge diff → plan first; write one skill at a time.

Commit only if the user asked.

Pair with skill-audit

Distill learns. skill-audit forgets what is no longer true (KEEP / REFRESH / MERGE / PRUNE).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.