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
- ShulkwiSEC/bb-hugetheir own version, first seen Jun 4, 2026
- amajorai/skillstheir own version, first seen May 29, 2026
- m381532187-netizen/ClaudeSkillstheir own version, first seen Mar 31, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- ShulkwiSEC/bb-huge★ 22same name
- amajorai/skills★ 3same name
- 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.
- AGENTS.mdAGENTS.md
- skill-auditSkill
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
- Distinctive: line 26
Never dump memory verbatim.
- Distinctive: line 27
Keep: repeated procedures, stable file/command facts, multi-hit gotchas, lasting decisions.
- Distinctive: line 40
No hits → stop; say what you looked for.
- Distinctive: line 44
Search deploy, build, core domain, recurring bugs.
- Very specific: line 61
Placement hard-fail before NEW: prefer code/config/tests/docs.
- Distinctive: line 67
No interactive UI → take defaults and say so.
- Distinctive: line 79
Read files, run relevant commands, check configs.
- Very specific: line 84
Use .claude/skills/ only if that is already the repo convention.
- Distinctive: line 124
Commit only if the user asked.
“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.
Files
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.
| Label | Meaning |
| NEW | Create |
| UPDATE | Compact rewrite (never append) |
| SKIP | Nothing new |
| PRUNE | Subject 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.
| Label | Action |
| NEW | Fresh file from assets/skill-template.md |
| UPDATE | Full compact rewrite — no "Recent updates" sections |
| PRUNE | Propose delete at review gate; no silent rm |
| SKIP | Leave 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).
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
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.

