distill
Skill16 starsChanged 5 days agoMITView on GitHub
Knowledge distillation: candidate extraction, confidence scoring, tier routing. Invoked by /learn and the memory-ingest Stop hook, not loaded proactively by agents. TRIGGER when: /learn or the Stop hook asks to distill, or scoring a candidate. SKIP: file memory writes (use agent-memory); vector store (use semantic-memory-mcp).
75 other projects use a version of this.
Adopted by
Most recently taken up by
- venhdev/skillstheir own version, first seen Nov 8, 2026
- kylehughes/distillation-for-agentstheir own version, first seen Nov 8, 2026
- Integralist/agent-skillstheir own version, first seen Nov 6, 2026
- theexperiencecompany/gaiatheir own version, first seen Nov 3, 2026
- JHostalek/dotclaudetheir own version, first seen Nov 1, 2026
- iwe-org/skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use layout, shape and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
owshq-mecSkilllayout
Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.
Also in 8 projects that use this
HAR5HA-7663Skillshape
Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.
Also in 11 projects that use this
ReScienceLabSkillarchive
Archive session learnings, debugging solutions, and deployment logs to .archive/yyyy-mm-dd/ as indexed markdown with searchable tags. Use when completing a significant task, resolving a tricky bug, deploying, or when the user says \"archive this\". Maintains .archive/MEMORY.md index for cross-session knowledge reuse.
Also in 3 projects that use this
klauswgSkillckm:design-system
Token architecture, component specifications, and slide generation. Three-layer tokens (primitive→semantic→component), CSS variables, spacing/typography scales, component specs, strategic slide creation. Use for design tokens, systematic design, brand-compliant presentations.
Also in 3 projects that use this
iovisorSkillevolve
Evolve uBPF through a gated spec-first workflow that propagates approved changes through requirements, design, validation, implementation, and RFC alignment artifacts.
Also in 3 projects that use this
termdockSkillrecall
Retrieves cross-session memories about past decisions, lessons, and patterns. Use when user asks about prior work, past decisions, or mentions a feature. Triggers include check memory, what did we decide, how did we solve.
Also in 5 projects that use this
Other versions75 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 75
- talesofai/cohub★ 585same name
- juxt/allium★ 506same name
- educlopez/ui-craft★ 441same name
- Michaelliv/napkin★ 428same name
- nexmoe/DayBee★ 424same name
- nexmoe/eve★ 424same name
- Southclaws/storyden★ 348same name
- 10xChengTu/Mux0★ 337same name
- theexperiencecompany/gaia★ 325same name
- AkaraChen/aghub★ 271same name
65 more not listed
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 repository39 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-commsSkill
- agent-memorySkill
- api-designSkill
- context-engineeringSkill
- database-optimizationSkill
- docker-templatesSkill
- error-handlingSkill
- frontend-designSkill
- github-actions-templateSkill
- git-operationsSkill
- logging-standardsSkill
- mcp-toolsSkill
- monitoring-observabilitySkill
- mui-stylingSkill
- necessity-firstSkill
- pattern-recognitionSkill
- planning-methodologySkill
- python-patternsSkill
- quality-validationSkill
- react-patternsSkill
- research-methodologySkill
- reverse-engineer-anythingSkill
- security-review-checklistsSkill
- semantic-memory-mcpSkill
- skill-authoringSkill
- sofa-searchSkill
- spec-designSkill
- spec-developSkill
- spec-researchSkill
- spec-reviewSkill
- spec-workflowSkill
- state-managementSkill
- systematic-debuggingSkill
- testing-strategySkill
- ui-ux-pro-maxSkill
- verification-before-completionSkill
- watch-patternsSkill
- worktree-managementSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 71 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 41
Overflow: if KNOWLEDGE.md would exceed 200 lines, route the candidate to the most relevant agent file.
- Distinctive: line 67
Apply: Create timestamped backup, then write merged content
“Common” is measured: kept by at least 6 in 10 of the 71 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 Methodology
Guidelines for automated knowledge extraction and consolidation across memory systems.
Knowledge Candidate Criteria
An insight qualifies as a knowledge candidate when it meets ANY of these:
| Criterion | Source | Example |
| Cross-conversation pattern | 3+ context.md files contain the same insight | "Redis pool exhaustion under SSE load" |
| Architectural decision | design.md contains explicit Decision/Rationale section | "Use pgvector for semantic search" |
| Recurring gotcha/bug | Keyword match in specs: gotcha, bug, pattern, lesson | "POST 301 redirect strips body" |
| Stale reference | File path in memory points to non-existent file | "app/backend/old_module.py" |
| Cross-tier duplicate | Same entry in both KNOWLEDGE.md and agent MEMORY.md | Duplicated bullet point |
Confidence Scoring
| Occurrences | Confidence | Tier Recommendation |
| 5+ conversations | 0.5 - 1.0 | shared (KNOWLEDGE.md) |
| 3-4 conversations | 0.3 - 0.5 | shared (with review) |
| 1-2 conversations | 0.1 - 0.2 | agent-specific MEMORY.md |
| Decision section | 0.7 fixed | shared |
| Pattern keyword | 0.5 fixed | shared |
| Stale reference | 0.9 fixed | cleanup action |
Auto-store threshold: candidates scoring >= 0.8 are auto-stored to the vector
store (silent, cold layer) via semantic_store — see the memory-ingest Stop
hook. This is the single source of truth for that threshold.
Tier Routing
Tier paths and what belongs in each are defined in the agent-memory skill (§ Memory Tiers) -- do not restate them here. Route shared candidates to KNOWLEDGE.md and agent:{name} candidates to that agent's MEMORY.md.
Overflow: if KNOWLEDGE.md would exceed 200 lines, route the candidate to the most relevant agent file.
Output Format
Candidates are structured as:
- content: The knowledge text (max 500 chars)
- source: File path or "conversations:N_occurrences"
- source_type: conversation | spec | memory | semantic
- confidence: 0.0-1.0
- target_tier: shared | agent:{name}
- tags: categorization tags200-Line Limit Enforcement
KNOWLEDGE.md has a hard limit of 200 lines (read in full by agents). When merging would exceed this limit:
- High-confidence candidates (>= 0.7) get priority
- Lower-confidence candidates overflow to agent-specific files
- The orchestrator routes overflow to the most relevant agent based on tags
Dry-Run vs Apply
- Dry-run (default): Report what would change, write nothing
- Apply: Create timestamped backup, then write merged content
- Restore: Revert files from any backup timestamp
Conversation-Scoped Distillation
The /learn command runs distillation against a single conversation rather
than mining all of .scaffolding/conversations/. This mode is backend-free and
self-contained — no session-log mining, no database.
Inputs for one conversation_id (a UUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). .scaffolding/conversations/ is a symlink to <share>/projects/<repo-name>/conversations; paths are unchanged:
| Input | Path | Role |
| Conversation memory | .scaffolding/conversations/{id}/agent-memory/context.md | Decisions and findings recorded during the chain |
| Design decisions | .scaffolding/conversations/{id}/specs/design.md (## Decisions section, if present) | Architectural choices + rationale |
| Action timeline | .scaffolding/conversations/{id}/timeline.md (if present) | Deterministic, metadata-only per-run record (files edited, commands, errors, repeated failures). Never contains raw tool output |
Apply the Knowledge Candidate Criteria and Confidence Scoring above against these
files only. With a single conversation, the "Cross-conversation pattern"
criterion does not apply; rely on the Decision-section and pattern-keyword
criteria. If context.md is absent, there is nothing to distill — exit cleanly.
Repeated failures (from timeline.md). A line under repeated failures (the same
tool + normalized target failed >= 2 times in a run) becomes a gotcha candidate with
a fixed confidence of 0.5. At 0.5 it is below the 0.8 auto-store threshold, so it
goes to .scaffolding/.ingest-queue / /learn for propose-then-confirm and is NEVER
auto-stored. Describe the failing command or tool and the count only; the timeline
holds no output, so do not invent a cause.
Skill Promotion Criterion
Each distilled candidate routes to one of two destinations:
| Candidate shape | Destination | Decision rule |
| Situational insight, gotcha, or one-off decision | Memory entry — shared, agent:{name}, or conversation tier per the Tier Routing rules above | The knowledge is a fact about this codebase. |
| Repeatable procedure or methodology | New skill — propose a /create-skill invocation with a pre-filled draft | The knowledge is a reusable how-to an agent would follow on future, unrelated tasks. |
Promote to a skill only when the candidate is a generalizable procedure, not a single fact. A one-off fact ("module X has a 301 redirect bug") is a memory entry; a recurring procedure ("how to safely roll a zero-downtime migration") is a skill. When in doubt, prefer a memory entry — skills carry an auto-invocation cost and should stay few and sharp.
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.

