talira

skill-distill

Distill a good Claude Code / Codex session into a skill an open-weight model can follow to reproduce the task

open sourceMITself-hostablefree

skill-distill is an agent skill that turns a finished Codex or Claude Code session into instructions a cheaper open-weight model can follow to do the same task. The frontier agent acts as teacher: it reads the session, writes a skill for a named student (a harness plus a model), runs the student in tmux on a fresh copy of the starting state with the original prompt, compares its output with the reference, and fixes the skill at the first point the student went wrong, three trials per version, until the student matches. The skill teaches steps, decisions and checks rather than embedding the finished output, and a person accepts the result after seeing the reference and the student's best runs side by side. Adapters cover omp, pi, Codex, Claude Code and OpenCode, though only omp is marked tested as a student.

Problems it solves

  • a frontier model did a task well and I want a cheap open-weight model to repeat it
  • turn a successful Claude Code session into a reusable skill another model can follow
  • my local model fails at a task Claude handles, and I want to find where its instructions fall short
  • check whether DeepSeek or another open model can reproduce a coding task given the right instructions
  • iterate on a skill file automatically until a weaker model's output matches the reference
  • cut the cost of a repeated agent task by moving it from a frontier model to an open-weight one
  • compare a student model's web app output with the original by screenshots in headless Chromium

Features

  • teacher loop that writes and repairs a skill for a named student harness and model
  • students run in tmux on a clean copy of the starting state, watchable with tmux attach
  • three trials per skill version
  • session log extraction for Claude Code, Codex and omp
  • web app capture with headless Chromium screenshots
  • adapters for omp, pi, Codex, Claude Code and opencode
  • run bookkeeping CLI (distill.py) with trials, evidence, verdicts and a ledger
  • worked examples with prompts, produced skills and screenshots

Limitations

  • Only omp is tested as a student harness: the pi and opencode adapters are untested, and Claude Code needs an Anthropic-compatible server for open models1
  • Can't read opencode session logs yet1