---
title: "skill-distill turns Claude Code or Codex sessions into open-weight skills"
id: "story-114"
canonical_url: "https://emergent.fm/stories/114"
markdown_url: "https://emergent.fm/stories/114/article.md"
published_at: "2026-11-23T03:48:15.624Z"
modified_at: "2026-11-23T04:47:24.858Z"
source_at: "2026-11-21T01:43:00.000Z"
topic: "agent_skills"
trust_label: "Reported"
publisher: "Emergent.FM"
---

# skill-distill turns Claude Code or Codex sessions into open-weight skills

> The teacher shows both results side by side, and a skill is done only when you accept it.

## Key points

- skill-distill is an MIT-licensed operator skill for Claude Code or Codex that turns a completed agent session into a reusable skill for an open-weight student model, according to the repository README.
- The teacher tests each skill version across three tmux trials on a fresh copy of the starting state and marks the skill done only when the user accepts the side-by-side results, the README reports.
- Running the workflow requires tmux, git, Python 3.10 or newer, and a configured student harness, while the pi and opencode adapters remain untested, according to the README.

Published on 21 November 2026 under the MIT license, sybil-solutions/skill-distill pairs a frontier coding agent as a teacher with an open-weight model in a student harness, according to the repository README. At the end of a successful Claude Code or Codex session, a builder invokes the operator skill and names a target harness and model, such as omp with DeepSeek-V4.1-Flash. The repository delivers both the reusable operator skill and a produced skill for one task, one model, and one harness.

## Smoke tests and reference checks run before trials

The teacher begins by gathering the reference session log, the verbatim first user prompt, the starting git commit, and the reference working directory, according to SKILL.md. Before initializing a run with distill.py init, it runs a one-minute smoke test on the student adapter to catch wrong model IDs, missing keys, or offline servers. It then writes observable criteria in acceptance.md and a verification script in checks.sh, which must pass on the reference output before any student trial is judged.

## Iteration loops stop at three matches or eight rounds

Each iteration launches three trials in tmux, a terminal multiplexer for running persistent background sessions, on a clean starting state with a frozen copy of the student skill, SKILL.md states. The skill must stay under about 250 lines and cannot contain the reference's finished output, though short snippets up to about 40 lines are allowed. After inspecting traces, logs, and full-resolution screenshots for the first divergence, the teacher updates the skill and stops when all three trials match, after eight iterations, or after three iterations with no score gain.

## User approval gates final delivery and privacy checks

When the loop ends, the teacher generates report.html via distill.py report and directs the builder to the best trial's workspace to inspect it directly, according to SKILL.md. Recording a rejection with distill.py accept adds the user's feedback to acceptance.md and restarts the fix loop, while approval copies the final skill into runs/<task>/final/<name>/. Before delivery, the teacher checks that no secrets, private hostnames, or personal data leaked from the reference, and raw session logs remain inside the git-ignored runs/ directory.

## Two student harness adapters remain untested

Running skill-distill requires tmux, git, Python 3.10 or newer, and a student harness, plus Playwright and Chromium for web captures, according to the repository README. Among the bundled adapters, omp is tested, Codex CLI is tested as a teacher and needs a provider in STUDENT_ARGS as a student, and Claude Code supports open models via ANTHROPIC_BASE_URL. The pi and opencode adapters are written but untested, and opencode JSON logs do not yet have a parser in extract_session.py, the README states.

## Try it

1. Clone the repository with `git clone https://github.com/sybil-solutions/skill-distill` and symlink it into `~/.claude/skills/skill-distill` for Claude Code or `~/.agents/skills/skill-distill` for Codex.
2. Install browser capture dependencies for web tasks by running `pip install playwright pillow && playwright install chromium`.
3. Invoke the teacher at the end of a good session with a prompt such as `distill this session into a skill for omp with deepseek-v4.1-flash on my local server`.
4. Attach to the live tmux session to watch student trials run with `tmux attach -t distill-<task>`.

## Sources

- [Latest commit](<https://github.com/sybil-solutions/skill-distill>) (github.com/sybil-solutions, release)
- [SKILL.md](<https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/SKILL.md>) (github.com/sybil-solutions, documentation)

Canonical page: <https://emergent.fm/stories/114>
