
DistiLL: Mine Your Claude Code History for Reusable Skills
Overview
If you use Claude Code every day, you repeat yourself: the same background re-explained across sessions, the same multi-step procedure requested again and again, the same failures happening the same way. DistiLL mines that history and turns the repetition into reusable artifacts — repeated context becomes a draft SKILL.md, a repeated workflow becomes a draft slash command, and a repeated failure becomes a findings note. Everything lands in ./output/ for review; DistiLL never installs anything.
Tech Stack
Challenges
- Finding genuine repetition across hundreds of conversations without drowning in noise like greetings and pasted logs.
- Doing pattern discovery without shipping private transcripts to an API.
- Keeping re-runs cheap as history grows.
- Turning a fuzzy cluster of similar messages into a clean, usable draft artifact.
Solution
Messages are filtered by length (dropping "yes"-sized noise and pasted files), embedded, and clustered; each cluster is classified — repeated context, workflow, or failure — and the largest clusters are drafted first, up to a configurable per-run cap. Privacy is structural: --dry-run and --local-only never make a network call, and a full run sends only a handful of short cluster representatives plus aggregate stats. Re-runs are incremental — embeddings are cached per text hash, so only new messages get embedded — and the report shows every cluster, its classification, confidence, and a cost estimate before anything is drafted.
Outcome
distill scan ingests transcripts and prints stats; distill run --dry-run embeds, clusters and writes output/report.md with zero API calls; distill run drafts the artifacts. Output is human-in-the-loop by design — SKILL.md and command drafts land in ./output/ and you move the ones you approve into ~/.claude/skills/ yourself. Tests run fully offline with an injectable embedding model and a mocked Anthropic client.
What I'd do differently
The discipline was making privacy a property of the architecture rather than a promise: local-only and dry-run paths that literally cannot reach the network. The MVP deliberately mines only human-typed messages; mining assistant messages and tool_use sequences for workflow patterns is noted as v2, not smuggled in.