@klhapp/skillmux 1.9.3 → 1.11.0
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 +46 -0
- package/README.md +19 -19
- package/docs/README.md +4 -4
- package/docs/assets/architecture-dark.svg +39 -32
- package/docs/assets/architecture-light.svg +25 -18
- package/docs/cli.md +147 -36
- package/docs/concepts.md +11 -11
- package/docs/configuration.md +7 -5
- package/docs/deployment.md +10 -6
- package/docs/getting-started.md +18 -14
- package/docs/mcp-routing.md +1 -1
- package/docs/skill-management.md +17 -11
- package/docs/troubleshooting.md +4 -4
- package/package.json +1 -1
- package/src/adapters.ts +157 -11
- package/src/cli.ts +396 -1319
- package/src/commands/audit.ts +53 -56
- package/src/commands/config.ts +33 -26
- package/src/commands/context.ts +104 -0
- package/src/commands/core.ts +7 -3
- package/src/commands/doctor.ts +97 -0
- package/src/commands/eval.ts +22 -15
- package/src/commands/init.ts +672 -0
- package/src/commands/install.ts +132 -0
- package/src/commands/local-vault.ts +60 -0
- package/src/commands/models.ts +10 -0
- package/src/commands/outdated.ts +2 -1
- package/src/commands/project.ts +194 -51
- package/src/commands/report.ts +66 -0
- package/src/commands/scan.ts +61 -0
- package/src/commands/shared.ts +7 -14
- package/src/commands/skill.ts +33 -0
- package/src/commands/sync.ts +232 -0
- package/src/commands/target.ts +45 -15
- package/src/commands/update.ts +2 -1
- package/src/completions.ts +41 -15
- package/src/config-service.ts +4 -54
- package/src/context.ts +8 -3
- package/src/db-audit.ts +286 -0
- package/src/db-index.ts +238 -0
- package/src/db.ts +3 -521
- package/src/global-flags.ts +46 -0
- package/src/init-agents.ts +329 -0
- package/src/init-instructions.ts +47 -28
- package/src/logger.ts +26 -0
- package/src/mcp-registration.ts +89 -0
- package/src/output.ts +80 -18
- package/src/prompts.ts +75 -20
- package/src/router-core.ts +8 -27
- package/src/scan.ts +19 -19
- package/src/server.ts +161 -14
- package/src/toml-writer.ts +51 -0
- package/src/init-clients.ts +0 -220
package/docs/cli.md
CHANGED
|
@@ -4,16 +4,19 @@ The Bun package and standalone Linux executable expose the same Skillmux CLI.
|
|
|
4
4
|
For Linux installation, use the [pinned checksum-verified download](getting-started.md#install-the-cli)
|
|
5
5
|
or, when provenance verification is required, the
|
|
6
6
|
[attested GitHub CLI path](getting-started.md#install-with-github-cli-attestation).
|
|
7
|
-
Native management belongs on the machine that owns the
|
|
7
|
+
Native management belongs on the machine that owns the agent skill directories:
|
|
8
8
|
use the built-in `local` target for `init`, `install`, pinning, and `sync`.
|
|
9
9
|
Named remote contexts administer shared-server configuration through its
|
|
10
10
|
administrative API only; they do not install, pin, synchronize, or otherwise
|
|
11
|
-
manage skill directories on remote
|
|
11
|
+
manage skill directories on remote agent machines.
|
|
12
12
|
|
|
13
13
|
In this guide, **local target** means the filesystem and process selected by
|
|
14
14
|
the built-in CLI context. It does not describe local inference. A local target
|
|
15
15
|
can call remote inference endpoints.
|
|
16
16
|
|
|
17
|
+
Run `skillmux --help` for the full command list, or `skillmux <command> --help`
|
|
18
|
+
(`-h` also works) for one command's usage and flags.
|
|
19
|
+
|
|
17
20
|
For task-oriented workflows, start with [Getting started](getting-started.md)
|
|
18
21
|
or [Managing skills](skill-management.md).
|
|
19
22
|
|
|
@@ -25,13 +28,31 @@ CLI. Its `skillmux --help` surface is intentionally limited to `serve`,
|
|
|
25
28
|
`skill which`, and read-only `config` inspection (`show`, `get`, `validate`,
|
|
26
29
|
`diff`, and `status`). Run `init`, `install`, pinning, `sync`, project or
|
|
27
30
|
target management, model downloads, contexts, and bare `eval` (vault ranking
|
|
28
|
-
evaluation, which needs
|
|
31
|
+
evaluation, which needs an embeddings client and the vault) on the host.
|
|
29
32
|
|
|
30
33
|
When the image rejects one of those commands, it exits with code 2. JSON mode
|
|
31
34
|
uses `CONTAINER_COMMAND_UNSUPPORTED` and includes `rejected_command`,
|
|
32
35
|
`recommended_host_command`, and a deployment-guide URL. See [the container
|
|
33
36
|
command contract](deployment.md#container-command-contract) for examples.
|
|
34
37
|
|
|
38
|
+
## Local-only commands and remote context rejection
|
|
39
|
+
|
|
40
|
+
Commands that operate directly on the local vault checkout reject `--context` and
|
|
41
|
+
`--server` (or a configured remote default context) with exit code 2. These 14
|
|
42
|
+
commands are local-only: `install`, `update`, `outdated`, `sync`, `core`,
|
|
43
|
+
`project`, `target`, `local-vault`, `index`, `models`, `scan`, `init`, `serve`,
|
|
44
|
+
and `skill which`.
|
|
45
|
+
|
|
46
|
+
When one of these commands receives a remote context, it exits with code 2.
|
|
47
|
+
Human-mode output reports:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
error: `<command>` operates on the local vault only; --context/--server isn't supported here
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
In `--json` mode, the CLI emits a structured error envelope with `code: "REMOTE_CONTEXT_UNSUPPORTED"`
|
|
54
|
+
and includes `rejected_command`.
|
|
55
|
+
|
|
35
56
|
## Global options and target resolution
|
|
36
57
|
|
|
37
58
|
Every target-aware command resolves its execution target deterministically in this order:
|
|
@@ -52,6 +73,27 @@ Every target-aware command resolves its execution target deterministically in th
|
|
|
52
73
|
| `--allow-insecure` | Allow plaintext HTTP admin requests to non-loopback addresses |
|
|
53
74
|
| `--verbose` | Output diagnostic stack traces for errors |
|
|
54
75
|
|
|
76
|
+
`--context`/`--server` selects which Skillmux admin instance a command talks to
|
|
77
|
+
over `/admin/v1/*` — nothing more. That's one of three independent axes in this
|
|
78
|
+
system:
|
|
79
|
+
|
|
80
|
+
1. Which vault checkout backs Core/Project pinning — always a local Git checkout
|
|
81
|
+
on the machine running the CLI. `install`/`update`/`sync`/`core`/`project`/
|
|
82
|
+
`target`/`local-vault`/`index`/`models`/`scan`/`init`/`outdated`/`serve`/
|
|
83
|
+
`skill which` operate on it. There is no remote version of this — Git and the
|
|
84
|
+
deployment process move content between checkouts, not Skillmux's own
|
|
85
|
+
commands.
|
|
86
|
+
2. Which MCP server an agent queries for Routed retrieval — the agent's own MCP
|
|
87
|
+
client configuration (local stdio vs. remote HTTP), entirely separate from
|
|
88
|
+
`skillmux context`.
|
|
89
|
+
3. Which Skillmux instance the CLI's admin commands act on — `config`, `report`,
|
|
90
|
+
`audit prune`, `eval`/`eval promote`, and `doctor`. This is the only thing
|
|
91
|
+
`--context`/`--server` actually selects.
|
|
92
|
+
|
|
93
|
+
The commands above belong entirely to axis 1. `--context` has no meaning for
|
|
94
|
+
them — not "risky," a category error, the same way `--context prod` wouldn't
|
|
95
|
+
mean anything on `ls`.
|
|
96
|
+
|
|
55
97
|
---
|
|
56
98
|
|
|
57
99
|
## Context management (`skillmux context`)
|
|
@@ -119,59 +161,79 @@ The JSON response contains no credential, API-key, or token values.
|
|
|
119
161
|
|
|
120
162
|
`config init` writes only `vault_path`. It leaves an existing config unchanged
|
|
121
163
|
and does not add `local_vault_paths`. Remote contexts administer the deployed
|
|
122
|
-
server configuration; they never administer
|
|
123
|
-
sync, or any other remote-
|
|
164
|
+
server configuration; they never administer agent skill installation, pins,
|
|
165
|
+
sync, or any other remote-agent directory operation.
|
|
124
166
|
|
|
125
167
|
---
|
|
126
168
|
|
|
127
169
|
## Setup planner (`skillmux init`)
|
|
128
170
|
|
|
129
171
|
Run `skillmux init` with no arguments in a terminal to start guided setup.
|
|
130
|
-
|
|
131
|
-
|
|
172
|
+
On a machine with no config yet, it first asks for the skill vault path
|
|
173
|
+
(defaulting to `~/skills`) rather than assuming it silently — the vault
|
|
174
|
+
must already exist there (`skillmux scan`/`install` create it). Skillmux
|
|
175
|
+
preselects agents it can detect from filesystem evidence, asks for core
|
|
176
|
+
skills, prints one complete review, and applies after one confirmation.
|
|
132
177
|
The prompt stays line-oriented and does not use an alternate terminal screen.
|
|
133
178
|
|
|
134
|
-
Select
|
|
179
|
+
Select agents by product name:
|
|
135
180
|
|
|
136
181
|
```sh
|
|
137
|
-
skillmux init --
|
|
138
|
-
skillmux init --
|
|
182
|
+
skillmux init --agent claude-code --agent codex --core csv-formatter --dry-run
|
|
183
|
+
skillmux init --agent claude-code --agent codex --core csv-formatter --yes
|
|
139
184
|
```
|
|
140
185
|
|
|
141
|
-
Skillmux supports these
|
|
186
|
+
Skillmux supports these agent IDs:
|
|
142
187
|
|
|
143
|
-
|
|
|
188
|
+
| Agent | Skill delivery |
|
|
144
189
|
|--------|----------------|
|
|
145
190
|
| `claude-code` | `~/.claude/skills` |
|
|
146
191
|
| `codex` | `$CODEX_HOME/skills`, falling back to `~/.codex/skills` |
|
|
147
|
-
| `
|
|
192
|
+
| `opencode`, `github-copilot`, `windsurf` | Shared `~/.agents/skills` surface |
|
|
148
193
|
| `antigravity` | `~/.gemini/config/skills` |
|
|
149
194
|
| `goose`, `hermes` | Manual full-vault configuration |
|
|
150
|
-
| `skillmux-mcp` | Manual MCP registration |
|
|
151
195
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
196
|
+
There's no agent ID for "just MCP" — pass `--show-mcp-setup` to also print
|
|
197
|
+
the MCP registration snippet, independent of which (if any) agents you
|
|
198
|
+
select. A tool not in this table isn't supported by `init` yet; for an
|
|
199
|
+
arbitrary directory not tied to any supported agent, use `skillmux target
|
|
200
|
+
add <name> --dir <dir> --yes` directly instead of `init`.
|
|
201
|
+
|
|
202
|
+
`--show-mcp-setup` only prints the snippet; it never registers anything.
|
|
203
|
+
For `claude-code` and `codex`, `--register-mcp` goes further and runs that
|
|
204
|
+
agent's own CLI (`claude mcp add` / `codex mcp add`) to register skillmux as
|
|
205
|
+
an MCP server directly, so you don't have to paste the snippet yourself. In
|
|
206
|
+
guided mode, if any selected agent supports it, skillmux asks before
|
|
207
|
+
registering; noninteractive runs only register when `--register-mcp` is
|
|
208
|
+
passed explicitly. It is a no-op for agents with no known registration
|
|
209
|
+
command (skip it and use `--show-mcp-setup` instead).
|
|
210
|
+
|
|
211
|
+
The managed instruction block only teaches an agent to call `resolve_skill`/
|
|
212
|
+
`fetch_skill` (MCP tools), so `init` only writes it for an agent actually
|
|
213
|
+
getting MCP this run — one you passed `--register-mcp` for, or any agent at
|
|
214
|
+
all when `--show-mcp-setup` is set. A purely native run (neither flag) writes
|
|
215
|
+
no instruction files, by design; `--no-instructions` forces that off even
|
|
216
|
+
when MCP flags are present.
|
|
155
217
|
|
|
156
218
|
`--dry-run` prints the config, target, instruction, and core plan without
|
|
157
219
|
prompting or writing. `--json` emits one schema-versioned plan or result
|
|
158
220
|
object. Noninteractive writes require `--yes`. `--interactive` forces the
|
|
159
|
-
wizard and seeds it with supplied flags. `--no-
|
|
160
|
-
|
|
221
|
+
wizard and seeds it with supplied flags. `--no-sync` saves setup without
|
|
222
|
+
materializing links.
|
|
161
223
|
|
|
162
224
|
Skillmux rejects a target that currently links to the whole vault. Convert it
|
|
163
225
|
only after reviewing the smaller post-sync skill set:
|
|
164
226
|
|
|
165
227
|
```sh
|
|
166
|
-
skillmux init --
|
|
228
|
+
skillmux init --agent claude-code --migrate-full-vault \
|
|
167
229
|
--core csv-formatter --dry-run
|
|
168
|
-
skillmux init --
|
|
230
|
+
skillmux init --agent claude-code --migrate-full-vault \
|
|
169
231
|
--core csv-formatter --yes
|
|
170
232
|
```
|
|
171
233
|
|
|
172
|
-
|
|
234
|
+
Agent instruction adapters append one managed discovery block and preserve
|
|
173
235
|
the rest of each file. Skillmux uses `.hermes.md` for Hermes and refuses
|
|
174
|
-
`SOUL.md` or Hermes's installed-source `AGENTS.md`.
|
|
236
|
+
`SOUL.md` or Hermes's installed-source `AGENTS.md`. An agent without a safe
|
|
175
237
|
user-level convention reports manual setup.
|
|
176
238
|
|
|
177
239
|
---
|
|
@@ -188,24 +250,35 @@ Skillmux resolves the project directory from an explicit positional path, then
|
|
|
188
250
|
the current Git root, then the current directory. It suggests the directory
|
|
189
251
|
basename as the project-group name.
|
|
190
252
|
|
|
191
|
-
The noninteractive form accepts repeatable
|
|
253
|
+
The noninteractive form accepts repeatable agent and skill flags:
|
|
192
254
|
|
|
193
255
|
```sh
|
|
194
256
|
skillmux project init ~/code/skillmux \
|
|
195
257
|
--name skillmux \
|
|
196
|
-
--
|
|
197
|
-
--
|
|
258
|
+
--agent claude-code \
|
|
259
|
+
--agent codex \
|
|
198
260
|
--skill sdd-tdd \
|
|
199
261
|
--skill code-context \
|
|
200
262
|
--yes
|
|
201
263
|
```
|
|
202
264
|
|
|
203
|
-
`--
|
|
265
|
+
`--agent` maps product names to configured, deduplicated targets. Advanced
|
|
204
266
|
callers can attach a configured target with repeated `--target <name>`.
|
|
205
267
|
Re-running the command merges missing paths, skills, and target attachments.
|
|
206
268
|
It validates the complete manifest before an atomic write and runs `sync` by
|
|
207
269
|
default. Use `--no-sync` when another process will materialize the links.
|
|
208
270
|
|
|
271
|
+
`--register-mcp` is the project-local counterpart to `skillmux init
|
|
272
|
+
--register-mcp`, narrowed to `claude-code` — the only agent whose own CLI
|
|
273
|
+
has a project MCP scope (`codex mcp add` has no scope flag at all, so codex
|
|
274
|
+
stays global-only regardless). It runs `claude mcp add -s project` with this
|
|
275
|
+
project directory as the working directory, which writes a committed
|
|
276
|
+
`.mcp.json` shared with your team rather than the global, personal
|
|
277
|
+
registration `skillmux init` makes. Same instruction-writing rule as `init`:
|
|
278
|
+
a project-root `CLAUDE.md` is written only for an agent actually getting
|
|
279
|
+
registered this run, never unconditionally. Guided mode asks before
|
|
280
|
+
registering, when the selected agents include one that supports it.
|
|
281
|
+
|
|
209
282
|
Direct project commands support later maintenance:
|
|
210
283
|
|
|
211
284
|
```sh
|
|
@@ -215,13 +288,13 @@ skillmux project add-path skillmux ~/code/skillmux --yes
|
|
|
215
288
|
skillmux project remove-path skillmux ~/old/skillmux --yes
|
|
216
289
|
skillmux project pin skillmux sdd-tdd code-context --yes
|
|
217
290
|
skillmux project unpin skillmux old-skill --yes
|
|
218
|
-
skillmux project attach skillmux --
|
|
291
|
+
skillmux project attach skillmux --agent claude-code --agent codex --yes
|
|
219
292
|
skillmux project detach skillmux --target codex --yes
|
|
220
293
|
```
|
|
221
294
|
|
|
222
295
|
`add-path` and `remove-path` detect the current Git root when the path is
|
|
223
|
-
omitted.
|
|
224
|
-
|
|
296
|
+
omitted. Agent attachments map to configured physical targets and deduplicate
|
|
297
|
+
agents that share `~/.agents/skills`. Mutating commands validate the complete
|
|
225
298
|
manifest and replace it atomically. Run `skillmux sync` after direct
|
|
226
299
|
maintenance commands to materialize the new state.
|
|
227
300
|
|
|
@@ -229,7 +302,7 @@ maintenance commands to materialize the new state.
|
|
|
229
302
|
|
|
230
303
|
## Advanced targets (`skillmux target`)
|
|
231
304
|
|
|
232
|
-
Most users should select products with `init --
|
|
305
|
+
Most users should select products with `init --agent`. Use `target` commands
|
|
233
306
|
for custom delivery directories and manifest inspection:
|
|
234
307
|
|
|
235
308
|
```sh
|
|
@@ -286,6 +359,11 @@ Show which root actually serves a skill_id, and every root it shadows:
|
|
|
286
359
|
skillmux skill which csv-formatter
|
|
287
360
|
```
|
|
288
361
|
|
|
362
|
+
> [!NOTE]
|
|
363
|
+
> `skill which` performs local vault-checkout shadow resolution (which root
|
|
364
|
+
> wins on the local filesystem) and is unrelated to semantic MCP skill routing
|
|
365
|
+
> (`resolve_skill`/`fetch_skill`).
|
|
366
|
+
|
|
289
367
|
---
|
|
290
368
|
|
|
291
369
|
## Observability and evaluation (`skillmux report`, `audit`, `eval`)
|
|
@@ -311,7 +389,7 @@ skillmux audit prune --older-than 30d --json
|
|
|
311
389
|
# Promote observed, correlated fetches into an eval case file
|
|
312
390
|
skillmux eval promote --since 7d --dry-run
|
|
313
391
|
skillmux eval promote --since 7d --yes
|
|
314
|
-
skillmux eval promote --since 7d --
|
|
392
|
+
skillmux eval promote --since 7d --out eval/observed.json --yes
|
|
315
393
|
```
|
|
316
394
|
|
|
317
395
|
`report` reads `--server <url>`, `--db <path>` (an explicit SQLite file,
|
|
@@ -336,7 +414,7 @@ manual pruning is for on-demand cleanup or a tighter window.
|
|
|
336
414
|
|
|
337
415
|
`eval promote` reads correlated fetches since `--since`, deduplicates them by
|
|
338
416
|
normalized query, and writes `{ query, split: "observed", relevant_skill_ids
|
|
339
|
-
}` cases to `--
|
|
417
|
+
}` cases to `--out` (or deprecated alias `--target`; default an `eval-observed.json` file under
|
|
340
418
|
`state_dir`; never the hand-curated `eval/queries.json` unless given
|
|
341
419
|
explicitly). It never rewrites a case for a query already present in the
|
|
342
420
|
target file; skipped counts are reported in the summary. Because promoted
|
|
@@ -352,12 +430,12 @@ The HTTP server has two separate surfaces:
|
|
|
352
430
|
| Surface | User | Purpose | CLI required |
|
|
353
431
|
| --- | --- | --- | --- |
|
|
354
432
|
| `/mcp` | AI clients | Resolve and fetch skills | No |
|
|
355
|
-
| `/admin/v1/*` | Operators | Inspect
|
|
433
|
+
| `/admin/v1/*` (and `GET /stats`) | Operators | Inspect/update config, stats, audit prune, evaluation, and remote diagnostics | Yes, when using named CLI contexts |
|
|
356
434
|
|
|
357
435
|
The MCP bearer token applies only to `/mcp`. The administrative bearer token
|
|
358
|
-
below applies only to `/admin/v1
|
|
436
|
+
below applies only to `/admin/v1/*` (and `GET /stats`); neither credential grants access to the
|
|
359
437
|
other surface. Named contexts use the latter to administer the deployed server,
|
|
360
|
-
not any remote
|
|
438
|
+
not any remote agent skill directory.
|
|
361
439
|
|
|
362
440
|
Remote servers expose administrative control endpoints under `/admin/v1/*` when enabled in configuration:
|
|
363
441
|
|
|
@@ -374,6 +452,30 @@ Requests require `Authorization: Bearer <token>` where `<token>` matches the env
|
|
|
374
452
|
| `/admin/v1/capabilities` | `GET` | Advertises server features (`config_read`, `config_write`, `persistence`) |
|
|
375
453
|
| `/admin/v1/config` | `GET` | Returns desired/effective config, sources, and `ETag` revision hash |
|
|
376
454
|
| `/admin/v1/config` | `PATCH` | Applies dotted-key updates; requires matching `If-Match` header |
|
|
455
|
+
| `/admin/v1/audit/prune` | `POST` | Prunes audit/fetch/admin_audit rows older than cutoff; requires `confirm: true` unless `dry_run: true` |
|
|
456
|
+
| `/admin/v1/eval` | `POST` | Runs vault ranking evaluation server-side and returns `EvalReport` |
|
|
457
|
+
| `/admin/v1/eval/promote` | `POST` | Returns candidate promoted eval cases from the server's audit database; requires `since` |
|
|
458
|
+
|
|
459
|
+
### Remote command capabilities
|
|
460
|
+
|
|
461
|
+
Named CLI contexts (`--context <name>` or `--server <url>`) support the following administrative and diagnostic operations:
|
|
462
|
+
|
|
463
|
+
- `skillmux config` (`show`, `get`, `set`, `validate`, `diff`, `status`): inspect and modify remote server configuration over `/admin/v1/*`.
|
|
464
|
+
- `skillmux report --since <window>`: fetches usage and retrieval metrics from the remote server's `GET /stats`.
|
|
465
|
+
- `skillmux audit prune [--older-than <window>] [--dry-run] [--yes]`: prunes or dry-run counts audit records on the remote server via `POST /admin/v1/audit/prune`.
|
|
466
|
+
- `skillmux eval`: executes ranking evaluation against the remote server's in-process runtime via `POST /admin/v1/eval`.
|
|
467
|
+
- `skillmux eval promote --since <window>`: fetches promotable candidates from the remote server's audit db via `POST /admin/v1/eval/promote`, dedups against the local fixture file, and writes locally.
|
|
468
|
+
- `skillmux doctor`: inspects remote server status, readiness, deployment runtime, and capabilities without requiring local vault access.
|
|
469
|
+
|
|
470
|
+
---
|
|
471
|
+
|
|
472
|
+
## Color
|
|
473
|
+
|
|
474
|
+
Interactive terminal output uses a small amount of color: red for error
|
|
475
|
+
messages, yellow for `warning:` lines, green/red for `doctor`'s `ok`/`fail`
|
|
476
|
+
checks, and bold table headers. Color is automatic — it's on only when
|
|
477
|
+
stdout is a TTY and off whenever `NO_COLOR` is set or output is piped or
|
|
478
|
+
redirected. `--json` output never includes color codes.
|
|
377
479
|
|
|
378
480
|
---
|
|
379
481
|
|
|
@@ -385,12 +487,21 @@ When `--json` or `SKILLMUX_JSON=true` is set, all output is emitted to `stdout`
|
|
|
385
487
|
{
|
|
386
488
|
"schema_version": 1,
|
|
387
489
|
"ok": true,
|
|
490
|
+
"context": "local",
|
|
388
491
|
"target": "local",
|
|
389
492
|
"data": { ... },
|
|
390
493
|
"error": null
|
|
391
494
|
}
|
|
392
495
|
```
|
|
393
496
|
|
|
497
|
+
The `context` field identifies the execution context (`"local"` or `{ "name": "<context>", "server": "<url>" }`). The `target` field carries identical content but is deprecated and slated for removal in the next major version; consumers should read `context`.
|
|
498
|
+
|
|
499
|
+
`skillmux init` additionally repeats its payload as deprecated top-level
|
|
500
|
+
`command`, `phase`, `dry_run`, `applied`, `plan`, and `result` keys, which
|
|
501
|
+
predate this envelope. They carry exactly the same content as `data` and are
|
|
502
|
+
kept only so existing automation keeps working. Read `data` instead; the
|
|
503
|
+
duplicated keys will be removed in the next major version.
|
|
504
|
+
|
|
394
505
|
### Exit codes
|
|
395
506
|
|
|
396
507
|
| Code | Meaning | Examples |
|
package/docs/concepts.md
CHANGED
|
@@ -5,7 +5,7 @@ Skillmux separates three decisions:
|
|
|
5
5
|
| Decision | Choices |
|
|
6
6
|
| --- | --- |
|
|
7
7
|
| Skill delivery | Native core/project pins or routed MCP retrieval |
|
|
8
|
-
| Process location | On the
|
|
8
|
+
| Process location | On the agent machine or as a shared HTTP service |
|
|
9
9
|
| Packaging | Skillmux CLI installation or Skillmux server deployment |
|
|
10
10
|
|
|
11
11
|
Retrieval capability is a fourth, independent concern: lexical, hybrid,
|
|
@@ -25,7 +25,7 @@ The default vault checkout path is `~/skills`. Set `vault_path` in
|
|
|
25
25
|
`~/.config/skillmux/config.toml` when its checkout lives elsewhere. On one
|
|
26
26
|
machine, `~/skills` can be both the vault source of truth and its checkout.
|
|
27
27
|
In a shared topology, use a Git-backed vault source of truth, a checkout on
|
|
28
|
-
each
|
|
28
|
+
each agent machine for the Skillmux CLI, and a checkout on the server for
|
|
29
29
|
Skillmux server. Skillmux does not pull, push, replicate, or determine
|
|
30
30
|
freshness between checkouts; Git and the deployment process own those jobs.
|
|
31
31
|
|
|
@@ -45,7 +45,7 @@ Skillmux applies three policies to one vault checkout:
|
|
|
45
45
|
|
|
46
46
|
| Tier | Scope | Delivery |
|
|
47
47
|
| --- | --- | --- |
|
|
48
|
-
| Core | Each configured target | Native
|
|
48
|
+
| Core | Each configured target | Native agent skill directory |
|
|
49
49
|
| Project | Selected project paths and targets | Project-local native skill directory |
|
|
50
50
|
| Routed | Full indexed vault | MCP on demand |
|
|
51
51
|
|
|
@@ -55,7 +55,7 @@ one.
|
|
|
55
55
|
|
|
56
56
|
One skill can serve different roles across machines or projects, but the
|
|
57
57
|
shared manifest prevents conflicting core and project assignments. Core stays
|
|
58
|
-
capped at 25 skills to protect
|
|
58
|
+
capped at 25 skills to protect agent startup context.
|
|
59
59
|
|
|
60
60
|
Delivery tiers do not select a deployment. A local Skillmux process can serve
|
|
61
61
|
routed skills over stdio, while a shared Skillmux process can serve its server
|
|
@@ -66,7 +66,7 @@ checkout over HTTP.
|
|
|
66
66
|
```mermaid
|
|
67
67
|
flowchart TD
|
|
68
68
|
V[Git-backed vault source of truth]
|
|
69
|
-
V -->|
|
|
69
|
+
V -->|agent checkout| CLI[Skillmux CLI]
|
|
70
70
|
V -->|server checkout| SRV[Skillmux server]
|
|
71
71
|
CLI --> NM[Native management: filesystem links]
|
|
72
72
|
CLI --> LM[Local MCP: stdio]
|
|
@@ -75,7 +75,7 @@ flowchart TD
|
|
|
75
75
|
|
|
76
76
|
| Topology | Process location | Transport | Typical installation |
|
|
77
77
|
| --- | --- | --- | --- |
|
|
78
|
-
| Native management |
|
|
78
|
+
| Native management | Agent machine | Filesystem links | Skillmux CLI |
|
|
79
79
|
| Local MCP | Beside one client | stdio | Skillmux CLI |
|
|
80
80
|
| Shared MCP | Server or container host | Streamable HTTP | Skillmux server (full image) |
|
|
81
81
|
|
|
@@ -94,12 +94,12 @@ An HTTP server has two separate surfaces:
|
|
|
94
94
|
| Surface | User | Purpose | CLI required |
|
|
95
95
|
| --- | --- | --- | --- |
|
|
96
96
|
| `/mcp` | AI clients | Resolve and fetch skills | No |
|
|
97
|
-
| `/admin/v1/*` | Operators | Inspect
|
|
97
|
+
| `/admin/v1/*` (and `GET /stats`) | Operators | Inspect/update config, stats, audit prune, evaluation, and remote diagnostics | Yes, when using named CLI contexts |
|
|
98
98
|
|
|
99
99
|
MCP authentication protects `/mcp`; administrative authentication protects
|
|
100
100
|
`/admin/v1/*`. Their bearer tokens are distinct and do not grant access across
|
|
101
101
|
surfaces. A named CLI context is an operator connection to the deployed server,
|
|
102
|
-
not a way to manage skill directories on remote
|
|
102
|
+
not a way to manage skill directories on remote agent machines. The server
|
|
103
103
|
and its full/slim images never manage host agent directories. See
|
|
104
104
|
[Deployment](deployment.md#http-surfaces).
|
|
105
105
|
|
|
@@ -109,13 +109,13 @@ package downloads and caches GTE-small when local inference first loads it;
|
|
|
109
109
|
`skillmux models download` prefetches it. Neither Skillmux server image
|
|
110
110
|
bundles a local reranker; configure one remotely when needed.
|
|
111
111
|
|
|
112
|
-
##
|
|
112
|
+
## Agents and targets
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
An **agent** is a supported product name such as `claude-code` or `codex`.
|
|
115
115
|
Skillmux maps it to the product's skill directory and safe instruction-file
|
|
116
116
|
conventions.
|
|
117
117
|
|
|
118
|
-
A **target** is a physical directory managed by sync. Several
|
|
118
|
+
A **target** is a physical directory managed by sync. Several agents can map
|
|
119
119
|
to one target. Gemini CLI, OpenCode, GitHub Copilot, and Windsurf share
|
|
120
120
|
`~/.agents/skills`, so Skillmux deduplicates that directory.
|
|
121
121
|
|
package/docs/configuration.md
CHANGED
|
@@ -184,7 +184,7 @@ The HTTP server provides separate MCP and administrative surfaces:
|
|
|
184
184
|
| Surface | User | Purpose | CLI required |
|
|
185
185
|
| --- | --- | --- | --- |
|
|
186
186
|
| `/mcp` | AI clients | Resolve and fetch skills | No |
|
|
187
|
-
| `/admin/v1/*` | Operators | Inspect
|
|
187
|
+
| `/admin/v1/*` (and `GET /stats`) | Operators | Inspect/update config, stats, audit prune, evaluation, and remote diagnostics | Yes, when using named CLI contexts |
|
|
188
188
|
|
|
189
189
|
```toml
|
|
190
190
|
[server]
|
|
@@ -216,7 +216,7 @@ Before exposing HTTP beyond localhost, set `hostname` to a reachable interface,
|
|
|
216
216
|
calling `/admin/v1/*` when that API is enabled. Do not reuse or imply either
|
|
217
217
|
token authorizes the other surface. Named CLI contexts use the administrative
|
|
218
218
|
token to inspect or update the deployed server configuration only; they cannot
|
|
219
|
-
install, pin, synchronize, or otherwise manage remote
|
|
219
|
+
install, pin, synchronize, or otherwise manage remote agent skill directories.
|
|
220
220
|
Docker images likewise do not manage host agent directories.
|
|
221
221
|
Inside the server image, only read-only `config show`, `get`, `validate`,
|
|
222
222
|
`diff`, and `status` are available. Run `config init` or `config set` with the
|
|
@@ -299,7 +299,7 @@ project_groups = ["repo1"] # which [project.*] groups materialize into
|
|
|
299
299
|
- `[core].skills`: symlinked into every `[targets.*]` dir on `sync`. Capped at 25 skills; `sync` fails if a listed skill id isn't actually in the vault.
|
|
300
300
|
- `[project.<group>].skills`: symlinked only into `<path>/<relative path from $HOME to the target dir>`, for each `paths` entry, and only for targets whose `project_groups` names that group. `paths` entries must resolve under `$HOME` (that's how the pin path is derived). A skill can't appear in both `[core]` and the same `[project.*]` group.
|
|
301
301
|
- `[project.<group>].paths` can list the same project's checkout on more than one machine (e.g. `["/home/alice/code/repo1", "/Users/alice/code/repo1"]`). `sync` silently skips any entry that doesn't exist on the machine it's running on (see below), so one shared manifest can span machines with different checkout locations without needing per-machine manifests.
|
|
302
|
-
- `[targets.<name>]`: one entry per adopted surface. `skillmux init --
|
|
302
|
+
- `[targets.<name>]`: one entry per adopted surface. `skillmux init --agent <name> --yes` writes these for each supported agent and scopes newly added targets to the current hostname; `skillmux target add <name> --dir <dir> --yes` writes one directly for a directory not tied to any supported agent. Hand-editing is fine as long as `sync` is still allowed to own the directory (see below). An optional `host` limits the target to an exact machine-hostname match; omit it for a global, backward-compatible target. A host mismatch is reported and skipped before any target filesystem operation. `project_groups` is an explicit list, not a boolean: a target only receives the specific groups it names, never every group in the manifest.
|
|
303
303
|
|
|
304
304
|
**Pin/unpin without hand-editing.** `skillmux core pin`/`unpin` mutate `[core]` for you, and `skillmux project pin`/`unpin` mutate `[project.*]`, validating with the same rules `sync` enforces (skill must resolve from `vault_path`, no duplicate pins, `[core]` stays under the 25-skill cap) before writing anything:
|
|
305
305
|
|
|
@@ -338,8 +338,10 @@ content, and rejects a desired skill that collides with an unmanaged entry
|
|
|
338
338
|
before changing anything.
|
|
339
339
|
|
|
340
340
|
`sync` refuses to touch a directory that exists but has no marker; run
|
|
341
|
-
`skillmux init --
|
|
342
|
-
|
|
341
|
+
`skillmux init --agent <name> --yes` (or `skillmux target add <name> --dir
|
|
342
|
+
<dir> --yes` for a directory not tied to any supported agent) first, which
|
|
343
|
+
either creates the directory fresh or adopts an existing one in place
|
|
344
|
+
(contents untouched).
|
|
343
345
|
`sync --restore-monolith` likewise refuses a `local_vault` marker or any
|
|
344
346
|
unmanaged target content before replacing a target directory with a symlink
|
|
345
347
|
to the vault.
|
package/docs/deployment.md
CHANGED
|
@@ -180,7 +180,7 @@ The shared server exposes two distinct HTTP surfaces:
|
|
|
180
180
|
| Surface | User | Purpose | CLI required |
|
|
181
181
|
| --- | --- | --- | --- |
|
|
182
182
|
| `/mcp` | AI clients | Resolve and fetch skills | No |
|
|
183
|
-
| `/admin/v1/*` | Operators | Inspect
|
|
183
|
+
| `/admin/v1/*` (and `GET /stats`) | Operators | Inspect/update config, stats, audit prune, evaluation, and remote diagnostics | Yes, when using named CLI contexts |
|
|
184
184
|
|
|
185
185
|
Configure and distribute separate bearer tokens. An MCP token authenticates an
|
|
186
186
|
AI client to `/mcp` only; an administrative token authenticates an operator to
|
|
@@ -280,6 +280,9 @@ skillmux context add prod \
|
|
|
280
280
|
--token-env SKILLMUX_PROD_ADMIN_TOKEN
|
|
281
281
|
skillmux context use prod
|
|
282
282
|
skillmux config status
|
|
283
|
+
skillmux --context prod report --since 7d
|
|
284
|
+
skillmux --context prod audit prune --dry-run
|
|
285
|
+
skillmux --context prod doctor
|
|
283
286
|
```
|
|
284
287
|
|
|
285
288
|
The context stores the token environment variable name. Export its value in
|
|
@@ -291,11 +294,12 @@ Enable the admin API and use a separate admin token in server configuration.
|
|
|
291
294
|
Read [CLI reference](cli.md#administrative-http-api-adminv1) for routes and
|
|
292
295
|
[Configuration](configuration.md#http-server) for reload behavior.
|
|
293
296
|
|
|
294
|
-
Named contexts administer the deployed server
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
Named contexts administer the deployed server only — configuration, stats,
|
|
298
|
+
audit prune, evaluation, and remote diagnostics. They do not install, pin,
|
|
299
|
+
synchronize, or otherwise manage skill directories on remote agent machines.
|
|
300
|
+
Run those filesystem-management commands through Skillmux CLI on the machine
|
|
301
|
+
that owns the directories. The full and slim server images read their mounted
|
|
302
|
+
vault checkout and do not manage host agent directories.
|
|
299
303
|
|
|
300
304
|
## Persistent data and backups
|
|
301
305
|
|
package/docs/getting-started.md
CHANGED
|
@@ -6,7 +6,7 @@ an installation.
|
|
|
6
6
|
```mermaid
|
|
7
7
|
flowchart LR
|
|
8
8
|
Q{What do you need?}
|
|
9
|
-
Q -->|Managed links in
|
|
9
|
+
Q -->|Managed links in agent skill directories| A[Manage native skills]
|
|
10
10
|
Q -->|Local stdio MCP| B[Add local MCP retrieval]
|
|
11
11
|
Q -->|Streamable HTTP MCP for several clients| C[Run a shared MCP service]
|
|
12
12
|
A --> A1[Skillmux CLI]
|
|
@@ -16,7 +16,7 @@ flowchart LR
|
|
|
16
16
|
|
|
17
17
|
| Goal | Skill delivery | Recommended installation |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| [Manage native skills](#manage-native-skills) | Managed links in
|
|
19
|
+
| [Manage native skills](#manage-native-skills) | Managed links in agent skill directories | Skillmux CLI |
|
|
20
20
|
| [Add local MCP retrieval](#add-local-mcp-retrieval) | Local stdio MCP | Skillmux CLI |
|
|
21
21
|
| [Run a shared MCP service](#run-a-shared-mcp-service) | Streamable HTTP MCP | Skillmux server (full image) |
|
|
22
22
|
|
|
@@ -122,7 +122,7 @@ Run `skillmux scan ~/skills` before adopting an existing collection.
|
|
|
122
122
|
|
|
123
123
|
## Manage native skills
|
|
124
124
|
|
|
125
|
-
Run the guided setup on the machine that owns the
|
|
125
|
+
Run the guided setup on the machine that owns the agent skill directories:
|
|
126
126
|
|
|
127
127
|
```sh
|
|
128
128
|
skillmux init
|
|
@@ -131,7 +131,7 @@ skillmux init
|
|
|
131
131
|
The planner:
|
|
132
132
|
|
|
133
133
|
1. validates the vault;
|
|
134
|
-
2. detects
|
|
134
|
+
2. detects agents from filesystem evidence;
|
|
135
135
|
3. asks which skills belong in the core tier;
|
|
136
136
|
4. shows the config, target, instruction, and sync plan;
|
|
137
137
|
5. applies the plan after confirmation.
|
|
@@ -145,14 +145,14 @@ Use explicit flags for automation:
|
|
|
145
145
|
|
|
146
146
|
```sh
|
|
147
147
|
skillmux init \
|
|
148
|
-
--
|
|
149
|
-
--
|
|
148
|
+
--agent claude-code \
|
|
149
|
+
--agent codex \
|
|
150
150
|
--core csv-formatter \
|
|
151
151
|
--dry-run
|
|
152
152
|
|
|
153
153
|
skillmux init \
|
|
154
|
-
--
|
|
155
|
-
--
|
|
154
|
+
--agent claude-code \
|
|
155
|
+
--agent codex \
|
|
156
156
|
--core csv-formatter \
|
|
157
157
|
--yes
|
|
158
158
|
```
|
|
@@ -172,13 +172,13 @@ root:
|
|
|
172
172
|
skillmux project init
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
-
The noninteractive form accepts repeatable
|
|
175
|
+
The noninteractive form accepts repeatable agent and skill flags:
|
|
176
176
|
|
|
177
177
|
```sh
|
|
178
178
|
skillmux project init ~/code/my-project \
|
|
179
179
|
--name my-project \
|
|
180
|
-
--
|
|
181
|
-
--
|
|
180
|
+
--agent claude-code \
|
|
181
|
+
--agent codex \
|
|
182
182
|
--skill code-context \
|
|
183
183
|
--yes
|
|
184
184
|
```
|
|
@@ -225,6 +225,10 @@ Register it with your MCP client:
|
|
|
225
225
|
The client launches the process and closes it with the MCP session. Continue
|
|
226
226
|
with [MCP routing](mcp-routing.md) for client behavior and ranked candidate retrieval.
|
|
227
227
|
|
|
228
|
+
For `claude-code` and `codex`, `skillmux init --register-mcp` runs this
|
|
229
|
+
registration for you via the agent's own CLI instead of editing config by
|
|
230
|
+
hand — see [Setup planner](cli.md#setup-planner-skillmux-init).
|
|
231
|
+
|
|
228
232
|
## Run a shared MCP service
|
|
229
233
|
|
|
230
234
|
Use the full image when you want local embeddings without configuring an
|
|
@@ -261,12 +265,12 @@ The server keeps its two HTTP surfaces separate:
|
|
|
261
265
|
| Surface | User | Purpose | CLI required |
|
|
262
266
|
| --- | --- | --- | --- |
|
|
263
267
|
| `/mcp` | AI clients | Resolve and fetch skills | No |
|
|
264
|
-
| `/admin/v1/*` | Operators | Inspect
|
|
268
|
+
| `/admin/v1/*` (and `GET /stats`) | Operators | Inspect/update config, stats, audit prune, evaluation, and remote diagnostics | Yes, when using named CLI contexts |
|
|
265
269
|
|
|
266
270
|
Configure separate MCP and administrative bearer tokens; one never grants
|
|
267
271
|
access to the other. Named CLI contexts can administer this deployed server,
|
|
268
272
|
but cannot install, pin, synchronize, or otherwise manage skill directories on
|
|
269
|
-
remote
|
|
273
|
+
remote agent machines. See [Deployment](deployment.md#http-surfaces).
|
|
270
274
|
|
|
271
275
|
Manage the mounted vault on the host. A retrieval-only container should mount
|
|
272
276
|
it read-only.
|
|
@@ -277,7 +281,7 @@ Use this topology when users need native core or project pins and also one
|
|
|
277
281
|
shared MCP endpoint. Keep one Git-backed vault source of truth. A vault
|
|
278
282
|
checkout is its physical copy; on one machine, `~/skills` can be both:
|
|
279
283
|
|
|
280
|
-
- each machine that owns
|
|
284
|
+
- each machine that owns agent skill directories keeps its own checkout and
|
|
281
285
|
runs the Skillmux CLI for `init`, pinning, and `sync`;
|
|
282
286
|
- the shared server mounts its own checkout and serves routed retrieval over
|
|
283
287
|
HTTP;
|
package/docs/mcp-routing.md
CHANGED
|
@@ -59,7 +59,7 @@ and network exposure before serving other machines. See
|
|
|
59
59
|
This is the MCP surface for AI clients. Its bearer token applies only to
|
|
60
60
|
`/mcp`; server configuration uses the separate operator surface at
|
|
61
61
|
`/admin/v1/*`. AI clients do not need the CLI to use `/mcp`; named CLI contexts
|
|
62
|
-
are for administering the deployed server, not remote
|
|
62
|
+
are for administering the deployed server, not remote agent skill directories.
|
|
63
63
|
See [Deployment](deployment.md#http-surfaces).
|
|
64
64
|
|
|
65
65
|
## Tool contract
|