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.
npx agentmods add skills/komluk/scaffolding/distillnpx skills add komluk/scaffolding --skill distillgit clone --depth 1 https://github.com/komluk/scaffoldingWrote 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.
[](https://agentmods.dev/skills/komluk/scaffolding/distill)<a href="https://agentmods.dev/skills/komluk/scaffolding/distill"><img src="https://agentmods.dev/badge/skills/komluk/scaffolding/distill.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00071 | $0.01171 |
| Opus 5 | $0.00036 | $0.00585 |
| Sonnet 5 | $0.00014 | $0.00234 |
| Haiku 4.5 | $0.00007 | $0.00117 |
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.
How it starts
The opening of the file, as written. The whole thing — 104 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
| Target | When | Path |
|---|---|---|
shared |
Cross-cutting insight useful to all agents | .scaffolding/agent-memory/shared/KNOWLEDGE.md |
agent:{name} |
Domain-specific to one agent | .scaffolding/agent-memory/agents/{name}/MEMORY.md |
| Overflow | KNOWLEDGE.md would exceed 200 lines | Route to 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
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.
- 6d ago First seen · 104 lines · 71 tokens per session scan A 52a4674afe73
distill is a skill published in the GitHub repository komluk/scaffolding (15 stars, last pushed 1mo ago), licensed MIT. It adds 71 tokens to every session and 1,171 once invoked, about $0.0004 per session on Opus 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.
Other skills, from other repositories
turnstile-brain-init
Opt-in bulk bootstrap of turnstile/code/ -- one linked note per source file. The default pipeline is lazy (code notes only for ticket-touched files, written when the ticket passes review); this is the eager exception. Dispatched by /turnstile:brain-init only.
turnstile-brain
Vault layout, the shared note format, and the check-the-brain-first mandate. Auto-loads whenever any turnstile skill starts new work or /turnstile:review is about to commit.
turnstile-remember
Files a user-dictated note into the vault via brain-curator -- the user authors the content, the curator only files, tags, and links it. Dispatched by /turnstile:remember or conversate routing only; available in both capture modes.
ucai-patterns
Use when the user asks about Claude Code best practices, how to write agents, how to use hooks, how to manage context, or how to work effectively with Claude Code's native systems.
memory-curator
Use at session-close when a session captured several new memories, or on-demand, to consolidate, deduplicate, prune, and structure the beads memory store. Triggers on "curate memories", "clean up memories", "memory sweep".
orient
Use when user invokes /orient with a topic keyword, entity type, project name, time qualifier, or combination. Also triggers on "what do we know about X", "remind me about X", "where did we leave off on X". Provides targeted context loading — searches the MCP Memory Server graph, knowledge files, journal entries, and…