ClaudeMap

skill-distill

A teacher skill that distills a good Claude Code or Codex session into a skill an open-weight student model can follow — running the student against the original task until it matches the reference, three trials per version

Skills & Commandsskilldistillationopen-weight-modelsteacher-studenttmux

skill-distill turns a good agent session into a transferable skill. The teacher (a skill loaded into Claude Code or Codex) reads the session log, writes a skill for a named student — a harness plus a model, e.g. omp with DeepSeek-V4.1-Flash — then starts the student in tmux on a fresh copy of the starting state with the original prompt and the skill, compares the student's output against the reference, locates the first divergence, and patches the skill there. Each skill version gets three trials; the loop runs until the student matches the reference, and the skill counts as done only when you accept the side-by-side results. Guardrails: the student gets the reference prompt verbatim with its own global context files turned off where the harness allows; the produced skill may teach steps, decisions, traps and checks but may not embed the reference output or a script that writes it; checks are validated on the reference before being run on the student. The repo ships the operator skill, per-harness student adapters (omp, pi, Codex, Claude Code, opencode), a session-log extractor, a headless-Chromium web capture script for web tasks, and finished example runs with ledgers and screenshots.

What it does

  • Teacher-student distillation loop: read session log, write a student skill, run the student in tmux on a fresh starting state, diff against the reference, patch the skill at the first divergence
  • Three trials per skill version with bookkeeping scripts (init, trial, status, wait, evidence, verdict, ledger, report, accept) — one lucky run proves nothing
  • Session-log extractor for Claude Code, Codex and omp logs that drops system and AGENTS.md text; per-harness student adapters for omp, pi, Codex, Claude Code and opencode
  • capture_web.py serves a web app, drives it in headless Chromium and saves screenshots and errors, so web-task skills can be distilled and graded
  • Human acceptance gate: the teacher shows reference and student results side by side and the skill counts as done only when you accept it

When to use it

Right tool when a frontier-model session did a task well and you want the same task repeatable on a cheaper open-weight model you already run — one task, one model, one harness at a time.

Getting started

git clone https://github.com/sybil-solutions/skill-distill
ln -s "$PWD/skill-distill/skills/skill-distill" ~/.claude/skills/skill-distill    # Claude Code
ln -s "$PWD/skill-distill/skills/skill-distill" ~/.agents/skills/skill-distill    # Codex

Requirements: tmux, git, Python 3.10+, and the student harness installed and pointed at its model.
For web results, pip install playwright pillow && playwright install chromium.

Things to know

Adapter maturity is uneven: omp is tested; Codex is tested as the teacher but as a student needs a provider set in STUDENT_ARGS; Claude Code's student adapter is written but untested; open models need ANTHROPIC_BASE_URL pointed at an Anthropic-compatible server; pi is written but untested; opencode is written, untested, and its JSON log has no parser in extract_session.py yet. The produced skill is scoped to one task, one model and one harness — it is not a general-purpose skill. Raw session logs stay in the git-ignored runs/ folder because they contain your machine's paths and context. MIT. 301 stars as of writing (2026-11-22).

Repository

sybil-solutions/skill-distill

Charted

Related on the map

  • An instruction-only skill that makes agents research before they ask, plan before they build, and verify before they call anything done.

    • workflow
    • verification
    • quality
    • skill
  • Guizang's agent skill turns your repo's recent updates into a finished promo video — real components, code-rendered animation, an original code-written soundtrack — no video editor involved.

    • agent-skill
    • video
    • promo
    • marketing
  • An agent skill that geolocates a photo with nothing readable in it — OSM geometry, elevation skylines and satellite tiles turn “where was this taken?” into a measured answer with an error radius.

    • agent-skill
    • geolocation
    • osint
    • openstreetmap