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.0a6.tar.gz (757.4 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.0a6-py3-none-any.whl (221.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xskill-0.5.0a6.tar.gz
  • Upload date:
  • Size: 757.4 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.0a6.tar.gz
Algorithm Hash digest
SHA256 e3e44c811847598906d850278e14288b27a0dc75ba529dcaa85f91e66419dbe4
MD5 1e47938415f35f16557c269f033b1a5d
BLAKE2b-256 e43106baa58e64ebd6e70331a5520d77027961b35cd4c9b8a88c03f5b5b714d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xskill-0.5.0a6-py3-none-any.whl
  • Upload date:
  • Size: 221.0 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.0a6-py3-none-any.whl
Algorithm Hash digest
SHA256 f4a863f84d360e0fa8b05bcc7840430fde387fc583b1850928c3e408d0b49e7c
MD5 9ae16697b6845ed50ee4bee6a2dba1a8
BLAKE2b-256 15b370fa32950652fb58a057ce6c163a94326b8f0adc210c643fc5de68efbe8b

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