Agent skill

Skill Distiller

by Mathews-Tom in Mathews-Tom/armory

Converts Opus-quality skills into deterministic Haiku-executable workflows via trace-driven distillation and cross-model validation.

MITAuto-check passedDevelopment

Install Skill Distiller

skills CLI
$ npx skills add Mathews-Tom/armory --skill skill-distiller -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Mathews-Tom/armory skill-distiller --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Mathews-Tom/armory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/skill-distiller .claude/skills/skill-distiller && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
skill-distiller
GitHub stars
329
Token cost
~2k tokens
SKILL.md length
726 words
Files
3 (incl. references)
Skills in repo
80
Repo updated
First seen
Licence
MIT

At a glance

Converts Opus-quality skills into deterministic Haiku-executable workflows via trace-driven distillation and cross-model validation.

  • Works in 6 steps: Complexity Analysis → Trace Collection → Pattern Extraction → …
  • : distill this skill
  • SKILL.md covers Reference Files, Prerequisites, Workflow and Error Handling, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Skill Distiller is an agent skill from Mathews-Tom/armory. Converts Opus-quality skills into deterministic Haiku-executable workflows via trace-driven distillation and cross-model validation. Triggers on: "distill this skill", "make this skill work on Haiku", "cross-model optimization", "optimize skill for cost". NOT for code simplification, use code-refiner.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `evals/cases.yaml` and `references/distillation-patterns.md`).

It sits in Development, covering Code simplification. The repository describes itself as: Curated, production-grade skills for AI coding agents. Battle-tested workflows for developers who use AI seriously. The licence is MIT.

When your agent uses it

  • : distill this skill
  • Make this skill work on Haiku
  • Cross-model optimization
  • Optimize skill for cost

Example prompts

  • “distill this skill”
  • “make this skill work on Haiku”
  • “cross-model optimization”
  • “/skill-distiller”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Complexity Analysis
  2. Trace Collection
  3. Pattern Extraction
  4. Distilled Rewrite
  5. Target Model Validation
  6. Cross-Model Report

What it can do on your machine

Read from SKILL.md and the folder at commit 4594fb7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Skill Distiller loads about 2k tokens when it runs, and up to ~3.2k if it reads all its reference files. Until then it costs about 80 tokens; SKILL.md has 726 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~80
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Mathews-Tom/armory at commit 4594fb7, republished under its MIT licence (© Mathews-Tom). 726 words, ~2,045 tokens.

Download SKILL.mdSave it as .claude/skills/skill-distiller/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
skill-distiller
description
Converts Opus-quality skills into deterministic Haiku-executable workflows via trace-driven distillation and cross-model validation. Triggers on: "distill this skill", "make this skill work on Haiku", "cross-model optimization", "optimize skill for cost". NOT for code simplification, use code-refiner.
metadata.version
1.0.1
metadata.category
development
metadata.tags
distillation, cross-model, optimization, haiku, deterministic
metadata.difficulty
advanced
metadata.phase
build

Skill Distiller

Transform skills authored for high-capability models (Opus) into deterministic workflows that execute reliably on lower-cost models (Sonnet, Haiku). The core insight from EvoSkills: skills encode reusable task structure, not model-specific artifacts. A skill evolved on Opus transfers with +35-45pp gains to other models — but only when the instructions are sufficiently deterministic that lower-capability models can follow them without improvising.

Reference Files

FileContentsLoad When
references/distillation-patterns.mdPattern catalog for converting reasoning to rulesAlways

Prerequisites

  • The source skill must exist and pass package-evaluator at >= 70%
  • Access to both the source model (Opus) and target model (Haiku/Sonnet) for validation
  • The surrogate-verifier skill for cross-model assertion checking

Workflow

Phase 1: Complexity Analysis

Score each section of the source SKILL.md for reasoning difficulty:

Complexity SignalScoreDistillation Action
Decision tree with 3+ branchesHIGHConvert to explicit if/then lookup table
"Use judgment" or "consider context"HIGHReplace with concrete heuristic rules
Multi-step inference chainHIGHBreak into numbered atomic steps
Reference to domain expertiseMEDAdd explicit reference file with knowledge
Clear enumerated stepsLOWKeep as-is
Concrete examples with expected outputLOWKeep as-is

Produce a complexity map: section name -> complexity score -> planned action.

Phase 2: Trace Collection

Execute the source skill with Opus on 5 representative tasks:

  1. Select tasks from evals/cases.yaml (positive cases) or generate new ones
  2. For each task, capture the full execution trace:
    • Tool calls made (which tools, in what order)
    • Intermediate reasoning visible in output
    • Final output structure and content
    • Time taken and token usage
  3. Store traces as structured data for pattern extraction
Phase 3: Pattern Extraction

From the collected traces, extract deterministic patterns:

  1. Decision paths — For each HIGH-complexity section, find the actual decisions Opus made across the 5 tasks. If Opus chose the same path in 4/5 cases, that path becomes the default rule
  2. Lookup tables — Where Opus applied domain knowledge, build explicit lookup tables (e.g., "if input contains SQL, use these patterns; if input contains Python, use those")
  3. Concrete examples — Extract representative input/output pairs from traces to serve as few-shot examples in the distilled skill
  4. Tool sequences — Identify the common tool invocation pattern and make it explicit ("Step 1: Read the file. Step 2: Grep for pattern X. Step 3: Write output.")
Show full SKILL.md (351 more words)Show less
Phase 4: Distilled Rewrite

Rewrite the SKILL.md applying all distillation actions from Phase 1:

Source PatternDistilled Replacement
"Analyze the code and determine...""Check for these 5 specific patterns: [list]"
"Use appropriate formatting""Output as a markdown table with columns: [A, B, C]"
"Consider the context to decide...""If [condition A]: do X. If [condition B]: do Y. Default: Z"
"Apply best practices for..."Reference file with explicit best practices enumerated
Multi-paragraph reasoning instructionNumbered step list with single-sentence steps

Rules for the rewrite:

  • Every instruction must be actionable by a model with no domain expertise
  • No step should require inference — each step's input and output must be explicit
  • Replace all "consider", "analyze", "determine" verbs with "check", "count", "list", "output"
  • Add concrete examples for any step that could be ambiguous
  • Keep the SKILL.md under 500 lines (distillation should reduce, not expand)
Phase 5: Target Model Validation

Run the distilled skill on the target model (Haiku or Sonnet):

  1. Execute the same 5 tasks from Phase 2 with the distilled skill loaded
  2. Use the surrogate-verifier to generate assertions for each task output
  3. Compare pass rates:
MetricSource (Opus + original)Target (Haiku + distilled)Delta
Assertions passedN/MN/M±
Weighted scoreX.XXX.XX±
Output completeness%%±
Format compliance%%±
  1. If target model score < 80% of source model score, iterate:
    • Identify which assertions the target model fails
    • Add more explicit instructions for those specific failure points
    • Re-run validation (max 3 iterations)
Phase 6: Cross-Model Report

Produce the final comparison:

markdown
# Skill Distillation Report: <skill-name>

## Complexity Reduction
- Sections distilled: N/M (HIGH → LOW)
- Instruction word count: original X → distilled Y (Z% reduction)
- Decision points replaced with lookup tables: N

## Cross-Model Performance
| Model   | Assertions Passed | Weighted Score | Format Compliance |
|---------|-------------------|----------------|-------------------|
| Opus    | 7/7               | 1.00           | 100%              |
| Sonnet  | 6/7               | 0.92           | 100%              |
| Haiku   | 5/7               | 0.85           | 85%               |

## Changes Made
1. [Section] "Analyze complexity" → explicit 5-item checklist
2. [Section] "Apply formatting" → fixed markdown table template
...

## Recommendation
[SHIP | ITERATE | MANUAL_REVIEW_NEEDED]

Error Handling

ErrorResolution
Source skill scores below 70%Refuse distillation; recommend evolution via test-engineer
No execution traces availableGenerate synthetic tasks and collect traces before proceeding
Target model fails all assertionsSkill may be too complex for target model; report with detail
Distilled skill longer than sourceReview distillation; patterns may need consolidation

Limitations

  • Cannot distill skills that rely on open-ended adaptive reasoning at many decision points or multi-turn reasoning
  • Visual/interactive skills (HTML generation, browser automation) may not distill well
  • Distillation optimizes for determinism, not creativity — skills requiring open-ended generation (writing, brainstorming) are poor candidates
  • Trace collection requires actual model execution, incurring API costs

© Mathews-Tom, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/skill-distiller of Mathews-Tom/armory.

  • SKILL.md
  • evals/cases.yaml
  • references/distillation-patterns.md

Open the folder on GitHubat commit 4594fb7

Compare with similar skills

Skill Distiller next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Skill Distiller compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Skill Distiller this skillMathews-Tom/armory329—~2kAutomated safety check: PassMIT
Ponytail Lazy Developer ModeDietrichGebert/ponytail160k1 repos~873Automated safety check: PassMIT
Ponytail Reviewkortix-ai/suna20k4 repos~593Automated safety check: PassCustom licence
PonytailDavidObando/gsharp5657 repos~1.7kAutomated safety check: PassMIT
Code Simplification for ego-litecitrolabs/ego-lite17k—~1.2kAutomated safety check: PassMIT
Refactor Pass for Simplicitystar-history/star-history9.6k1 repos~168Automated safety check: PassMIT

Similar skills

  • Ponytail Lazy Developer Mode

    DietrichGebert/ponytail

    Makes the agent pick the laziest solution that works: skip unneeded work, reuse what exists, prefer the standard library and platform features, and keep diffs small.

    160k GitHub starsUsed in 1 repo~873 tokens
    DevelopmentAuto-check passed
  • Ponytail Review

    kortix-ai/suna

    Code review focused exclusively on over-engineering. An agent skill from kortix-ai/suna.

    20k GitHub starsUsed in 4 repos~593 tokens
    DevelopmentAuto-check passed
  • Ponytail

    DavidObando/gsharp

    Forces the laziest solution that actually works, simplest, shortest, most minimal.

    565 GitHub starsUsed in 7 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Finds and implements evidence-backed simplifications in the ego-lite repository, such as dead code, duplicated state and speculative abstractions, without hiding behavior changes.

    17k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Refactor Pass for Simplicity

    star-history/star-history

    Perform a refactor pass focused on simplicity after recent changes. Use when the user asks for a refactor/cleanup pass, simplification, or dead-code removal…

    9.6k GitHub starsUsed in 1 repo~168 tokens
    DevelopmentAuto-check passed
  • Reviews RTK's Rust code for over-engineering and verbose patterns, applying idioms like iterator chains and early returns while protecting a specific list of constraints from being simplified away.

    83k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed

More from Mathews-Tom/armory

All 80 skills in this repo
  • Architecture Reviewer

    Mathews-Tom/armory

    Architecture reviews across 7 dimensions (structural, scalability, enterprise readiness, performance, security, ops, data) with scored reports.

    329 GitHub stars~4.6k tokensUpdated 4 days ago
    Auto-check passed
  • Concept To Image

    Mathews-Tom/armory

    Turn concepts into static HTML visuals exported as PNG or SVG files via HTML/CSS/SVG.

    329 GitHub stars~2.6k tokensUpdated 4 days ago
    Auto-check passed
  • Watch

    Mathews-Tom/armory

    A skill your agent uses when analyzing an existing video URL or local recording: "watch this video", "analyze youtube video", "summarize this video", "youtube transcript", "find this moment", "what…

    329 GitHub stars~2.8k tokensUpdated 4 days ago
    Auto-check passed
  • Code Refiner

    Mathews-Tom/armory

    Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust.

    329 GitHub stars~3.1k tokensUpdated 4 days ago
    Auto-check passed
  • Concept To Video

    Mathews-Tom/armory

    Turn concepts into animated explainer videos using Manim (Python) with MP4/GIF output, audio overlay, multi-scene composition.

    329 GitHub stars~4.9k tokensUpdated 4 days ago
    Auto-check passed
  • Decision Map

    Mathews-Tom/armory

    Maps the unresolved architecture, policy, and scope decisions that must be answered before planning can start: one durable decision ticket per question on the issue tracker, typed and blocker-linked…

    329 GitHub stars~2.7k tokensUpdated 4 days ago
    Auto-check passed

Categories

Questions about Skill Distiller

What does Skill Distiller do?

Converts Opus-quality skills into deterministic Haiku-executable workflows via trace-driven distillation and cross-model validation. Skill Distiller is an agent skill from Mathews-Tom/armory. Converts Opus-quality skills into deterministic Haiku-executable workflows via trace-driven distillation and cross-model validation.

When should I use Skill Distiller?

Skill Distiller fits situations like: : distill this skill; make this skill work on Haiku; cross-model optimization; optimize skill for cost.

How do I install Skill Distiller in Claude Code?

Run `npx skills add Mathews-Tom/armory --skill skill-distiller -a claude-code`. Or copy the skill folder (skills/skill-distiller in Mathews-Tom/armory) into .claude/skills/skill-distiller in your project. Claude Code loads it when a task matches its description.

How do I install Skill Distiller in Codex?

Run `npx skills add Mathews-Tom/armory --skill skill-distiller -a codex`. Or copy the skill folder (skills/skill-distiller in Mathews-Tom/armory) into .agents/skills/skill-distiller in your project. Codex loads it when a task matches its description.

Can I use Skill Distiller in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Mathews-Tom/armory --skill skill-distiller -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/skill-distiller, .gemini/skills/skill-distiller, .github/skills/skill-distiller and .opencode/skills/skill-distiller in your project.

What does Skill Distiller need to run?

SKILL.md names no scripts, command-line tools or credentials: Skill Distiller is instructions for the agent only.

Does Skill Distiller access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Skill Distiller safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Skill Distiller use?

Skill Distiller is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Skill Distiller use?

About 2k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.1k tokens, read only when the agent opens those files.

What are the alternatives to Skill Distiller?

Skills that share tags, products or a category with Skill Distiller: Ponytail Lazy Developer Mode (DietrichGebert/ponytail, 160k stars), Ponytail Review (kortix-ai/suna, 20k stars), Ponytail (DavidObando/gsharp, 565 stars) and Code Simplification for ego-lite (citrolabs/ego-lite, 17k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Skill Distiller?

Mathews-Tom (a GitHub user) maintains it in Mathews-Tom/armory, which has 329 GitHub stars. The repository holds 80 skills in this directory. The repository was last updated on October 6, 2026.

Source: Mathews-Tom/armory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.