Skip to main content

Distill reusable Skills from AI Agent execution trajectories

Project description

xskill

Your coding agent, self-evolving.

PyPI version Python License GitHub

English · 简体中文


A coding agent listing the Skills xskill distilled from past sessions

News

  • 2026-05-23 — Officially open-source, v0.5.0 released: team mode (client-server), trajectory redaction, Python 3.9 support, no git binary 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.

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:
  base_url: https://api.deepseek.com
  model:    deepseek-embedding
  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) 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

xskill architecture: agent ecosystems → trajectory watcher → atom splitter → skill router → skill edit agent → canary A/B → skill repository ↔ team mode

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>/
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 — Trae, 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)

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.1.tar.gz (839.5 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.1-py3-none-any.whl (251.2 kB view details)

Uploaded Python 3

File details

Details for the file xskill-0.5.1.tar.gz.

File metadata

  • Download URL: xskill-0.5.1.tar.gz
  • Upload date:
  • Size: 839.5 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.1.tar.gz
Algorithm Hash digest
SHA256 4ada7f570b5de19d557e221187222c11aa0ff9bcec4f958fce26ec40eff4df39
MD5 641a74af7d53c112e9d1765a0e8dbe43
BLAKE2b-256 66c3094728ece08274809c306c2b2cc57e78f128a8bad6df38d379df8e2c2c90

See more details on using hashes here.

File details

Details for the file xskill-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: xskill-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 251.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 986283eb282771d11399824da891290191da1f4b798c2841836e270431483e61
MD5 05e9240420913978c9032dfbb350fa20
BLAKE2b-256 e079d2dbb0da1828333bcf19374f67b44da0d7c661b8e296cb36a4faa399c669

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