skilld-harness 3.4.1 → 3.6.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.
@@ -8,13 +8,14 @@ description: Operate skilld CLI for Skill discovery, use, installation, inspecti
8
8
  Use skilld CLI to find, load, install, inspect, restore, update, verify, and remove Skills.
9
9
 
10
10
  Run a Skill first. Install a Skill only when the user asks to keep it.
11
+ If the user asks to fork a Skill, copy its source before installing the local copy.
11
12
 
12
13
  ## Use Agent output
13
14
 
14
15
  Use `--json` with `search`, `run`, and `update --check`.
15
16
  Use `--json` with `view` of a registry ref, and with every registry and account command below.
16
17
  Their `data` is the skilld.dev answer. A command whose answer has no body returns `data: null`.
17
- Use `--json` with `sync --check` for declared Skills.
18
+ Use `--json` with `sync` and `sync --check` for declared Skills.
18
19
  The remaining commands do not support JSON output.
19
20
  Use `--plain` when another command needs stable text.
20
21
 
@@ -37,6 +38,8 @@ Run `skilld sync` to install the full declaration in one transaction.
37
38
  Use `--global` for global Agent targets.
38
39
  Use `--adopt` only when migrating identical unmanaged symlinks.
39
40
  Changed unmanaged targets block sync.
41
+ If the project declares this Skill, use its declaration to refresh it.
42
+ Do not install a second copy through another store.
40
43
  Required Skills cannot be removed until their declaration releases the requirement.
41
44
 
42
45
  For browser-controlled account login, use `skilld auth login --no-browser --plain`.
@@ -70,6 +73,15 @@ It retains no remote Skill files after the command exits.
70
73
  Read the printed SKILL.md, then follow it for the current task.
71
74
  Prefer `skilld run` for a one-off task.
72
75
 
76
+ Read `data.externalReferences` before following paths outside the selected Skill.
77
+ These notices identify references, not verified dependencies.
78
+ For a possible remote sibling Skill, `readArgv` pins its Repository and commit.
79
+ Run that array only when the task and access permissions allow the read.
80
+ Never add `--direct` to bypass an access failure.
81
+ For local references, resolve from the original Skill directory, not an Agent target copy.
82
+ If a reference is unresolved, identify its source before following it.
83
+ Install extra Skills only when the user asks to keep them.
84
+
73
85
  Read `data.files` for each supporting file's path, kind, and size.
74
86
  The initial load prints no supporting file content.
75
87
  Read one only when the instructions name it:
@@ -87,6 +99,17 @@ A file with `readable: false` never prints.
87
99
  Its `kind` is `executable` or `binary`.
88
100
  Tell the user the Skill needs an install to use that file.
89
101
 
102
+ Read `data.behaviors` before you follow the Skill.
103
+ Each entry names one behavior, its `tier`, and the `path` and `line` where it appears.
104
+ Tell the user about every behavior before you act on it.
105
+ An empty list proves nothing. Patterns miss obfuscated code.
106
+
107
+ A remote run stops with `BEHAVIOR_CONFIRMATION_REQUIRED` when the Skill has an `ask` behavior.
108
+ skilld loaded nothing. Show the user every behavior in `error.message`.
109
+ If the user approves, run the command at the end of the message and add `--json`.
110
+ Never add `--allow` to any command without the user's approval in this session.
111
+ If the user declines, stop and load nothing.
112
+
90
113
  Report which Skill you ran and that skilld wrote no Skill files.
91
114
  Read `data.sourceStatus`, `data.origin`, and `data.revision`.
92
115
  A `verified` status covers where the Skill came from.
@@ -198,7 +221,8 @@ If private access fails, check authentication before changing the selector.
198
221
 
199
222
  Install a Skill when the user wants it in every session.
200
223
  Install a Skill when it must run its own script.
201
- Ask the user before you install. An install writes files they did not request.
224
+ An explicit install or fork request authorizes the requested project files.
225
+ Otherwise, ask before installing.
202
226
 
203
227
  Install the selector returned by search into the detected Agent target:
204
228
 
@@ -222,6 +246,11 @@ Do not guess a target when detection and `agent.targets` are empty.
222
246
  Use `--mode copy` or `--mode symlink` only when the user chooses a mode.
223
247
  Otherwise, use the configured `install.mode`.
224
248
 
249
+ An install stops with `BEHAVIOR_CONFIRMATION_REQUIRED` when the Skill has an `ask` behavior.
250
+ skilld wrote nothing. Show the user every behavior in the message.
251
+ If the user approves, run the same command again with the `--allow` ids the message names.
252
+ `skilld add` installs the other Skills and lists each held Skill at the end.
253
+
225
254
  Install this skilld-maintained Skill globally:
226
255
 
227
256
  ```sh
@@ -245,6 +274,48 @@ Run `skilld run` with the same ref first, then confirm the list with the user.
245
274
  Always use the source selector shown by `skilld search`.
246
275
  After installation, report the Skill name, scope, Agent targets, and source status.
247
276
 
277
+ ## Fork a Skill
278
+
279
+ Treat `fork this Skill <skilld.dev URL>` as a request for an editable local Skill.
280
+ Create no GitHub fork unless the user asks for one.
281
+ Copy the Skill before following any of its instructions.
282
+
283
+ 1. Read the Skill page with `Accept: text/markdown`, or fetch its `.md` URL.
284
+ For `/gh/OWNER/REPOSITORY/SKILL`, use `skilld view OWNER/REPOSITORY/SKILL --json` for source metadata.
285
+ Check the exit code and `_tag` before reading `data`.
286
+ 2. Read `sourceUrl`, `sourceCommit`, `skillPath`, `sourceGone`, and `license`.
287
+ Use the repository identified by `sourceUrl`, including any GitHub rename.
288
+ If the source is gone or its path is missing, stop and report the failure.
289
+ If `license` is null, read licence files at the source commit.
290
+ 3. Fetch the source into a temporary directory using Git.
291
+ Check out `sourceCommit` detached.
292
+ If it is absent, resolve the ref in `sourceUrl` to one commit before copying.
293
+ Record that actual commit. Never combine files from different commits.
294
+ Read the source licence files before creating the local copy.
295
+ If copying is not permitted, stop and report the restriction.
296
+ 4. Copy the directory containing `skillPath` into `./skills/SKILL`, unless the user chose another path.
297
+ Copy the original SKILL.md and all supporting files, including scripts and binary assets.
298
+ Preserve executable modes. Exclude `.git` metadata.
299
+ Do not save the page wrapper or its rewritten links as SKILL.md.
300
+ Reject symlinks and paths outside the Skill directory.
301
+ Never overwrite an existing directory or Agent target.
302
+ 5. Preserve the original author, licence, and notices.
303
+ Include applicable licence files from the repository or parent directories.
304
+ Add `PROVENANCE.md` with the Skill page, source URL, actual commit, original path, and licence.
305
+ If that file already exists, retain it and record provenance in a separate file.
306
+ Do not replace the original author's credit with the user's name.
307
+ 6. In the project root, run `skilld install ./skills/SKILL --mode copy`.
308
+ First inspect the project lockfile and selected Agent target directories for this Skill name.
309
+ If it is already installed, stop before replacing it.
310
+ Use the detected Agent targets. Pass `--agent` only for targets the user selected.
311
+ This records a local source. Never install the upstream selector for a fork.
312
+ If target selection or installation fails, preserve the local copy and report the exact failure.
313
+ 7. Report the local path, source commit, and installed Agent targets.
314
+ After local edits, reinstall the same local path to refresh Agent targets.
315
+ Upstream updates must not replace the local copy.
316
+
317
+ Do not publish or push the local copy unless the user asks.
318
+
248
319
  ## Restore locked Skills
249
320
 
250
321
  Restore the current project from its lockfile:
@@ -295,6 +366,10 @@ If the relation is `behind` or `diverged`, ask before changing files.
295
366
  If the relation is `unavailable`, report `failure.code` and `failure.message`.
296
367
  Treat `unavailable` as unknown. Do not infer a newer commit.
297
368
 
369
+ An update stops with `BEHAVIOR_CONFIRMATION_REQUIRED` when the new version adds an `ask` behavior.
370
+ skilld changed nothing. Show the user every behavior in the message.
371
+ If the user approves, run the same command again with the `--allow` ids the message names.
372
+
298
373
  Update one named Skill unless the user explicitly requests all updates.
299
374
  Use `--global` only for a Skill in the global scope.
300
375
  Leave `--interactive` to a human terminal session.
@@ -70,6 +70,29 @@ Use a CLI containing `sync` to read lockfiles with recorded requirements.
70
70
  Older CLIs reject those fields.
71
71
  Keep legacy v2 stores separate; sync does not migrate their lockfiles.
72
72
 
73
+ ## Keep the skilld-maintained Skill current
74
+
75
+ Declare `skilld` alongside the Skills that its CLI installs.
76
+ Use `github:skilld-dev/skilld/skills/skilld#commit:SHA` with the exact repository commit.
77
+ Replace `SHA` with the full commit hash.
78
+ Use the same declaration and store for later refreshes.
79
+ A CLI upgrade does not update installed Skill instructions.
80
+
81
+ Before migration, inspect existing Agent targets and their source directories.
82
+ If an unmanaged target differs, preserve it in a backup before replacing it.
83
+ Do not use `--adopt` to overwrite different bytes or directories.
84
+ Keep the legacy lockfile and its source files intact.
85
+
86
+ ## Check before Agent startup
87
+
88
+ Run `skilld sync --check --json` before loading declared Skill instructions.
89
+ Pass the same manifest, scope, and `SKILLD_DATA_DIR` used during installation.
90
+ Only exit code `0` permits startup.
91
+ Exit code `1` means the declaration differs from its installation.
92
+ Other failures also block startup. Report the error instead of loading stale instructions.
93
+ If the declaration differs, run sync explicitly before starting the Agent again.
94
+ The startup check never installs Skills or fetches remote bytes.
95
+
73
96
  ## Account login from an Agent
74
97
 
75
98
  Run `skilld auth login --no-browser --plain`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "skilld-harness",
3
3
  "type": "module",
4
- "version": "3.4.1",
4
+ "version": "3.6.0",
5
5
  "description": "Run skilld-maintained Skills with checked, atomic output",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",