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