Turn successful AI agent sessions into reusable agent skills. Distill Claude Code transcripts into SKILL.md playbooks with evals-ready drafts.
Project description
skilldistill
Your agents solve the same problems every week — and remember nothing.
Agent skills (SKILL.md playbooks) are how you teach agents procedures — but
everyone writes them by hand, from memory, after the fact. Meanwhile your
~/.claude/projects/ folder is full of transcripts where the agent already
figured it out: the exact commands, the wrong turns, the fix that finally
worked. Research shows distilling skills from execution traces works
(Trace2Skill,
MUSE-Autoskill) — skilldistill makes it
a pip install instead of a paper.
pip install skilldistill
How it works
transcripts ──▶ scan ──▶ rank by success signals ──▶ distill ──▶ SKILL.md draft
│
dedup vs skills you already have
1. Scan your Claude Code sessions and rank the ones worth keeping:
$ skilldistill scan ~/.claude/projects
[0.90] ~/.claude/projects/my-api/7f3a...jsonl
goal: Fix the flaky retry logic in the payment client
why: substantial workflow (14 tool calls); low tool error ratio (7%);
success signals in transcript (tests passed / PASS verdict); clean final summary
[0.70] ~/.claude/projects/my-api/22c1...jsonl
goal: Add rate limiting to the public endpoints
why: substantial workflow (9 tool calls); clean final summary
Every score comes with reasons — no black-box filtering.
2. Distill a session into a reusable skill draft:
$ export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY; optional
$ pip install "skilldistill[anthropic]"
$ skilldistill distill ~/.claude/projects/my-api/7f3a...jsonl --skills-dir .claude/skills
wrote .claude/skills/fix-flaky-retry-logic/SKILL.md (origin: llm)
review the draft before installing it — treat generated skills like third-party code
The LLM generalizes the transcript into a procedure: trigger-focused description, numbered steps with the key commands, and a Pitfalls section mined from the mistakes the agent made and corrected mid-session.
No API key? Still works. --offline (or no key configured) emits an
honest outline draft from the recorded tool sequence, clearly marked for
manual polish.
3. Dedup. Before writing, skilldistill compares the draft against your existing skills directory and warns on overlap:
warning: similar existing skill: retry-patterns (78%)
CLI reference
skilldistill scan [ROOT] [--min-score 0.5] [--limit 20] [--json]
skilldistill distill SESSION.jsonl [--skills-dir skills] [--offline] [--force]
scan defaults to ~/.claude/projects. --json emits machine-readable
rankings for pipelines.
Python API
from skilldistill import parse_session, score_session, distill, write_skill
session = parse_session("session.jsonl")
if score_session(session).score >= 0.5:
draft = distill(session, llm=my_llm_fn) # llm: Callable[[str], str], or None
write_skill(draft, "skills/")
Bring any LLM: llm is just a Callable[[str], str]. Built-in resolvers use
the anthropic or openai SDKs when installed
(SKILLDISTILL_ANTHROPIC_MODEL / SKILLDISTILL_OPENAI_MODEL to override models).
The flywheel
Pair with dunnit: dunnit verdicts in a transcript ("verdict: PASS") are a strong success signal, so verified sessions rank highest — you distill skills only from work that was proven done, not just claimed done.
Security note
Generated skills are instructions your agents will follow. Review drafts like you'd review third-party code, and consider scanning them (e.g. Snyk Agent Scan or mcp-scan) before installing — skill supply-chain attacks are real and studied.
Roadmap
Cursor/Codex transcript parsers · per-skill eval stubs · cross-session
clustering (one skill from N similar sessions) · skilldistill watch daemon ·
skill update mode (refresh an existing skill from newer sessions).
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skilldistill-0.1.0.tar.gz.
File metadata
- Download URL: skilldistill-0.1.0.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36ac5bc5f5f39664f5363c6151b08e62c98b958ffc2676bad2d85942ec6dbc50
|
|
| MD5 |
3908c88c7750fb88e6944a7979ac19fa
|
|
| BLAKE2b-256 |
2a00e9ae38364c8ffaf313db81ae5405ac7d1d56d9b1df6c297191e940318be7
|
Provenance
The following attestation bundles were made for skilldistill-0.1.0.tar.gz:
Publisher:
publish.yml on palasht75/skilldistill
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skilldistill-0.1.0.tar.gz -
Subject digest:
36ac5bc5f5f39664f5363c6151b08e62c98b958ffc2676bad2d85942ec6dbc50 - Sigstore transparency entry: 2267037976
- Sigstore integration time:
-
Permalink:
palasht75/skilldistill@0579bedeaf10a3d14e68367bcbddac12ddb1912d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/palasht75
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0579bedeaf10a3d14e68367bcbddac12ddb1912d -
Trigger Event:
release
-
Statement type:
File details
Details for the file skilldistill-0.1.0-py3-none-any.whl.
File metadata
- Download URL: skilldistill-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ba6b2be87188f3c28368b3aa9f5bc23344a929d21dd3406ad48644bff6c31eb
|
|
| MD5 |
26305b4197ce97c9dee27175d235df46
|
|
| BLAKE2b-256 |
b2b9a30c91d09a26172beaef75d0aaaf045531e12e61cf6a1a662bbb16972a4e
|
Provenance
The following attestation bundles were made for skilldistill-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on palasht75/skilldistill
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skilldistill-0.1.0-py3-none-any.whl -
Subject digest:
3ba6b2be87188f3c28368b3aa9f5bc23344a929d21dd3406ad48644bff6c31eb - Sigstore transparency entry: 2267038446
- Sigstore integration time:
-
Permalink:
palasht75/skilldistill@0579bedeaf10a3d14e68367bcbddac12ddb1912d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/palasht75
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0579bedeaf10a3d14e68367bcbddac12ddb1912d -
Trigger Event:
release
-
Statement type: