# sybil-solutions/skill-distill architecture

> Architecture diagram of the GitHub repository sybil-solutions/skill-distill, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sybil-solutions/skill-distill
- Repository: https://github.com/sybil-solutions/skill-distill

## Overview

skill-distill is a teacher-guided workflow for turning a successful agent session into a reusable student skill, then iteratively testing it against the original result. The README documents the workflow and the scripts’ roles, but the main SKILL instructions and adapter implementations were not sampled; relationships involving them are limited to README statements.

Main entry points: [`skills/skill-distill/scripts/distill.py`](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/scripts/distill.py) (Student trials), [`skills/skill-distill/SKILL.md`](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/SKILL.md) (Result comparison), [`skills/skill-distill/templates/student-skill/SKILL.md`](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/templates/student-skill/SKILL.md) (Produced skill), [`skills/skill-distill/scripts/extract_session.py`](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/scripts/extract_session.py) (Session reference)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Distillation workflow"]
  node_operator["Operator skill<br/>[SKILL.md]"]
  node_reference["Session reference<br/>[extract_session.py]"]
  node_student_skill["Produced skill<br/>[SKILL.md]"]
  node_student_trials["Student trials<br/>[distill.py]"]
  node_evaluation["Result comparison<br/>[SKILL.md]"]
end

subgraph group_runtime["Run tooling"]
  node_run_manager["Run bookkeeping<br/>[distill.py]"]
  node_workspace["Fresh workspace<br/>[distill.py]"]
  node_web_capture["Web capture<br/>[capture_web.py]"]
end

subgraph group_integrations["Student integrations"]
  node_omp_adapter["omp adapter<br/>[omp.sh]"]
  node_pi_adapter["pi adapter<br/>[pi.sh]"]
  node_codex_adapter["Codex adapter<br/>[codex.sh]"]
  node_claude_adapter["Claude adapter<br/>[claude.sh]"]
  node_opencode_adapter["opencode adapter<br/>[opencode.sh]"]
end

node_user(("Human user"))
node_teacher(("Teacher agent"))
node_student_harness(("Student harness"))

node_user -->|"requests distillation"| node_teacher
node_teacher -->|"follows workflow"| node_operator
node_teacher -.->|"extracts session"| node_reference
node_teacher -->|"writes and revises"| node_student_skill
node_teacher -->|"compares results"| node_evaluation
node_teacher -->|"presents results"| node_user
node_user -->|"accepts skill"| node_student_skill
node_teacher -->|"uses bookkeeping"| node_run_manager
node_run_manager -->|"creates copies"| node_workspace
node_run_manager -->|"starts trials"| node_student_trials
node_student_trials -->|"dispatches via"| node_omp_adapter
node_student_trials -->|"dispatches via"| node_pi_adapter
node_student_trials -->|"dispatches via"| node_codex_adapter
node_student_trials -->|"dispatches via"| node_claude_adapter
node_student_trials -->|"dispatches via"| node_opencode_adapter
node_student_trials -->|"runs student"| node_student_harness
node_evaluation -.->|"captures web evidence"| node_web_capture

click node_operator "https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/SKILL.md"
click node_reference "https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/scripts/extract_session.py"
click node_student_skill "https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/templates/student-skill/SKILL.md"
click node_student_trials "https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/scripts/distill.py"
click node_evaluation "https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/SKILL.md"
click node_run_manager "https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/scripts/distill.py"
click node_workspace "https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/scripts/distill.py"
click node_web_capture "https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/scripts/capture_web.py"
click node_omp_adapter "https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/adapters/omp.sh"
click node_pi_adapter "https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/adapters/pi.sh"
click node_codex_adapter "https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/adapters/codex.sh"
click node_claude_adapter "https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/adapters/claude.sh"
click node_opencode_adapter "https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/adapters/opencode.sh"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_operator,node_reference,node_student_skill,node_student_trials,node_evaluation,node_user toneBlue
class node_run_manager,node_workspace,node_web_capture toneAmber
class node_omp_adapter,node_pi_adapter,node_codex_adapter,node_claude_adapter,node_opencode_adapter toneMint
class node_teacher,node_student_harness toneIndigo
```

## Components

### Distillation workflow

- [Operator skill](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/SKILL.md): `skills/skill-distill/SKILL.md`
- [Session reference](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/scripts/extract_session.py): `skills/skill-distill/scripts/extract_session.py`
- [Produced skill](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/templates/student-skill/SKILL.md): `skills/skill-distill/templates/student-skill/SKILL.md`
- [Student trials](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/scripts/distill.py): `skills/skill-distill/scripts/distill.py`
- [Result comparison](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/SKILL.md): `skills/skill-distill/SKILL.md`

### Run tooling

- [Run bookkeeping](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/scripts/distill.py): `skills/skill-distill/scripts/distill.py`
- [Fresh workspace](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/scripts/distill.py): `skills/skill-distill/scripts/distill.py`
- [Web capture](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/scripts/capture_web.py): `skills/skill-distill/scripts/capture_web.py`

### Student integrations

- [omp adapter](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/adapters/omp.sh): `skills/skill-distill/adapters/omp.sh`
- [pi adapter](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/adapters/pi.sh): `skills/skill-distill/adapters/pi.sh`
- [Codex adapter](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/adapters/codex.sh): `skills/skill-distill/adapters/codex.sh`
- [Claude adapter](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/adapters/claude.sh): `skills/skill-distill/adapters/claude.sh`
- [opencode adapter](https://github.com/sybil-solutions/skill-distill/blob/main/skills/skill-distill/adapters/opencode.sh): `skills/skill-distill/adapters/opencode.sh`

### Other components

- **Human user**
- **Teacher agent**
- **Student harness**

## Connections

- Human user → Teacher agent: requests distillation (evidence: `README.md`)
- Teacher agent → Operator skill: follows workflow (evidence: `README.md`)
- Teacher agent → Session reference: extracts session
- Teacher agent → Produced skill: writes and revises (evidence: `README.md`)
- Teacher agent → Result comparison: compares results (evidence: `README.md`)
- Teacher agent → Human user: presents results (evidence: `README.md`)
- Human user → Produced skill: accepts skill (evidence: `README.md`)
- Teacher agent → Run bookkeeping: uses bookkeeping (evidence: `README.md`)
- Run bookkeeping → Fresh workspace: creates copies (evidence: `README.md`)
- Run bookkeeping → Student trials: starts trials (evidence: `README.md`)
- Student trials → omp adapter: dispatches via (evidence: `README.md`)
- Student trials → pi adapter: dispatches via (evidence: `README.md`)
- Student trials → Codex adapter: dispatches via (evidence: `README.md`)
- Student trials → Claude adapter: dispatches via (evidence: `README.md`)
- Student trials → opencode adapter: dispatches via (evidence: `README.md`)
- Student trials → Student harness: runs student (evidence: `README.md`)
- Result comparison → Web capture: captures web evidence
