@rhize/skill-forge 0.2.0 → 0.4.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/README.md CHANGED
@@ -23,6 +23,24 @@ promote/hold/reject decision**, before it is allowed anywhere near your working
23
23
 
24
24
  ## Quickstart
25
25
 
26
+ ```bash
27
+ npx @rhize/skill-forge init
28
+ ```
29
+
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
39
+ required for a first run either way — skip `init` and skill-forge defaults to `<cwd>/.claude/skills`
40
+ as its promotion target and `~/.skill-forge/quarantine` as its sandbox (and offers to run `init` for
41
+ you the first time `add`/`scan`/`list`/`status` runs with no config present, in an interactive
42
+ terminal). See [docs/configuration.md](docs/configuration.md) for the full field reference.
43
+
26
44
  ```bash
27
45
  npx @rhize/skill-forge add <owner>/<skill-name>
28
46
  ```
@@ -35,10 +53,6 @@ One command runs the whole gate:
35
53
  4. Runs overlap analysis against your configured skill set, if one is configured.
36
54
  5. Prints a report and asks you to **promote**, **hold**, or **reject** the candidate.
37
55
 
38
- No configuration is required for a first run: skill-forge defaults to `<cwd>/.claude/skills` as
39
- its promotion target and `~/.skill-forge/quarantine` as its sandbox. See
40
- [docs/configuration.md](docs/configuration.md) to change either.
41
-
42
56
  To gate a skill without installing it (always cleans up afterward):
43
57
 
44
58
  ```bash
@@ -51,12 +65,29 @@ anything ending in `.git`), or a local filesystem path.
51
65
  ## Commands
52
66
 
53
67
  ```
68
+ skill-forge init [options] Detect installed agents and set gate targets / handoff agent
54
69
  skill-forge add <source> [options] Quarantine-install a skill and run it through the gate
55
- skill-forge scan <source> Gate a skill without installing it (always cleans up)
70
+ skill-forge scan <source> [options] Gate a skill without installing it (always cleans up)
56
71
  skill-forge list List skills currently held in quarantine
57
72
  skill-forge status Show configuration and quarantine summary
58
73
  ```
59
74
 
75
+ ### `init`
76
+
77
+ ```bash
78
+ skill-forge init # interactive: pick targets, default target, handoff agent
79
+ skill-forge init --defaults # non-interactive: all detected agents, first as default (CI)
80
+ skill-forge init --list # print detected agent skill roots and exit — no writes
81
+ ```
82
+
83
+ Probes the known agent matrix (`src/agents.ts`) for both project-relative (`.claude/skills`, ...)
84
+ and global (`~/.codex/skills`, ...) skill directories that already exist on disk, then writes
85
+ `skillsRoots`, `agents`, `defaultTarget`, and (if you pick a handoff agent) `handoffCommand` to
86
+ `config.json`. Safe to re-run any time — it always starts from your existing config and only
87
+ overwrites the fields it's responsible for. If no `config.json` exists yet, `add`/`scan`/`list`/
88
+ `status` offer to run this for you on first use (skipped entirely for `--json`/`--yes`/non-TTY
89
+ invocations, so scripted runs never block on a prompt).
90
+
60
91
  ### `add`
61
92
 
62
93
  ```bash
@@ -75,26 +106,28 @@ target skills root until you decide.
75
106
  |---|---|
76
107
  | *(none)* | Prompts you to **promote**, **hold**, or **reject** the candidate. |
77
108
  | `-y, --yes` | Skips the prompt and honors the gate verdict: a `block` safety verdict is rejected (process exits nonzero); anything else (`pass`/`warn`) is promoted. |
78
- | `-t, --target <dir>` | Skills root to promote into. Defaults to the config's `skillsRoots[0]`. |
79
- | `--json` | Prints the gate result (profile, safety findings, overlap) as JSON instead of the terminal report box. |
80
- | `--ingest` | Pro. After a successful promote, hands off to Claude — see [Claude handoff](#claude-handoff---ingest). |
109
+ | `-t, --target <dir>` | Skills root to promote into. Defaults to the config's `defaultTarget`, then `skillsRoots[0]`. |
110
+ | `--json` | Prints the gate result (profile, safety findings, overlap) as JSON instead of the terminal report box. Implies non-interactive: the decision is made the same way `--yes` makes it (verdict decides promote/hold/reject), never an interactive prompt. |
111
+ | `--ingest` | Pro (free during the 0.x beta). After a successful promote, hands off to a coding agent — see [Ingestion handoff](#ingestion-handoff---ingest). |
81
112
 
82
- With a valid Pro license, a promoted skill gets a provenance entry appended to
83
- `<target>/SOURCES.md`, and every promote or hold decision is recorded to
84
- `~/.skill-forge/queue.json` (or `$SKILL_FORGE_HOME/queue.json`) — see
113
+ A promoted skill gets a provenance entry appended to `<target>/SOURCES.md`, and every promote or
114
+ hold decision is recorded to `~/.skill-forge/queue.json` (or `$SKILL_FORGE_HOME/queue.json`) — see
85
115
  [`docs/queue-schema.md`](docs/queue-schema.md) for the entry schema. A reject writes neither —
86
- nothing is left behind to record. Without a license, `add` prints a short upgrade notice in place
87
- of the ledger entry and queue write instead, and otherwise completes normally.
116
+ nothing is left behind to record. These are Pro features that run free during the 0.x beta (see
117
+ [docs/pro.md](docs/pro.md#beta-pricing-0x)): with no valid license, `add` still writes them, and
118
+ prints a one-line notice above the report instead of skipping them.
88
119
 
89
120
  ### `scan`
90
121
 
91
122
  ```bash
92
123
  skill-forge scan owner/name
124
+ skill-forge scan owner/name --json
93
125
  ```
94
126
 
95
127
  Runs the same gate pipeline as `add` (profile → safety → overlap → report) but never promotes
96
128
  anything — the quarantine sandbox is always cleaned up afterward, on success or failure. Exits
97
- nonzero when the safety verdict is `block`.
129
+ nonzero when the safety verdict is `block`. `--json` prints the same gate-result payload shape as
130
+ `add`'s.
98
131
 
99
132
  ### `list` / `status`
100
133
 
@@ -111,9 +144,10 @@ strictness) plus a count of held entries.
111
144
  | Safety gate — built-in ruleset + SkillSpector shell-out | ✓ | ✓ |
112
145
  | Terminal report + `--json` | ✓ | ✓ |
113
146
  | Promote / hold / reject decision | ✓ | ✓ |
147
+ | `init` setup wizard (agent detection, gate targets, handoff agent) | ✓ | ✓ |
114
148
  | Overlap analysis against your configured skill set | | ✓ |
115
149
  | Provenance ledger (`SOURCES.md` audit trail) | | ✓ |
116
- | Pending-ingestion queue + `--ingest` Claude handoff | | ✓ |
150
+ | Pending-ingestion queue + `--ingest` handoff | | ✓ |
117
151
  | Set-level organizer (capability registry, redundancy, dependency graph) | | ✓ |
118
152
 
119
153
  Free is the complete safety gate on its own — quarantine, profile, safety scan, and an explicit
@@ -121,13 +155,16 @@ promote/reject decision, with nothing held back. Pro is the curation layer on to
121
155
  candidate duplicates something you already have, and an ongoing provenance record across your
122
156
  whole skill set rather than a single install-time decision.
123
157
 
124
- **Current build status:** this is a pre-release build. Overlap analysis, the provenance ledger,
125
- and the pending-ingestion queue / `--ingest` handoff are gated on a valid license
126
- (`SKILL_FORGE_LICENSE` env var or `config.json`'s `licenseKey`, verified offline — see
127
- [docs/pro.md](docs/pro.md)); without one, `add` prints a short upgrade notice in place of each and
128
- otherwise completes normally. The set-level organizer and the skills.sh partner-audit enrichment
129
- are not yet exposed by any CLI command, licensed or not. See [docs/pro.md](docs/pro.md) for the
130
- per-feature implementation status.
158
+ **Everything free until 1.0.** This is a 0.x beta build, and the Pro tier's runtime license check
159
+ is intentionally asleep for the whole 0.x line: overlap analysis, the provenance ledger, and the
160
+ pending-ingestion queue / `--ingest` handoff all run for everyone, licensed or not. Without a valid
161
+ license (`SKILL_FORGE_LICENSE` env var or `config.json`'s `licenseKey`, verified offline), `add`
162
+ prints a one-line notice — `Pro feature (...) — free during the 0.x beta; will require a license at
163
+ 1.0.` — above the report (or in the `--json` payload's `notices` array) and otherwise runs exactly
164
+ as a licensed run would. At 1.0 the lock re-arms and these features go back to requiring a valid
165
+ key. The set-level organizer and the skills.sh partner-audit enrichment are not yet exposed by any
166
+ CLI command, licensed or not, beta or not. See [docs/pro.md](docs/pro.md) for the per-feature
167
+ implementation status.
131
168
 
132
169
  ## Security model
133
170
 
@@ -152,37 +189,51 @@ per-feature implementation status.
152
189
  `VERCEL_OIDC_TOKEN`. The client exists (`src/gate/skillsSh.ts`) but `add`/`scan` do not call it
153
190
  yet in this build — see [docs/gate-policy.md](docs/gate-policy.md) for current status.
154
191
 
155
- ## Claude handoff (`--ingest`)
192
+ ## Ingestion handoff (`--ingest`)
156
193
 
157
194
  `skill-forge` deliberately doesn't try to decide *what to extract* from a skill worth adopting —
158
195
  that deeper judgment (which patterns to keep, whether to absorb into an existing skill vs. fork a
159
- new one, verifying the result beats baseline) belongs to the companion Claude Code skill
160
- `rhize-skill-forge`, invoked via its `/rhize-meta:forge-ingest` slash command.
196
+ new one, verifying the result beats baseline) is a job for a coding agent, not the gate. `--ingest`
197
+ hands a promoted skill off to one, running the bundled, agent-neutral prompt at
198
+ `assets/ingest-prompt.md` (Claude Code users get a deeper experience via the companion
199
+ `rhize-skill-forge` plugin skill, but the bundled prompt works with any agent).
161
200
 
162
201
  ```bash
163
202
  skill-forge add owner/name --yes --ingest
164
203
  ```
165
204
 
166
- - If a `claude` binary is on `PATH`, skill-forge spawns it (inheriting your terminal) running
167
- `claude -p "/rhize-meta:forge-ingest <installedPath>"`.
168
- - If not, skill-forge prints that exact command for you to run yourself.
169
- - Every promote or hold is recorded to the pending queue (`~/.skill-forge/queue.json`) regardless
170
- of `--ingest` — nothing is lost if you skip the handoff. A later
171
- `/rhize-meta:forge-ingest` run with no argument drains the whole pending queue.
205
+ The command that gets run, in order:
206
+
207
+ 1. `config.handoffCommand` — an argv-style template (`["claude", "-p", "{prompt}"]`-shaped) set by
208
+ `skill-forge init`'s "handoff agent" prompt, with `{path}` (the installed skill) and `{prompt}`
209
+ (the bundled prompt file) substituted in. Never shell-parsed, so it's safe even if a substituted
210
+ path contains shell metacharacters.
211
+ 2. Otherwise, the first known agent binary found on `PATH` (`claude`, `codex`, `cursor-agent`,
212
+ `windsurf`, `opencode`, `gemini`), invoked generically with the prompt.
213
+ 3. Otherwise, skill-forge prints the prompt path and skill path for you to hand off yourself.
214
+
215
+ Every promote or hold is recorded to the pending queue (`~/.skill-forge/queue.json`) regardless of
216
+ `--ingest` — nothing is lost if you skip the handoff. See [`docs/queue-schema.md`](docs/queue-schema.md)
217
+ for the entry schema.
172
218
 
173
219
  ## Configuration
174
220
 
175
- Config lives at `~/.skill-forge/config.json` (or `$SKILL_FORGE_HOME/config.json`):
221
+ Config lives at `~/.skill-forge/config.json` (or `$SKILL_FORGE_HOME/config.json`). Run
222
+ `skill-forge init` to generate it interactively, or write it by hand:
176
223
 
177
224
  ```json
178
225
  {
179
226
  "skillsRoots": ["/path/to/.claude/skills"],
180
227
  "quarantineDir": "/path/to/quarantine",
181
- "strictness": "block-high"
228
+ "strictness": "block-high",
229
+ "defaultTarget": "/path/to/.claude/skills",
230
+ "agents": [{ "id": "claude-code", "skillsRoot": "/path/to/.claude/skills" }],
231
+ "handoffCommand": ["claude", "-p", "Read {prompt} and follow its instructions for the skill installed at {path}"]
182
232
  }
183
233
  ```
184
234
 
185
- Missing keys fall back to defaults (`skillsRoots: ["<cwd>/.claude/skills"]`). Full field reference,
235
+ Missing keys fall back to defaults (`skillsRoots: ["<cwd>/.claude/skills"]`); `defaultTarget`,
236
+ `agents`, and `handoffCommand` are optional and only written by `init`. Full field reference,
186
237
  including current caveats, in [docs/configuration.md](docs/configuration.md).
187
238
 
188
239
  ## FAQ
@@ -210,8 +261,10 @@ See [docs/gate-policy.md](docs/gate-policy.md).
210
261
  **Is there a license key or activation step?**
211
262
  An offline-verified license key exists (`SKILL_FORGE_LICENSE` env var or `config.json`'s
212
263
  `licenseKey`), but there's no `license`/`activate` CLI command — you set the key via config or
213
- environment, not a command. It gates overlap analysis, the provenance ledger, and the
214
- pending-ingestion queue / `--ingest` handoff. See [docs/pro.md](docs/pro.md) for details.
264
+ environment, not a command. Through the 0.x beta the key doesn't gate anything: overlap analysis,
265
+ the provenance ledger, and the pending-ingestion queue / `--ingest` handoff all run for everyone,
266
+ with a one-line "free during the beta" notice if no valid key is set. See
267
+ [docs/pro.md](docs/pro.md) for details.
215
268
 
216
269
  ## License
217
270