@rhize/skill-forge 0.3.0 → 0.5.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/LICENSE CHANGED
@@ -15,6 +15,7 @@ Pro Modules
15
15
 
16
16
  - src/license.ts
17
17
  - src/gate/overlap.ts
18
+ - src/gate/mcpOverlap.ts
18
19
  - src/provenance.ts
19
20
  - src/queue.ts
20
21
 
package/README.md CHANGED
@@ -27,10 +27,15 @@ promote/hold/reject decision**, before it is allowed anywhere near your working
27
27
  npx @rhize/skill-forge init
28
28
  ```
29
29
 
30
- Optional, but recommended first: `init` detects which coding agents you have installed (Claude
31
- Code, Codex CLI, Cursor, Windsurf, OpenCode, Gemini CLI, and more), lets you pick which of their
32
- skill directories should be gated, a default promotion target, and an optional agent to hand
33
- follow-up prompts off to (see [`--ingest`](#ingestion-handoff---ingest)). No configuration is
30
+ Optional, but recommended first: `init` detects which coding agents you have installed — the
31
+ matrix covers 73 known agents (Claude Code, Codex CLI, Cursor, Windsurf, OpenCode, Gemini CLI,
32
+ and 67 more; see `src/agents.ts`), and every entry's skill-directory paths are verified directly
33
+ against the [vercel-labs/skills](https://github.com/vercel-labs/skills) CLI's own source, not
34
+ just its README — none are unverified/community guesses today. (The schema carries a
35
+ `verified: false` flag for any future entry that can't be confirmed that way; it's unused as of
36
+ this release.) `init` lets you pick which of their skill directories should be gated, a default
37
+ promotion target, and an optional agent to hand follow-up prompts off to (see
38
+ [`--ingest`](#ingestion-handoff---ingest)). No configuration is
34
39
  required for a first run either way — skip `init` and skill-forge defaults to `<cwd>/.claude/skills`
35
40
  as its promotion target and `~/.skill-forge/quarantine` as its sandbox (and offers to run `init` for
36
41
  you the first time `add`/`scan`/`list`/`status` runs with no config present, in an interactive
@@ -112,6 +117,9 @@ nothing is left behind to record. These are Pro features that run free during th
112
117
  [docs/pro.md](docs/pro.md#beta-pricing-0x)): with no valid license, `add` still writes them, and
113
118
  prints a one-line notice above the report instead of skipping them.
114
119
 
120
+ `add`/`scan` also accept `--artifact mcp` (plus `add`-only `--mcp-target <file>`/`--force`) to gate
121
+ an MCP server instead of a skill — see [MCP gating](#mcp-gating-v05) below.
122
+
115
123
  ### `scan`
116
124
 
117
125
  ```bash
@@ -130,6 +138,69 @@ nonzero when the safety verdict is `block`. `--json` prints the same gate-result
130
138
  promoted or rejected). `status` shows the resolved configuration (skills roots, quarantine dir,
131
139
  strictness) plus a count of held entries.
132
140
 
141
+ ## MCP gating (v0.5)
142
+
143
+ `add` and `scan` can also gate an **MCP server** instead of a skill — the same quarantine →
144
+ profile → safety scan → overlap analysis → report → promote/hold/reject pipeline, applied to an
145
+ MCP server candidate rather than a skill:
146
+
147
+ ```bash
148
+ skill-forge scan ./my-mcp-server --artifact mcp
149
+ skill-forge add @scope/some-mcp-server --artifact mcp --mcp-target ~/.claude.json
150
+ skill-forge add https://github.com/owner/mcp-server.git --artifact mcp --yes
151
+ ```
152
+
153
+ Pass `--artifact mcp` explicitly — skill-forge never guesses. In particular, an npm package name
154
+ (`@scope/name`, or a bare `some-mcp-server` name) is only treated as an npm source with this flag;
155
+ without it, the same string resolves as a skills.sh `owner/name` slug instead (no ambiguity
156
+ guessing between the two).
157
+
158
+ **Source forms**
159
+
160
+ | Form | Example | How it's fetched |
161
+ |---|---|---|
162
+ | Local directory | `./my-mcp-server` | Copied into quarantine, same as a local skill source. |
163
+ | Git URL | `https://github.com/owner/mcp-server.git` | Shallow-cloned into quarantine, same as a git skill source. |
164
+ | npm package | `@scope/name` or `some-mcp-server` | `npm pack <name> --pack-destination <quarantine>`, then tarball **extraction only** — never `npm install`, never lifecycle scripts. |
165
+
166
+ **What's gated**
167
+
168
+ Safety runs the same built-in deny-pattern ruleset used for skills (curl\|bash, credential-file
169
+ access, etc.) plus MCP-specific rules: inline credential values in config/env, unpinned `npx -y`
170
+ launch commands, `--dangerously-*`/`--no-sandbox` flags, and filesystem-root launch args — see the
171
+ [MCP safety ruleset table](docs/gate-policy.md#mcp-safety-ruleset). Overlap analysis (Pro, free
172
+ during the 0.x beta) ranks the candidate against the server entries already present in your
173
+ configured `mcpTargets` files, instead of against a skills root.
174
+
175
+ **Promote semantics**
176
+
177
+ Promoting an MCP candidate writes ONE server entry into a target MCP config file's `mcpServers`
178
+ map — it never touches a skills root:
179
+
180
+ ```json
181
+ { "mcpServers": { "<name>": { "command": "...", "args": ["..."], "env": { "SOME_KEY": "" } } } }
182
+ ```
183
+
184
+ - **Env values are never copied** from the candidate — every declared env var is written as an
185
+ empty string, and skill-forge prints the var names you need to fill in yourself.
186
+ - **Target resolution:** `--mcp-target <file>`, else `config.mcpTargets[0]`, else `<cwd>/.mcp.json`.
187
+ - **Existing target file:** backed up first to `<file>.bak-<timestamp>`.
188
+ - **Existing same-name server entry:** refused unless `--force` is passed.
189
+ - **Missing target file/parent dirs:** created.
190
+ - A candidate config listing more than one server gates/promotes the first (same "N found — using
191
+ the first" convention `add`/`scan` already use for a multi-skill source), noted on stderr.
192
+
193
+ There's no MCP equivalent of the skill provenance ledger (`SOURCES.md`) — the pending-ingestion
194
+ queue (Pro) and `--ingest` handoff both apply the same way, keyed on the written config file path
195
+ instead of an installed skill directory.
196
+
197
+ **TOML-format agents: detect-only.** `skill-forge init` detects MCP config files for every known
198
+ agent, including TOML-format ones (Codex CLI's `config.toml`) — they show up in `init`'s MCP-target
199
+ list and can be selected into `config.mcpTargets` for **overlap ranking**. But **promote only
200
+ writes JSON-shaped targets** (`{ "mcpServers": { ... } }`); pointing `--mcp-target` at (or letting
201
+ `config.mcpTargets[0]` resolve to) a TOML file fails when the promote step tries to parse it as
202
+ JSON. Detection/overlap is agent-format-agnostic; writing is JSON-only.
203
+
133
204
  ## Free vs. Pro
134
205
 
135
206
  | Capability | Free | Pro |