huggingface/upskill
Generate and evaluate agent skills for code agents like Claude Code, Open Code, OpenAI Codex
What it does
UPskill creates skills — compact instruction files that teach an AI agent how to do a specific task — and then measures whether those skills actually help. The core idea: use a powerful, expensive model (a "teacher") to write a skill, then check that a cheaper, faster model (a "student") performs better with that skill than without it.
Think of it as: watch an expert do something tricky, write down the recipe, then prove the recipe works for a less experienced cook.
How it works
- Generate — You describe a task (e.g., "write good git commit messages"). UPskill uses a teacher model to write
SKILL.md, the instructions file. It can also learn from an existing agent trace (a log of past actions) instead of from scratch. - Test — It generates synthetic test cases (input/output pairs) to check whether the skill works.
- Evaluate — It runs the task on a student model with the skill and without it (baseline), then reports the difference in success rate and token usage.
- Refine — If the skill doesn't help, it automatically improves it, up to a configurable number of attempts.
- Benchmark — For broader comparison, you can run multiple models, multiple times, and get a clean comparison table.
Key commands
| Command | Purpose |
|---|---|
upskill generate "task" |
Create a new skill, optionally evaluate it immediately |
upskill eval ./skills/name/ |
Test an existing skill on one or more models, with baseline comparison |
upskill list |
Show all generated skills in a tree view |
upskill runs |
Plot or export historical results (success rate or token usage) |
Model roles
The tool deliberately separates who does what:
- Skill generation model (
--model): writes and refines the skill - Test generation model (
--test-gen-model): creates synthetic evaluation cases; defaults to the skill generation model - Evaluation model(s) (
--eval-model/-m/--model): the model(s) being tested against the skill
If you pass multiple evaluation models or --runs > 1, it switches into benchmark mode: no baseline comparison, just head-to-head model performance.
What a skill looks like
Skills are saved as directories:
./skills/{skill-name}/
├── SKILL.md # Main instructions
├── references/ # Optional supporting docs
└── scripts/ # Optional executable scripts
A SKILL.md contains the task description, step-by-step instructions, format rules, and concrete examples.
The value proposition
- Knowledge capture: turn agent traces into transferable skills instead of losing them
- Verification: don't just claim a skill works — measure pass rates and token savings
- Cost control: distill expensive-model capability into cheap-model performance
Configuration
Settings live in ./upskill.config.yaml (or ~/.config/upskill/config.yaml as fallback):
skill_generation_model: sonnet # Default teacher
skills_dir: ./skills # Where skills go
runs_dir: ./runs # Where logs go
max_refine_attempts: 2 # How hard to iterate
num_runs: 1 # Default eval repetitions
executor: local # Or "jobs" for remote HF compute
Environment variables provide API keys for Anthropic, OpenAI, or local OpenAI-compatible endpoints.
Notable details
- Remote execution: With
--executor jobs, evaluation runs on Hugging Face remote jobs; requires anHF_TOKENand--artifact-repo. Useful for heavy benchmarks. - Run logging: Every evaluation is logged to
./runs/with metadata (model, task, timing) and results (pass/fail, assertions, tokens). Disable with--no-log-runs. - Local model support: Any OpenAI-compatible server works (llama.cpp, vLLM) via the
generic.model prefix. - Python API: Everything is also available as async Python functions (
generate_skill,evaluate_skill,refine_skill, etc.) for programmatic use. - Model format: Models follow the FastAgent convention:
provider.model.reasoning_effort?(e.g.,openai.o3-mini.low,generic.llama3.2:latest).
TL;DR
UPskill is a skill factory with a quality gate: generate skills from task descriptions or agent traces using a smart model, synthesize tests, then prove (or disprove) that cheaper models actually benefit — with numbers, not vibes.
Related
- Project
- Project
- Project
- Project