@klhapp/skillmux
v1.14.1
Published
Skill management and retrieval for AI agents: sync native skills across clients and route the long tail over MCP
Readme
Every AI coding agent wants its own skill folder and its own format. Skillmux
manages SKILL.md collections across all of them
from one place. Keep one vault source of truth (the logical skill
collection), pin a small set into native skill directories, and retrieve the
rest through MCP. A vault checkout is a physical copy of that collection.
On one machine, ~/skills can be both the source of truth and its checkout.
For a shared topology, the Git-backed vault source of truth has a checkout on each agent machine, where the Skillmux CLI creates native pins, and a checkout on the server, where Skillmux server exposes HTTP MCP. Skillmux does not pull, push, replicate, or determine freshness between checkouts; Git and the deployment process own replication and freshness. See native pins with shared retrieval.
The same Skillmux CLI manages native skills and can serve local stdio MCP. Most individual users need only the CLI. Add Docker when you need a shared or always-on HTTP service.
skillmux serve starts local stdio without a config file. skillmux serve
--transport http likewise starts on loopback with safe defaults; create a
config only when you need to customize the vault, inference, or server policy.
See Configuration and
Deployment for those next steps.
Choose a setup by the job:
- Need native skills or local MCP for one agent? Install the Skillmux CLI.
- Want a single file and no package manager? Download the standalone executable; it is the same Skillmux CLI.
- Need one shared HTTP MCP service? Deploy the full image, the self-contained default with GTE-small.
- Already have remote embeddings, or intentionally want lexical-only retrieval? Use the slim image; see Deployment.
For native pins and shared retrieval, run the Skillmux CLI on the machines that own agent directories and one shared server for routed retrieval. MCP-only clients connect over HTTP and do not need the Skillmux CLI.
Manage the server's vault checkout outside the container. Use the CLI for Skillmux operations and Git or your deployment process for replication and freshness; server images do not manage host agent directories. If a server image rejects a management command, its error names the host CLI command to run; see the container command contract.
One vault source of truth, three ways to use it
“Local” describes where Skillmux runs. “Local inference” means the embedding
model runs in the Skillmux process. Both stdio and HTTP expose the same
resolve_skill and fetch_skill MCP tools.
Install the CLI
Skillmux ships as a native executable, so there is no runtime to install alongside it. Any of these works on macOS, Linux, and Windows:
npm install -g @klhapp/skillmux
bun add -g @klhapp/skillmux
npx @klhapp/skillmux --helpInstalling pulls exactly one platform-specific executable through
optionalDependencies, so you download the build for your machine and not the
other four. Native skill sync needs permission to create directory symlinks
on Windows.
Local embedding inference is included on every platform except Intel macOS. See platform support for what that costs and why.
You can also install a standalone executable and skip package managers
entirely. Every release attaches one per platform. This path needs no GitHub
CLI. It selects the right Linux or macOS build for your architecture,
downloads the pinned v1.13.2 release, and verifies the SHA-256 digest
published for that release:
version=v1.13.2
case "$(uname -s)-$(uname -m)" in
Linux-x86_64|Linux-amd64) asset=skillmux-linux-amd64; sha256=10226fc2515469fdbbaad14a3822257a2b679a4ecc4e03f0d14c550fbf461a15 ;;
Linux-aarch64|Linux-arm64) asset=skillmux-linux-arm64; sha256=844b963b79ae444eb45ea1a044dfd3062348cbf3ca045010c2e8d141dfdade9a ;;
Darwin-arm64) asset=skillmux-darwin-arm64; sha256=5276efdaf9703dc9607c4034c132f24941d3ea52a891ade9ee3ab3a7b1786b99 ;;
Darwin-x86_64) asset=skillmux-darwin-x64; sha256=3ebd34dd9e3056b5a3b99dd12b9003f9369eb6d14ccbd1ba43d778f3179558e9 ;;
*) echo "Unsupported platform: $(uname -s)-$(uname -m)" >&2; exit 1 ;;
esac
bin_dir="${SKILLMUX_BIN_DIR:-$HOME/.local/bin}"
curl --fail --location --output "$asset" "https://github.com/klhq/skillmux/releases/download/$version/$asset"
if command -v sha256sum >/dev/null 2>&1; then
printf '%s %s\n' "$sha256" "$asset" | sha256sum --check -
else
printf '%s %s\n' "$sha256" "$asset" | shasum -a 256 --check -
fi
mkdir -p "$bin_dir"
install -m755 "$asset" "$bin_dir/skillmux"macOS ships shasum instead of sha256sum and its install lacks GNU's -D
flag, so the snippet detects the former and creates the target directory
itself instead of relying on the latter. On Windows, use one of the
package-manager installs above, or download skillmux-win32-x64.exe directly
from the release page.
Ensure ~/.local/bin is on PATH. To install system-wide, explicitly choose
the target: sudo install -m755 "$asset" /usr/local/bin/skillmux. For GitHub
build-provenance verification, use the attested GitHub CLI procedure.
See Deployment for the full and slim images of Skillmux
server.
Quick starts
Skillmux uses ~/skills as its default vault:
~/skills/
└── csv-formatter/
└── SKILL.mdManage native skills
Run the setup planner, then verify its managed links:
skillmux init
skillmux sync
skillmux doctorThe planner detects agents, asks which skills belong in the core tier, and shows every write before confirmation. Use explicit flags for automation:
skillmux init \
--agent claude-code \
--agent codex \
--core csv-formatter \
--dry-run
skillmux init \
--agent claude-code \
--agent codex \
--core csv-formatter \
--yesinit records the agents in agents in config.toml. Core pins apply to
each configured agent's directory and stay capped at 25 skills, or at
[core].limit when the manifest sets one. Add
project-specific skills from a repository root:
skillmux project initAdd local MCP retrieval
Prefetch the default GTE-small model, index the vault, and start stdio MCP:
skillmux models download
skillmux index
skillmux doctor
skillmux serveThe model cache lives at ~/.cache/skillmux/models. If you skip the prefetch,
Skillmux downloads the model when local inference first needs it.
Run a shared MCP service
The full image includes GTE-small and serves Streamable HTTP on /mcp:
docker run -d \
--name skillmux \
-v ~/skills:/vault:ro \
-v skillmux-data:/data \
-p 3000:3000 \
ghcr.io/klhq/skillmux:latestUse ghcr.io/klhq/skillmux:latest-slim when you want remote embeddings or
lexical fallback instead of a bundled model. Docker Hub mirrors both variants
under docker.io/klhq/skillmux.
The getting-started guide provides complete recipes for all three setups.
HTTP surfaces
| Surface | User | Purpose | CLI required |
| --- | --- | --- | --- |
| /mcp | AI clients | Resolve and fetch skills | No |
| /admin/v1/* (and GET /stats) | Operators | Inspect/update config, stats, audit prune, evaluation, and remote diagnostics | Yes, when using named CLI contexts |
MCP clients authenticate only to /mcp with the MCP bearer token. Operators
use a separate administrative bearer token for /admin/v1/*; neither token
authorizes the other surface. Named CLI contexts administer the deployed server
only. They never install, pin, synchronize, or otherwise manage skill
directories on remote agent machines. See Deployment
for configuration and examples.
Add and inspect skills
Install a skill from a Git repository:
skillmux install owner/repo
skillmux install owner/repo/path/to/skillSkillmux validates SKILL.md and scans candidate content before copying it
into the vault, then asks before writing. Pass --yes to approve up front;
a non-interactive run needs it, because install refuses to write unattended.
A high-severity finding aborts the install by default. --fail-on
low|medium|high|none moves that threshold, and it names the lowest severity
that still aborts, so a lower value is stricter: low aborts on low, medium
and high, while none installs despite any finding.
Useful management commands:
skillmux scan ~/skills
skillmux outdated
skillmux core pin csv-formatter --yes
skillmux project pin my-project code-context --yes
skillmux skill which csv-formatter
skillmux report --since 7dRead Managing skills for directory ownership, project groups, local overrides, recovery, and reporting.
MCP retrieval
Register it with an MCP client:
{
"mcpServers": {
"skillmux": {
"command": "skillmux",
"args": ["serve"]
}
}
}Skillmux exposes two tools:
| Tool | Input | Result |
| --- | --- | --- |
| resolve_skill | Natural-language task description | A ranked shortlist of candidates |
| fetch_skill | Exact skill_id | The current SKILL.md body, SHA-256 digest, and supporting-file paths |
Skillmux uses the best available capability:
- SQLite FTS5 provides lexical retrieval and offline fallback.
- Local or remote embeddings add semantic recall.
- An optional reranker scores and reorders candidates.
Skillmux returns a ranked shortlist and lets the calling model choose. Endpoint failures degrade to a healthy lower retrieval mode instead of taking the MCP server down.
Read MCP routing for transports, client instructions, retrieval modes, and the wire contract.
Supported agents
| Agent | Native skill delivery | MCP setup |
| --- | --- | --- |
| Claude Code | ~/.claude/skills | Configure in the agent |
| Codex | $CODEX_HOME/skills or ~/.codex/skills | Configure in the agent |
| OpenCode, GitHub Copilot, Windsurf | Shared ~/.agents/skills | Configure in the agent |
| Goose, Hermes | Shared ~/.agents/skills | Manual registration |
| Antigravity | ~/.gemini/config/skills | Configure in the agent |
Other tools are not supported yet; each new one needs an entry in the agent
registry. Skillmux preserves existing instruction files and unmanaged content
in agent directories. Run skillmux init --dry-run to inspect every planned filesystem change.
Guarantees
- Controlled sources: pins come from the configured vault checkout, while routed delivery follows the configured overlay order.
- Scoped writes: management commands write only to documented config, vault, state, and adopted agent directories.
- Managed ownership: sync removes only entries recorded in the directory's
.skillmuxmarker. - Current bytes: MCP delivery hashes the file on disk and never serves a stale indexed body.
- Graceful retrieval: embedding and reranker failures fall back without hiding the active capability.
- Auditable decisions: each
resolve_skillcall records its query, retrieval capability, candidates, scores, and latency in the state database.
Documentation
Start with the documentation hub.
| Guide | Covers |
| --- | --- |
| Getting started | Native management, local MCP, and shared-service recipes |
| Concepts | Delivery tiers, deployment topologies, retrieval modes, and ownership |
| Managing skills | Install, scan, pin, sync, report, overlays, and recovery |
| MCP routing | Tools, ranked candidate retrieval, transports, fallback, and integrity |
| Deployment | Docker, container command boundaries, HTTP surfaces and auth, CORS, rate limits, and comparable CLI, health, and metrics status |
| Configuration | Machine config, inference, HTTP surfaces, manifests, overlays, and container read-only configuration |
| CLI reference | Host and container command surfaces, administrative contexts, automation, JSON output, and exit codes |
| Ranked-shortlist migration | Upgrade guide for the ranked-only contract |
| Troubleshooting | doctor, deployment identity, common failures, and migration notes |
| MCP schema | JSON Schema 2020-12 tool contract |
Development
Skillmux uses Bun for development:
bun install --frozen-lockfile
bun test
bun run buildRead CONTRIBUTING.md for the development workflow and SECURITY.md for vulnerability reporting.
