Distill reusable Skills from AI Agent execution trajectories
Project description
xskill
Stop re-teaching your AI agents. xskill turns work they have already done into Skills they reuse.
English · 简体中文
News
- 2026-05 — xskill is open-source under the MIT license, and on PyPI:
pip install xskill(0.4.2). - 2026-05 — Claude Code and OpenClaw are verified end to end; Codex and Cursor support is implemented.
What changes for you
Without xskill, a coding agent re-derives the same solution every time it meets a familiar problem, and you either re-explain it or hand-maintain a prompt library that drifts out of date.
With xskill running, that maintenance disappears:
- Patterns that worked become Skill files your agent loads automatically.
- The library updates itself as you keep working — no review queue, no curation.
- When you do edit a Skill by hand, xskill keeps the edit and treats it as ground truth.
- A new Skill version replaces the old one only if it measurably serves users better.
You keep working as before. The Skill library is a byproduct.
Get started
pip install xskill # Python 3.11+
xskill serve # writes ~/.xskill/config.yaml, then exits
Fill in two model endpoints in ~/.xskill/config.yaml:
skill_dir: ~/.xskill/skill
llm:
base_url: https://api.deepseek.com
model: deepseek-v4-flash
api_key: YOUR_KEY
embedding:
base_url: https://api.deepseek.com
model: deepseek-embedding
api_key: YOUR_KEY
dim: 0
Any OpenAI-compatible endpoint works. Run xskill serve again — it auto-detects
and watches every supported agent on your machine (Claude Code, Codex, OpenClaw,
Cursor). To also index an archive of older trajectories, register that directory:
xskill registry add /path/to/trajectories
For teams: one shared Skill library
Team mode is the reason to deploy xskill across an organization. One machine is the server; everyone else joins as a thin client.
xskill serve --server # prints a join token
xskill connect <host:port> --token <token>
- Shared library. Every client benefits from Skills distilled across the whole team's work, not just their own.
- Private trajectories. A client redacts before upload; only the server runs the pipeline and holds the full history.
- Per-user A/B. Canary buckets by
client_id, so a Skill change is measured per person before it spreads. - Safe local edits. A client's hand-edits go to an isolated
user-staging/<client_id>branch, never straight to sharedmain.
How it works
A few narrow LLM agents do the work. One splits a trajectory into single-intent
Atoms; one routes each Atom to a Skill; one rewrites the SKILL.md once a Skill
has enough material; one A/B-tests new versions on live traffic and keeps the
winner. Every Skill is its own git repository, so changes are versioned and
reversible. Details: docs/agent.md.
Works with your agents
| Agent | Status | Trajectory ingest | Skill install |
|---|---|---|---|
| Claude Code | ✅ verified | auto-detects ~/.claude/projects/ |
symlink → ~/.claude/skills/<name>/ |
| OpenClaw | ✅ verified | auto-detects ~/.openclaw/agents/ |
copy → ~/.agents/skills/<name>/ |
| Codex CLI | 🟡 implemented | auto-detects ~/.codex/sessions/ |
symlink → ~/.agents/skills/<name>/ |
| Cursor | 🟡 implemented | auto-detects ~/.cursor/projects/*/agent-transcripts/ |
symlink → ~/.cursor/skills/<name>/ |
| Any other agent | manual | SDK: xskill.adapters.submit_trajectory |
copy or symlink the SKILL.md directory |
Output follows the Anthropic SKILL.md schema, so the library is portable.
OpenCode and Trae are on the roadmap.
Concepts
| Term | Meaning |
|---|---|
| Trajectory | One agent run — the transcript of a session. Stored as traj_*.md. |
| Atom | The smallest single-intent slice of a trajectory. Routing happens at this level. |
| Skill | A SKILL.md plus optional scripts, in its own versioned git directory. |
| Canary | A live-traffic A/B test of a current Skill against a new candidate. |
| UX score | How well a Skill served the user on a given Atom, scored 1–10 from the interaction itself. The canary keeps whichever version scores higher. |
Why not just keep a prompt folder
A hand-kept prompt library has no feedback loop — nothing tells you which entries
still help and which have rotted. xskill closes that loop: every Skill version
is A/B-tested on real traffic, scored on the user experience it produced, and
kept or dropped on that result. The comparison against 10 prior
trajectory-to-skill systems is in
docs/research/related-work-survey.md.
Roadmap
- More agent adapters — OpenCode, Trae, Goose, OpenHands, Aider
- Native MCP server interface (Skills exposed as tools)
- Web UI for browsing the library and viewing canary stats
- Usage-driven auto-prune
- Skill marketplace — import / export portable bundles
- Multi-tenant libraries (per-team
skill_dir)
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xskill-0.5.0a5.tar.gz.
File metadata
- Download URL: xskill-0.5.0a5.tar.gz
- Upload date:
- Size: 741.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05b17b3250ff608f7f08f92a51f04add35dc4ac60761f42426c4c8ad5e71a77f
|
|
| MD5 |
d6912f768d3ca71dada3c6c627ff5989
|
|
| BLAKE2b-256 |
3e3aa5ee51c26b97f8f29958df08c426633da94d801cee029a2aa1c49c1d35ea
|
File details
Details for the file xskill-0.5.0a5-py3-none-any.whl.
File metadata
- Download URL: xskill-0.5.0a5-py3-none-any.whl
- Upload date:
- Size: 212.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5813cd07858d979534481a6467968427281ad44455d1ee05d4b0bc16daf6d2f5
|
|
| MD5 |
088169fea82047fdd8831ec6fd720c2f
|
|
| BLAKE2b-256 |
77641dabbf6f6fca2c780ac92840ba986cffdfb561d32ba83bf56090933e1a06
|