Distill reusable Skills from AI Agent execution trajectories
Project description
What problem it solves
Your coding agent re-derives the same solution every time it bumps into a familiar problem. You either re-explain it, or hand-maintain a prompt library that quietly rots when no one is looking.
With xskill running, that work goes away:
- Patterns that actually worked get distilled into Skill files your agent loads automatically.
- The library grows itself as you keep using your agent — no review queue, no one curating "best practices."
- When you edit a Skill by hand, xskill picks up your edit immediately and learns from it.
- A new Skill version only replaces the old one if it measurably serves users better (UX-driven evolution, not naive LLM self-grading).
Get started
pip install xskill # Python 3.9+
xskill serve # writes ~/.xskill/config.yaml, then exits
Open ~/.xskill/config.yaml and fill in two model endpoints:
skill_dir: ~/.xskill/skill
llm:
base_url: https://api.deepseek.com
model: deepseek-v4-flash
api_key: YOUR_KEY
embedding:
# DeepSeek does NOT provide embeddings. Alternatives:
# Alibaba DashScope: base_url=https://dashscope.aliyuncs.com/compatible-mode/v1 model=text-embedding-v4
# OpenAI: base_url=https://api.openai.com/v1 model=text-embedding-3-small
# Ollama (local): base_url=http://localhost:11434/v1 model=nomic-embed-text
base_url: https://dashscope.aliyuncs.com/compatible-mode/v1
model: text-embedding-v4
api_key: YOUR_KEY
dim: 0
Run xskill serve again — it auto-detects every supported agent on your machine (Claude Code, Codex, OpenCode, OpenClaw, Cursor, Trae) and starts watching. To also index an archive of older trajectories:
xskill registry add /path/to/trajectories
Rate limiting (cloud-plan users)
Default watcher.max_concurrent: 4 is conservative and OK for accounts without
a hard concurrency cap. If your provider has RPM/TPM quotas (OpenAI Tier-1,
Azure 60 RPM, OneAPI, etc.) add rate_limit under llm:
llm:
base_url: https://api.deepseek.com
model: deepseek-v4-flash
api_key: YOUR_KEY
rate_limit:
rpm: 60 # match your provider plan
tpm: 100000 # optional within rate_limit
burst: 10 # optional; default = ceil(rate/6)
Buckets are shared per base_url across utils/llm and agno_factory
paths, so the same key is never double-debited. Self-hosted vLLM / high-tier
accounts should leave rate_limit out and raise max_concurrent to 20-30.
Design rationale: docs/adr/0001-rate-limit-diy-not-litellm.md.
Team mode — the killer use case
The way xskill really wants to be deployed in an organization is team mode: one machine is the server, everyone else joins as a thin client, and the whole team works against the same evolving Skill library.
xskill serve --server # prints a join token
xskill connect <host:port> --token <token>
- Silently distill your top performers. When one person solves something in their own work, the rest of the team gets that solution automatically — nobody has to write it down. (Capability democratized.)
- Any coding workflow plugs in. Codex, Claude Code, Cursor IDE — pick whatever; everyone joins the same library, synced across tools.
- Trajectories stay private. Sessions are redacted before upload; agent privacy built in.
- A/B-driven evolution. A Skill change is measured per person before it spreads — the more people in the team, the faster and sharper the evolution.
- Experts can teach manually. When an expert edits a Skill locally, the change is pulled into the server as
user-staging/<client_id>and feeds the next round of evolution.
Architecture
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 every change is 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>/ |
| Codex CLI | ✅ verified | auto-detects ~/.codex/sessions/ |
symlink → ~/.agents/skills/<name>/ |
| OpenCode | ✅ verified | SQLite ~/.local/share/opencode/opencode.db |
symlink → ~/.agents/skills/<name>/ |
| OpenClaw | 🟡 implemented, not well tested | auto-detects ~/.openclaw/agents/ |
copy → ~/.agents/skills/<name>/ |
| Cursor | 🟡 implemented, not well tested | auto-detects ~/.cursor/projects/*/agent-transcripts/ |
symlink → ~/.cursor/skills/<name>/ |
| Trae | 🟡 implemented, not well tested | IDE: %APPDATA%/Trae*/User/workspaceStorage/*/state.vscdb; CLI: ~/trajectories/trajectory_*.json |
symlink → ~/.trae-cn/skills/ and/or ~/.trae/skills/ |
| Any other agent | manual | SDK: xskill.adapters.submit_trajectory |
copy or symlink the SKILL.md directory |
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 the 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. |
Roadmap
- More agent adapters — Goose, OpenHands, Aider
- More mature user profiling and recommendation
- Native MCP server interface (Skills exposed as tools)
- Web UI for browsing the library and viewing canary stats
- Skill marketplace — import / export portable bundles
- Multi-tenant libraries (per-team
skill_dir)
News
- 2026-05-23 — Officially open-source,
v0.5.0released: team mode (client-server), trajectory redaction, Python 3.9 support, nogitbinary needed at runtime. See the release notes. - 2026-05-20 — MIT-licensed open source; on PyPI:
pip install xskill. - 2026-05-12 — Claude Code, Codex, OpenCode supported; OpenClaw and Cursor connected.
- 2026-05-29 — Trae IDE / Trae Agent adapter: workspaceStorage chat ingest + skill install to
~/.trae-cn/skills/~/.trae/skills.
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.6.0a3.tar.gz.
File metadata
- Download URL: xskill-0.6.0a3.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f9aa9881b471abfa4d7d34fc9a2a2ebb604e8de28e66e256ce72b3b3b0ef01c
|
|
| MD5 |
73d4dee4aaa6713f36a5087c70e234b8
|
|
| BLAKE2b-256 |
d8187d88b9f90b2060acefe2e244278368cea41c433975eb19623c3411861f79
|
File details
Details for the file xskill-0.6.0a3-py3-none-any.whl.
File metadata
- Download URL: xskill-0.6.0a3-py3-none-any.whl
- Upload date:
- Size: 292.5 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 |
67db77d1fd3e1055d1af04aa1ad1764a1a3b04eb3e5041440917c5b32d464aa6
|
|
| MD5 |
ae9c5d5b010823b5fa2bd3724d83bc8d
|
|
| BLAKE2b-256 |
0f657fbf6543260649a3f38f86584bd63eff49a273031fc5dfa9ccef0e8c4042
|