Skip to main content

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.

PyPI version Python License GitHub

English · 简体中文


A coding agent listing the Skills xskill distilled from past sessions

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 shared main.

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

MIT © 370025263. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xskill-0.5.0a4.tar.gz (740.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xskill-0.5.0a4-py3-none-any.whl (211.9 kB view details)

Uploaded Python 3

File details

Details for the file xskill-0.5.0a4.tar.gz.

File metadata

  • Download URL: xskill-0.5.0a4.tar.gz
  • Upload date:
  • Size: 740.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for xskill-0.5.0a4.tar.gz
Algorithm Hash digest
SHA256 fdff480c2a44127d0e86487c7f4bf35b4da3c0168479ec0c0b1ff9073dd6f365
MD5 b3b4b507c6235796b724dbe55f6e5c5d
BLAKE2b-256 1c8e04c5c1c5657352920e1c768a938e17f5ebf013e5b49b61257b937800f612

See more details on using hashes here.

File details

Details for the file xskill-0.5.0a4-py3-none-any.whl.

File metadata

  • Download URL: xskill-0.5.0a4-py3-none-any.whl
  • Upload date:
  • Size: 211.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for xskill-0.5.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 9fefa32cef191e1bf4c75ebeff9c33dc8d5636f4d80334b743f872ab10432517
MD5 c909100edbde2044c80ff2b72fa45cc8
BLAKE2b-256 f9b56ee30afa9da8c6b43aa408d13995f761299439b62b2fec669404f2154518

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page