[KongchangAI]
· 2 min read· 1,084 words

Skill Distill: Distilling LLM Skills into Open-Source Small Models

Skill Distill: Distilling LLM Skills into Open-Source Small Models

Skill Distill lets a strong model write skill.md files, handing repetitive tasks off to small open-source models.

Skill Distill is an open-source tool that has Claude abstract its method for completing a large task into a reusable skill.md file, then hand it to open-source models like Qwen and DeepSeek to execute repeatedly. Claude acts as teacher, judging the student's output, fixing the skill file on errors, and triggering reruns until the student matches the teacher. Its value lies in extracting capability from expensive large models into readable, version-controllable text so high-frequency repetitive tasks can run long-term at lower cost or even locally. The article also notes that quantifiability of the evaluation criteria, skill transfer boundaries, and distillation overhead are key variables determining real-world benefit.

Understanding What This Tool Does in One Sentence

Skill Distill is an open-source tool with a straightforward core idea: let a strong model (Claude in the video) complete a large task, write the method for completing it into a reusable skill.md file, then hand that skill off to open-source models (like Qwen and DeepSeekAd) to execute repeatedly, ultimately bringing the small model's output close to the large model's level.

This solves a very real cost problem — there's no need to call the most expensive large model every time for repetitive tasks.

Skill Distill trigger method

Workflow: An Automatic Error-Correcting Distillation Loop

The mechanism breaks down into several stages.

The first step is generating the skill file. When Claude Code finishes a relatively large task, the user types a command like skill distill deepseek into the conversation, and Claude abstracts the task into a skill.md that records the methods and key points for completing that type of task. At this point Claude plays the teacher, and the open-source model plays the student.

Claude writes skill.md and hands off

The second step is having the student model execute repeatedly. After receiving the skill file, the open-source model runs the same task multiple times.

The third step is the teacher scoring and fixing. Claude evaluates the student model's output, identifies where it went wrong, goes back and modifies the corresponding part of skill.md, then has the student model run again.

Claude fixes the skill and triggers a rerun

This loop continues until the open-source model's output matches Claude's output. Essentially, this upgrades "prompt engineering" into "iterative optimization of a skill file," and the iteration process is done automatically by the strong model — you only need to issue the initial command.

A note on the term "distillation": In deep learning, knowledge distillation originally referred to having a small student model fit the output distribution (soft labels) of a large teacher model, thereby transferring the large model's generalization ability into the small model's parameters — the classic example being the method proposed by Hinton in 2015. Skill Distill borrows this metaphor, but the medium of transfer isn't model weights — it's a skill file written in natural language. The teacher isn't directly teaching the student's neurons; it's teaching it "how to do this type of task." So it's closer to prompt optimization or procedural instruction transfer than to strict parameter-level distillation. The upside is no training required, readable and editable; the cost is that it can't change the student model's inherent capability ceiling.

Why This Matters

The capability gap between large models often shows up in complex reasoning and long-chain tasks, but in real work a large number of tasks are highly repetitive — format conversion, code snippet generation, fixed-structure document processing, routine data analysis. Running these tasks on top-tier models accumulates token costs that aren't cheap.

The value of Skill Distill is that it extracts "capability" from the model and deposits it into a text file. Once a skill takes shape, it can be handed to a cheap open-source model for long-term execution.

Handing repetitive tasks to small models

From an engineering perspective, this approach has several implicit advantages: skill files are readable and version-controllable, so when something goes wrong you can pinpoint the exact rule; the distillation process has an automated quality loop that doesn't rely on humans comparing outputs one by one; and the choice of student model is open — open-source models like Qwen and DeepSeek can all be plugged in, and deployment can go the localization route so data never leaves the internal network.

Realistic prerequisites for open-source model integration: The Qwen (Alibaba's Tongyi Qianwen) and DeepSeek mentioned in the article are both open-source model families with downloadable weights, supporting local deployment via inference frameworks like vLLM, Ollama, and llama.cpp, and can also be called through OpenAI-compatible interfaces. This means the execution end of skill.md can be completely decoupled from cloud APIs: the model runs on internal GPUs, input data never leaves the local environment, and the marginal cost is mainly compute depreciation rather than per-token billing. But note that open-source models are weaker than top-tier closed-source models at following long contexts and complex instructions — the more abstract and longer the skill file, the higher the probability the small model goes off track. This is one reason the distillation loop must repeatedly correct errors.

What to View with Caution

The video leaves quite a few details unaddressed. For example, what's the criterion for "output matching Claude" — is it Claude's own judgment, or is there a quantifiable evaluation? If it relies entirely on the teacher model's subjective judgment, the loop might converge prematurely at some local optimum, or be unstable in judging edge cases.

Also worth noting is the transfer boundary of skills. Whether a skill.md written for a specific task still holds up under a different input distribution determines whether it's a "one-off script" or a "reusable asset." The video emphasizes the latter, but actual results depend on how abstract the skill file is.

One more point: the loop itself consumes Claude calls. For low-frequency tasks, the cost of the distillation process may exceed directly calling the large model; it's really cost-effective for high-frequency tasks that get executed repeatedly.

The difficulty of judging "output parity": For the loop to converge automatically, you need a reproducible evaluation signal. There are three common approaches: first, manually label a small set of golden samples as a reference; second, use rules or unit tests to validate structured output (e.g., JSON fields, whether code runs); third, have the teacher model act as an LLM-as-a-judge scorer. The first two are objective but limited in coverage; the third is flexible but has known issues like position bias and verbosity preference — the same output judged multiple times may be inconsistent. If you rely entirely on the teacher's subjective judgment, the loop may stop too early or oscillate repeatedly on edge cases. In engineering practice, you'd typically combine quantifiable checks with model judgment, and set a maximum number of iterations as a fallback.

Who It's For

If you have a stable stream of repetitive AI tasks and want to optimize for cost or data privacy, this type of tool offers an actionable path: first get things working and distilled with a strong model, then gradually hand execution over to open-source models. The author has placed the tool link in their community channel — those interested can look it up and verify it themselves.

#Skill Distill#knowledge distillation#open-source models#Qwen#DeepSeek#Claude#skill.md#LLM cost optimization
Share:

Related articles