@klhapp/skillmux 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +162 -521
- package/config.example.toml +5 -4
- package/config.remote.example.toml +5 -2
- package/docs/README.md +52 -0
- package/docs/assets/architecture.svg +156 -0
- package/docs/assets/logo.png +0 -0
- package/docs/calibration.md +6 -1
- package/docs/cli.md +350 -0
- package/docs/concepts.md +165 -0
- package/docs/configuration.md +34 -10
- package/docs/deployment.md +250 -0
- package/docs/getting-started.md +239 -0
- package/docs/mcp-routing.md +172 -0
- package/docs/releasing.md +4 -3
- package/docs/skill-management.md +209 -0
- package/docs/troubleshooting.md +199 -0
- package/package.json +3 -6
- package/src/cli.ts +40 -3
- package/src/config-watcher.ts +5 -1
package/docs/concepts.md
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Concepts
|
|
2
|
+
|
|
3
|
+
Skillmux separates three decisions:
|
|
4
|
+
|
|
5
|
+
| Decision | Choices |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| Skill delivery | Native core/project pins or routed MCP retrieval |
|
|
8
|
+
| Process location | On the client machine or as a shared HTTP service |
|
|
9
|
+
| Packaging | Skillmux CLI installation or Skillmux server deployment |
|
|
10
|
+
|
|
11
|
+
Retrieval capability is a fourth, independent concern: lexical, hybrid,
|
|
12
|
+
reranked, or exact retrieval.
|
|
13
|
+
|
|
14
|
+
These decisions are independent. A local CLI can manage native pins and serve
|
|
15
|
+
stdio MCP at the same time. A shared service uses HTTP MCP and can run local or
|
|
16
|
+
remote inference.
|
|
17
|
+
|
|
18
|
+
## Canonical vault
|
|
19
|
+
|
|
20
|
+
The vault is the source collection for Skillmux. Each direct child directory
|
|
21
|
+
represents one skill and contains a `SKILL.md`.
|
|
22
|
+
|
|
23
|
+
The default path is `~/skills`. Set `vault_path` in
|
|
24
|
+
`~/.config/skillmux/config.toml` when you keep the collection elsewhere.
|
|
25
|
+
|
|
26
|
+
Skillmux commands interact with the vault in two ways:
|
|
27
|
+
|
|
28
|
+
- management commands such as `install` and explicit config operations write
|
|
29
|
+
to documented paths;
|
|
30
|
+
- MCP retrieval reads skill content and stores indexes and audit records under
|
|
31
|
+
`state_dir`.
|
|
32
|
+
|
|
33
|
+
MCP delivery reads the current file bytes. It does not copy an indexed
|
|
34
|
+
`SKILL.md` body from the state database.
|
|
35
|
+
|
|
36
|
+
## Delivery tiers
|
|
37
|
+
|
|
38
|
+
Skillmux applies three policies to one vault:
|
|
39
|
+
|
|
40
|
+
| Tier | Scope | Delivery |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| Core | Each configured target | Native client skill directory |
|
|
43
|
+
| Project | Selected project paths and targets | Project-local native skill directory |
|
|
44
|
+
| Routed | Full indexed vault | MCP on demand |
|
|
45
|
+
|
|
46
|
+
Core and project skills are **pinned**. `skillmux sync` creates managed
|
|
47
|
+
symlinks for them. Routed skills stay in the vault until an MCP client asks for
|
|
48
|
+
one.
|
|
49
|
+
|
|
50
|
+
One skill can serve different roles across machines or projects, but the
|
|
51
|
+
shared manifest prevents conflicting core and project assignments. Core stays
|
|
52
|
+
capped at 25 skills to protect client startup context.
|
|
53
|
+
|
|
54
|
+
Delivery tiers do not select a deployment. A local Skillmux process can serve
|
|
55
|
+
routed skills over stdio, while a shared Skillmux process can serve the same
|
|
56
|
+
vault over HTTP.
|
|
57
|
+
|
|
58
|
+
## Deployment topologies
|
|
59
|
+
|
|
60
|
+
| Topology | Process location | Transport | Typical installation |
|
|
61
|
+
| --- | --- | --- | --- |
|
|
62
|
+
| Native management | Client machine | Filesystem links | Skillmux CLI |
|
|
63
|
+
| Local MCP | Beside one client | stdio | Skillmux CLI |
|
|
64
|
+
| Shared MCP | Server or container host | Streamable HTTP | Full Skillmux server image |
|
|
65
|
+
|
|
66
|
+
The **Skillmux CLI** is available as either the Bun package or the standalone
|
|
67
|
+
Linux executable; both expose the same commands. The **full Skillmux server
|
|
68
|
+
image** is the default shared-service deployment. The **slim image** is an
|
|
69
|
+
advanced variant for configured remote embeddings or intentional lexical-only
|
|
70
|
+
retrieval. The CLI can also serve HTTP, and Docker can serve stdio for clients
|
|
71
|
+
that support a container command. Those combinations use the same MCP tools;
|
|
72
|
+
the table lists the shortest setup for each use case.
|
|
73
|
+
|
|
74
|
+
The full Docker image bundles GTE-small. The slim image contains no model
|
|
75
|
+
files, so it uses configured remote embeddings or lexical fallback. The Bun
|
|
76
|
+
CLI distributions download and cache GTE-small when local inference
|
|
77
|
+
first loads it; `skillmux models download` prefetches it. Neither Docker image
|
|
78
|
+
bundles a local reranker; configure one remotely when needed.
|
|
79
|
+
|
|
80
|
+
## Clients and targets
|
|
81
|
+
|
|
82
|
+
A **client** is a supported product name such as `claude-code` or `codex`.
|
|
83
|
+
Skillmux maps it to the product's skill directory and safe instruction-file
|
|
84
|
+
conventions.
|
|
85
|
+
|
|
86
|
+
A **target** is a physical directory managed by sync. Several clients can map
|
|
87
|
+
to one target. Gemini CLI, OpenCode, GitHub Copilot, and Windsurf share
|
|
88
|
+
`~/.agents/skills`, so Skillmux deduplicates that directory.
|
|
89
|
+
|
|
90
|
+
Custom targets let you manage another directory without adding a product
|
|
91
|
+
adapter:
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
skillmux target add custom-agent --dir /srv/custom-agent/skills --yes
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Ownership markers
|
|
98
|
+
|
|
99
|
+
Each managed target contains a `.skillmux` marker. The marker records the
|
|
100
|
+
target name, vault, schema version, and entries created by Skillmux.
|
|
101
|
+
|
|
102
|
+
Sync removes only recorded entries. It refuses to adopt an unmarked directory,
|
|
103
|
+
overwrite unmanaged collisions, or treat a local overlay marker as a target
|
|
104
|
+
marker.
|
|
105
|
+
|
|
106
|
+
Run `skillmux init --dry-run` before changing a target. Read
|
|
107
|
+
[Managing skills](skill-management.md#target-ownership-and-recovery) before
|
|
108
|
+
undoing an adopted target.
|
|
109
|
+
|
|
110
|
+
## Project groups
|
|
111
|
+
|
|
112
|
+
A project group connects:
|
|
113
|
+
|
|
114
|
+
- one or more local project paths;
|
|
115
|
+
- a set of skill IDs;
|
|
116
|
+
- selected targets.
|
|
117
|
+
|
|
118
|
+
Skillmux materializes each group inside the project using the target's path
|
|
119
|
+
relative to the user's home directory. A shared `skillmux.toml` can list
|
|
120
|
+
checkout paths from several machines. Sync skips paths that do not exist on
|
|
121
|
+
the current machine.
|
|
122
|
+
|
|
123
|
+
## Local vault overlays
|
|
124
|
+
|
|
125
|
+
`local_vault_paths` layer machine-specific skill copies over the canonical
|
|
126
|
+
vault. Skillmux checks overlay paths in order, then falls back to `vault_path`.
|
|
127
|
+
|
|
128
|
+
Use overlays for work in progress or machine-specific variants. Keep portable
|
|
129
|
+
core and project pins in the canonical vault because another machine may not
|
|
130
|
+
have the overlay.
|
|
131
|
+
|
|
132
|
+
## Inference and retrieval capabilities
|
|
133
|
+
|
|
134
|
+
Inference location and deployment location use separate settings. Local
|
|
135
|
+
inference runs GTE-small inside the Skillmux process. Remote inference calls
|
|
136
|
+
configured embedding and reranker endpoints. Either inference choice can back
|
|
137
|
+
an HTTP MCP deployment.
|
|
138
|
+
|
|
139
|
+
Skillmux reports the active retrieval capability:
|
|
140
|
+
|
|
141
|
+
| Capability | Behavior |
|
|
142
|
+
| --- | --- |
|
|
143
|
+
| `lexical` | SQLite FTS5 and BM25 produce an ordered shortlist |
|
|
144
|
+
| `hybrid` | Reciprocal-rank fusion combines lexical and embedding results |
|
|
145
|
+
| `reranked` | A configured reranker reorders the fused candidates |
|
|
146
|
+
| `exact` | An exact skill ID resolves directly |
|
|
147
|
+
|
|
148
|
+
A reranker does not enable automatic matches by itself. Skillmux needs
|
|
149
|
+
calibrated `match_score`, `match_margin`, and `candidate_floor` thresholds
|
|
150
|
+
before it returns a semantic result as `matched`.
|
|
151
|
+
|
|
152
|
+
## Retrieval outcomes
|
|
153
|
+
|
|
154
|
+
`resolve_skill` returns one of three outcomes:
|
|
155
|
+
|
|
156
|
+
- `matched`: one skill passed the calibrated policy, so Skillmux delivers its
|
|
157
|
+
`SKILL.md` body inline;
|
|
158
|
+
- `ambiguous`: Skillmux returns an ordered candidate list and the calling model
|
|
159
|
+
chooses one with `fetch_skill`;
|
|
160
|
+
- `no_match`: no candidate passed the policy and the agent continues without a
|
|
161
|
+
skill.
|
|
162
|
+
|
|
163
|
+
Embedding or reranker failures reduce the active capability. Vault and index
|
|
164
|
+
failures make the server unready because Skillmux can no longer guarantee
|
|
165
|
+
valid retrieval.
|
package/docs/configuration.md
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
# Configuration
|
|
2
2
|
|
|
3
|
-
Skillmux defaults to FTS5 plus
|
|
3
|
+
Skillmux manages one canonical vault and defaults to FTS5 plus GTE-small
|
|
4
|
+
running in the Skillmux process. Most users need no config file.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
Deployment and inference use separate terms:
|
|
7
|
+
|
|
8
|
+
- **local deployment**: Skillmux runs beside a client, usually over stdio;
|
|
9
|
+
- **shared deployment**: Skillmux serves clients over HTTP;
|
|
10
|
+
- **local inference**: the Skillmux process runs the embedding model;
|
|
11
|
+
- **remote inference**: Skillmux calls configured inference endpoints.
|
|
12
|
+
|
|
13
|
+
A shared HTTP deployment can use local inference. A local stdio deployment can
|
|
14
|
+
use remote inference.
|
|
15
|
+
|
|
16
|
+
Read [Concepts](concepts.md) for the vault and delivery model. For detailed CLI
|
|
17
|
+
commands, target resolution, and automation envelopes, see
|
|
18
|
+
[CLI reference](cli.md). For labelled datasets, threshold certification,
|
|
19
|
+
reference values, and the apply lifecycle, see
|
|
20
|
+
[Policy calibration](calibration.md).
|
|
9
21
|
|
|
10
22
|
## Machine config bootstrap
|
|
11
23
|
|
|
@@ -26,14 +38,21 @@ It validates that the path resolves to a directory with at least one
|
|
|
26
38
|
`local_vault_paths` unset. `skillmux init --vault ~/skills --yes` uses the
|
|
27
39
|
same bootstrap when the machine config does not exist.
|
|
28
40
|
|
|
29
|
-
## Local
|
|
41
|
+
## Local inference
|
|
30
42
|
|
|
31
43
|
```toml
|
|
32
44
|
[inference]
|
|
33
45
|
mode = "local"
|
|
34
46
|
```
|
|
35
47
|
|
|
36
|
-
The versioned `gte-small-v1`
|
|
48
|
+
The versioned `gte-small-v1` configuration uses normalized, mean-pooled
|
|
49
|
+
`Xenova/gte-small` embeddings with 384 dimensions, quantized to q8 on CPU.
|
|
50
|
+
Skillmux CLI installations download the model when inference first
|
|
51
|
+
loads it and cache it in `~/.cache/skillmux/models`. The full Docker image
|
|
52
|
+
already contains the model.
|
|
53
|
+
|
|
54
|
+
Skillmux combines FTS5 and cosine result lists with reciprocal-rank fusion.
|
|
55
|
+
Without a reranker, the calling model selects from the ordered shortlist.
|
|
37
56
|
|
|
38
57
|
Advanced local overrides:
|
|
39
58
|
|
|
@@ -50,9 +69,10 @@ dtype = "q8"
|
|
|
50
69
|
|
|
51
70
|
```
|
|
52
71
|
|
|
53
|
-
Use `skillmux models download` to prefetch
|
|
72
|
+
Use `skillmux models download` to prefetch the model and `skillmux doctor` to
|
|
73
|
+
verify readiness.
|
|
54
74
|
|
|
55
|
-
## Remote
|
|
75
|
+
## Remote inference
|
|
56
76
|
|
|
57
77
|
See [`config.remote.example.toml`](../config.remote.example.toml). Embeddings
|
|
58
78
|
must implement the OpenAI-compatible `{ model, input }` contract. Configure the
|
|
@@ -137,7 +157,11 @@ Before exposing HTTP beyond localhost, set `hostname` to a reachable interface,
|
|
|
137
157
|
|
|
138
158
|
## Tiers and the manifest
|
|
139
159
|
|
|
140
|
-
`skillmux init
|
|
160
|
+
`skillmux init` and `skillmux sync` manage native delivery by pinning selected
|
|
161
|
+
skills as symlinks inside an agent's skill directory. Routed skills remain
|
|
162
|
+
available through `resolve_skill`. Read [Concepts](concepts.md#delivery-tiers)
|
|
163
|
+
for the model and [Managing skills](skill-management.md) for the workflow.
|
|
164
|
+
This section defines the manifest.
|
|
141
165
|
|
|
142
166
|
### `skillmux.toml`
|
|
143
167
|
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# Deployment
|
|
2
|
+
|
|
3
|
+
Choose a deployment from the client count and inference source:
|
|
4
|
+
|
|
5
|
+
| Use case | Recommended package | Transport | Inference |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| Native skill management | Skillmux CLI | Filesystem | None required |
|
|
8
|
+
| Local MCP retrieval | Skillmux CLI | stdio | Downloaded GTE-small |
|
|
9
|
+
| Shared MCP with local inference | Full Docker image | Streamable HTTP | Bundled GTE-small |
|
|
10
|
+
| Shared MCP with remote or lexical retrieval | Slim Docker image (advanced) | Streamable HTTP | Remote endpoint or lexical fallback |
|
|
11
|
+
|
|
12
|
+
Install the CLI with either the Bun package or standalone Linux executable;
|
|
13
|
+
they expose the same commands and can also serve HTTP. Deploy the full Docker
|
|
14
|
+
image for a shared service by default. Docker can serve stdio when a client
|
|
15
|
+
requires a container command; use slim only for remote or lexical retrieval.
|
|
16
|
+
|
|
17
|
+
“Local inference” means the model runs in the Skillmux process. It does not
|
|
18
|
+
mean that the MCP client must run on the same machine.
|
|
19
|
+
|
|
20
|
+
## Skillmux CLI
|
|
21
|
+
|
|
22
|
+
Run stdio MCP beside one client:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
skillmux models download
|
|
26
|
+
skillmux index
|
|
27
|
+
skillmux serve
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Run an HTTP service without Docker:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
skillmux serve --transport http --port 3000
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The native HTTP server binds `127.0.0.1` by default. Configure authentication
|
|
37
|
+
and a reachable hostname before serving other machines.
|
|
38
|
+
|
|
39
|
+
## Docker images
|
|
40
|
+
|
|
41
|
+
Skillmux publishes Linux AMD64 and ARM64 images to GHCR and Docker Hub:
|
|
42
|
+
|
|
43
|
+
| Variant | GHCR tag | Contents |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| Full | `ghcr.io/klhq/skillmux:latest` | Runtime plus bundled GTE-small |
|
|
46
|
+
| Slim | `ghcr.io/klhq/skillmux:latest-slim` | Runtime without model files; remote or lexical retrieval |
|
|
47
|
+
|
|
48
|
+
Docker Hub mirrors the same tags under `docker.io/klhq/skillmux`.
|
|
49
|
+
|
|
50
|
+
Neither image bundles a local reranker. Configure a remote reranker when your
|
|
51
|
+
retrieval policy needs one.
|
|
52
|
+
|
|
53
|
+
Use the full image when the service should run embeddings itself:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
docker run -d \
|
|
57
|
+
--name skillmux \
|
|
58
|
+
-v ~/skills:/vault:ro \
|
|
59
|
+
-v skillmux-data:/data \
|
|
60
|
+
-p 3000:3000 \
|
|
61
|
+
ghcr.io/klhq/skillmux:latest
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The container sets:
|
|
65
|
+
|
|
66
|
+
- `VAULT_PATH=/vault`;
|
|
67
|
+
- `STATE_DIR=/data`;
|
|
68
|
+
- `PORT=3000`;
|
|
69
|
+
- `RUNNING_IN_DOCKER=true`.
|
|
70
|
+
|
|
71
|
+
Mount the vault read-only for a retrieval-only service. Run `install`, `init`,
|
|
72
|
+
`sync`, and other filesystem management commands on the host. Containerized
|
|
73
|
+
native management is intentionally rejected: agent directories belong to the
|
|
74
|
+
host CLI, where their symlinks resolve correctly.
|
|
75
|
+
|
|
76
|
+
## Container command contract
|
|
77
|
+
|
|
78
|
+
The image separates its executable from its default command. Running an image
|
|
79
|
+
without arguments starts Streamable HTTP MCP on port 3000:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
docker run ghcr.io/klhq/skillmux:latest
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Arguments after the image replace that default, so one-shot maintenance and
|
|
86
|
+
stdio use the same image:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
docker run --rm -v ~/skills:/vault:ro -v skillmux-data:/data \
|
|
90
|
+
ghcr.io/klhq/skillmux:latest doctor
|
|
91
|
+
docker run --rm -v ~/skills:/vault:ro -v skillmux-data:/data \
|
|
92
|
+
ghcr.io/klhq/skillmux:latest index
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Docker Compose `command:` and Kubernetes `args:` likewise replace only the
|
|
96
|
+
default command, not the executable.
|
|
97
|
+
|
|
98
|
+
The supported container commands are `serve`, `index`, `doctor`, `report`,
|
|
99
|
+
`scan`, `skill which`, and read-only `config show`, `config get`,
|
|
100
|
+
`config validate`, `config diff`, and `config status`.
|
|
101
|
+
|
|
102
|
+
The image rejects host-management commands, including `init`, `sync`,
|
|
103
|
+
`install`, `project`, `target`, `core`, `local-vault`, `models download`,
|
|
104
|
+
context management, calibration, evaluation, and configuration initialization
|
|
105
|
+
or mutation. Install the Skillmux CLI on the host when a command needs to
|
|
106
|
+
manage a local vault or agent directory.
|
|
107
|
+
|
|
108
|
+
## Slim image
|
|
109
|
+
|
|
110
|
+
The slim image stays ready in lexical mode without an inference endpoint.
|
|
111
|
+
Configure remote embeddings to enable hybrid retrieval:
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
docker run -d \
|
|
115
|
+
--name skillmux-slim \
|
|
116
|
+
-v ~/skills:/vault:ro \
|
|
117
|
+
-v skillmux-data:/data \
|
|
118
|
+
-p 3000:3000 \
|
|
119
|
+
-e EMBED_ENDPOINT="https://embedding.example.com/v1/embeddings" \
|
|
120
|
+
-e EMBED_MODEL="your-embedding-model" \
|
|
121
|
+
-e EMBED_DIMENSION="1024" \
|
|
122
|
+
ghcr.io/klhq/skillmux:latest-slim
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Set `SKILLMUX_CONFIG` and mount a TOML file when you need reranking, calibrated
|
|
126
|
+
thresholds, server policy, or API-key environment names:
|
|
127
|
+
|
|
128
|
+
```sh
|
|
129
|
+
docker run -d \
|
|
130
|
+
--name skillmux-slim \
|
|
131
|
+
-v ~/skills:/vault:ro \
|
|
132
|
+
-v skillmux-data:/data \
|
|
133
|
+
-v "$PWD/config.toml:/etc/skillmux/config.toml:ro" \
|
|
134
|
+
-e SKILLMUX_CONFIG=/etc/skillmux/config.toml \
|
|
135
|
+
-e EMBEDDING_API_KEY \
|
|
136
|
+
-e RERANKER_API_KEY \
|
|
137
|
+
-p 3000:3000 \
|
|
138
|
+
ghcr.io/klhq/skillmux:latest-slim
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Start from [config.remote.example.toml](../config.remote.example.toml).
|
|
142
|
+
|
|
143
|
+
## Docker over stdio
|
|
144
|
+
|
|
145
|
+
Some local clients can launch a container as their stdio MCP command:
|
|
146
|
+
|
|
147
|
+
```sh
|
|
148
|
+
docker run --no-healthcheck -i --rm \
|
|
149
|
+
-v ~/skills:/vault:ro \
|
|
150
|
+
-v skillmux-data:/data \
|
|
151
|
+
ghcr.io/klhq/skillmux:latest serve --transport stdio
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
The container must keep standard input open, so use `-i`. Disable the baked
|
|
155
|
+
HTTP health check for stdio because no HTTP listener is started.
|
|
156
|
+
|
|
157
|
+
## Expose HTTP safely
|
|
158
|
+
|
|
159
|
+
The Skillmux CLI binds `127.0.0.1`. Docker binds `0.0.0.0` so
|
|
160
|
+
port mapping works. Before exposing the port beyond a trusted host:
|
|
161
|
+
|
|
162
|
+
```toml
|
|
163
|
+
[server]
|
|
164
|
+
hostname = "0.0.0.0"
|
|
165
|
+
auth_enabled = true
|
|
166
|
+
auth_token_env = "SKILLMUX_AUTH_TOKEN"
|
|
167
|
+
allowed_origins = []
|
|
168
|
+
|
|
169
|
+
[server.rate_limit]
|
|
170
|
+
enabled = true
|
|
171
|
+
requests_per_minute = 60
|
|
172
|
+
trust_proxy = false
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Set the token in the process environment:
|
|
176
|
+
|
|
177
|
+
```sh
|
|
178
|
+
export SKILLMUX_AUTH_TOKEN="replace-with-a-long-random-token"
|
|
179
|
+
skillmux serve --transport http
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Clients send:
|
|
183
|
+
|
|
184
|
+
```text
|
|
185
|
+
Authorization: Bearer replace-with-a-long-random-token
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
`allowed_origins` controls browser CORS requests. Requests without an `Origin`
|
|
189
|
+
header, including MCP clients and curl, do not need a CORS entry.
|
|
190
|
+
|
|
191
|
+
Keep `trust_proxy = false` unless a trusted reverse proxy overwrites
|
|
192
|
+
`X-Forwarded-For`. A client can spoof that header when it reaches Skillmux
|
|
193
|
+
directly.
|
|
194
|
+
|
|
195
|
+
## Health and metrics
|
|
196
|
+
|
|
197
|
+
The HTTP server provides:
|
|
198
|
+
|
|
199
|
+
| Endpoint | Purpose |
|
|
200
|
+
| --- | --- |
|
|
201
|
+
| `GET /health/live` | Process liveness |
|
|
202
|
+
| `GET /health/ready` | Vault, index, inference, and active capability |
|
|
203
|
+
| `GET /health` | Compatibility alias for liveness |
|
|
204
|
+
| `GET /metrics` | Prometheus text exposition |
|
|
205
|
+
| `GET /stats` | Aggregated routing outcomes for `skillmux report` |
|
|
206
|
+
| `POST /mcp` | Streamable HTTP MCP transport |
|
|
207
|
+
|
|
208
|
+
The Docker health check calls `/health/ready`.
|
|
209
|
+
|
|
210
|
+
Prometheus metrics cover request totals, resolve outcomes, latency, errors, and
|
|
211
|
+
rate-limit rejections. Health and metrics do not require bearer authentication,
|
|
212
|
+
but `/stats` does when server authentication is enabled. CORS still applies to
|
|
213
|
+
browser requests.
|
|
214
|
+
|
|
215
|
+
## Remote administration
|
|
216
|
+
|
|
217
|
+
Name a deployed server without storing its token:
|
|
218
|
+
|
|
219
|
+
```sh
|
|
220
|
+
skillmux context add prod \
|
|
221
|
+
--server https://skillmux.example.com \
|
|
222
|
+
--token-env SKILLMUX_PROD_ADMIN_TOKEN
|
|
223
|
+
skillmux context use prod
|
|
224
|
+
skillmux config status
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
The context stores the token environment variable name. Export its value in
|
|
228
|
+
the shell before running admin commands.
|
|
229
|
+
|
|
230
|
+
Enable the admin API and use a separate admin token in server configuration.
|
|
231
|
+
Read [CLI reference](cli.md#administrative-http-api-adminv1) for routes and
|
|
232
|
+
[Configuration](configuration.md#http-server) for reload behavior.
|
|
233
|
+
|
|
234
|
+
## Persistent data and backups
|
|
235
|
+
|
|
236
|
+
Persist `state_dir` to retain the index, audit log, and calibration evidence.
|
|
237
|
+
Skill content remains in the vault and should use its own backup or Git
|
|
238
|
+
workflow.
|
|
239
|
+
|
|
240
|
+
Treat the state database as sensitive because audit rows can contain raw user
|
|
241
|
+
queries. Stop the process or use SQLite-safe backup tooling before copying a
|
|
242
|
+
live database.
|
|
243
|
+
|
|
244
|
+
## Native pins with shared retrieval
|
|
245
|
+
|
|
246
|
+
For the combined topology, use one Git-backed vault source of truth: each
|
|
247
|
+
machine that manages native skills keeps its own checkout and runs the CLI;
|
|
248
|
+
the shared service mounts its own checkout for retrieval. Skillmux does not
|
|
249
|
+
pull, push, replicate, or otherwise keep those vault checkouts fresh—Git and
|
|
250
|
+
your deployment process own that responsibility.
|