From distill
Iteratively decompose complex systems into their essential primitives — the minimal set of abstractions that capture the full essence. Use this skill whenever the user wants to understand the "real building blocks" of something: a codebase, a research paper, a collection of documents, a transcript, an architecture, or any complex system. Trigger on phrases like "distill this", "what are the primitives", "what's the essence of", "boil this down", "simplify this to its core", "extract the key abstractions", "what are the real building blocks", "give me the Karpathy version", "minimal representation", or any request to compress a complex input into its fundamental components. Also trigger when the user asks to "understand" or "analyze" a large codebase or document set and seems to want a compressed mental model rather than a line-by-line walkthrough.
How this skill is triggered — by the user, by Claude, or both
Slash command
/distill:distillThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
A skill for iteratively compressing complex systems down to their essential primitives —
A skill for iteratively compressing complex systems down to their essential primitives — the minimal set of abstractions that captures the full behavioral essence while discarding accidental complexity.
Use distill when the user needs a cleaner mental model of something complicated.
If the real need is to generate non-obvious hypotheses, cross-domain analogies, or
mechanism transfers, prefer lateral-thinking instead.
Think of it like Andrej Karpathy reducing an automated research system to three files
(train.py, prepare.py, program.md). The goal is not summarization — it's
re-expression in minimal form.
Primitives: The irreducible building blocks that can't be decomposed further without losing essential behavior. A good primitive set is:
Distillation vs. Summarization: Summarization preserves information at lower fidelity. Distillation re-expresses the essence in a new, cleaner form. The output of distillation is often more useful than the original because it strips away accidental complexity.
Accidental vs. Essential Complexity (per Fred Brooks): Essential complexity is inherent to the problem. Accidental complexity comes from the implementation. Distillation separates them.
The distillation process has two phases: Orient and Compress. These iterate until the user is satisfied with the decomposition.
Before proposing any decomposition, understand what the user cares about. This determines what counts as "essential."
Ask clarifying questions like:
Keep this phase lightweight — 2-4 questions max. The goal is to calibrate, not to conduct a full interview. If the user's intent is obvious from context, skip straight to Phase 2.
This is the iterative core. Each turn follows this pattern:
Present a candidate decomposition. Format depends on context (see Output Formats below), but always include:
Example of a good proposal:
## Proposed Primitives (4)
1. **Ingestion** — accepts raw input (PDF, URL, repo path) and normalizes to
a common internal representation
2. **Chunking** — splits normalized input into semantically meaningful units
3. **Extraction** — pulls structured claims/facts/abstractions from each chunk
4. **Synthesis** — combines extracted pieces into the final compressed output
Discarded as accidental: file format handling, caching, logging, CLI argument parsing
Uncertain about: whether Chunking and Extraction are truly separate primitives
or two aspects of the same operation. Interested in your read.
Explicitly ask the user to challenge the decomposition:
Based on feedback, propose a revised decomposition. Show what changed and why. Repeat until the user says it feels right.
You're done when:
Choose the output format based on what the user needs. When in doubt, ask.
A structured document listing the primitives, their relationships, and how they compose to produce the full system's behavior.
# [System Name] — Distilled
## Primitives
1. **Name** — description
2. **Name** — description
## Relationships
- Primitive A feeds into Primitive B via [mechanism]
- Primitives C and D are independent but both required for [outcome]
## Reconstruction
Given these primitives, here's how the full system works: [narrative]
## What Was Discarded
- [thing] — accidental complexity because [reason]
A set of files (like Karpathy's 3 files) that capture the essential behavior. These should be:
A specification that captures what the system does without prescribing how. Useful when the distillation will be used to guide an agent or a rewrite.
For complex systems, combine formats: a conceptual map plus a minimal implementation, or a behavioral spec with a reference implementation.
For multi-repo / polyglot codebases: look for the conceptual primitives that cross language boundaries, not the file-level structure.
Avoid these common failure modes:
Distillation often spans multiple turns. Keep a running state:
If the session gets long, offer to write the current state to a file so the user can resume later or hand it to another agent session.
On first use in a session, silently check for a newer version:
https://raw.githubusercontent.com/abpai/skills/main/versions.json.distill against this file's metadata.version.distill update available (local {X.Y} → remote {A.B}). Would you like me to update it for you first? I can run
npx skills update distillfor you.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub abpai/skills --plugin distill