distill

distill is a skill for Claude Code from komluk/scaffolding. It costs 75 tokens per session (1,367 once invoked), scanned A, original, MIT.

A method for extracting useful, reusable knowledge from conversations and routing it to shared, agent-specific, or conversation-specific memory. It uses evidence such as repeated patterns, architectural decisions, recurring bugs, and outdated file references.

In plain words
What is it for?
Use it when running knowledge-learning or distillation workflows, deciding whether an insight belongs in memory, or checking stored knowledge for duplicates and stale references. It covers candidate extraction, confidence scoring, and memory-tier selection.
Why use it?
It helps distinguish information worth saving from one-off details, reducing clutter in an agent's memory. Confidence scoring helps decide how broadly an insight should be shared.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the scaffolding plugin — 39 skills, 9 commands, 13 agents shipped together

Good fit Use it when running knowledge-learning or distillation workflows, deciding whether an insight belongs in memory, or checking stored knowledge for duplicates and stale references. It covers candidate extraction, confidence scoring, and memory-tier selection.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/komluk/scaffolding/distill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add komluk/scaffolding --skill distill
Clone the repo
git clone --depth 1 https://github.com/komluk/scaffolding

Made for: Claude Code.

Or install scaffolding, the plugin that ships this one along with the rest of its 39 skills, 9 commands, 13 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for distill

README.md
[![agentmods](https://agentmods.dev/badge/skills/komluk/scaffolding/distill/github.svg)](https://agentmods.dev/skills/komluk/scaffolding/distill)
Your own site
<a href="https://agentmods.dev/skills/komluk/scaffolding/distill"><img src="https://agentmods.dev/badge/skills/komluk/scaffolding/distill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for distill

Your own site · 80×15
<a href="https://agentmods.dev/skills/komluk/scaffolding/distill"><img src="https://agentmods.dev/badge/skills/komluk/scaffolding/distill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,367 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00075 $0.01367
Opus 5.5 $0.00030 $0.00547
Sonnet 5.5 $0.00015 $0.00273
Haiku 4.5 $0.00007 $0.00137

Measured 6d ago against content hash 67aeeed15bff, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

distill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/distill/SKILL.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 tags

Read the full file on GitHub · 110 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago Changed · +8 lines 67aeeed15bff
  2. 7d ago Changed · -2 lines · +4 tokens per session 272f413e97a0
  3. 8d ago Changed ff81131f1656
  4. 1mo ago First seen · 104 lines · 71 tokens per session scan A 52a4674afe73

Subscribe to this mod's changes

distill is a skill published in the GitHub repository komluk/scaffolding (15 stars, last pushed yesterday), licensed MIT. It adds 75 tokens to every session and 1,367 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

save

Save durable decisions, findings, plans, and implementation knowledge from the visible Codex conversation into a new or existing NeatContext context. Use only when the user explicitly invokes this skill or asks to preserve the current conversation as reusable context.

XTSoftwareLabs/neatcontext-plugins · 49 tokens

import

Import a self-contained NeatContext context bundle shared by another person, or reconcile a newer copy of a context already on this machine, leaving the source bundle unchanged. Use only when the user explicitly invokes this skill or asks to import a NeatContext bundle.

XTSoftwareLabs/neatcontext-plugins · 54 tokens

create

Create a fresh NeatContext context from a user-defined behavioral profile and an existing local knowledge folder. Use only when the user explicitly invokes this skill or asks to create a new context rather than save the current conversation.

XTSoftwareLabs/neatcontext-plugins · 45 tokens

export

Export a NeatContext context saved from a conversation into a self-contained bundle folder that can be shared or moved to another machine. Use only when the user explicitly invokes this skill or asks to export a NeatContext context.

XTSoftwareLabs/neatcontext-plugins · 47 tokens

use

Connect or switch Codex to a local NeatContext Context by name or list number. Use only when the user explicitly invokes this skill, names a context to connect, or agrees to a routing suggestion.

XTSoftwareLabs/neatcontext-plugins · 43 tokens

delete

Preview and permanently delete a NeatContext context while preserving any externally linked knowledge folder. Use only when the user explicitly invokes this skill or clearly asks to delete a context.

XTSoftwareLabs/neatcontext-plugins · 36 tokens