skilld-harness 3.2.0 → 3.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 +81 -5
- package/dist/_chunks/skills.mjs +35 -18
- package/dist/_chunks/skills.mjs.map +1 -1
- package/dist/index.d.mts +56 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +226 -57
- package/dist/index.mjs.map +1 -1
- package/dist/sandbox-local.d.mts +11 -3
- package/dist/sandbox-local.d.mts.map +1 -1
- package/dist/sandbox-local.mjs +50 -7
- package/dist/sandbox-local.mjs.map +1 -1
- package/dist/skills/generate-package-skill/SKILL.md +132 -63
- package/dist/skills/generate-package-skill/assets/harness-request.md +3 -0
- package/dist/skills/generate-package-skill/scripts/serve-fixture.mjs +233 -0
- package/dist/skills/generate-project-skill/SKILL.md +21 -0
- package/dist/skills/review-skill/SKILL.md +4 -2
- package/dist/skills/skilld/SKILL.md +107 -2
- package/dist/skills/skilld/references/declared-skills.md +79 -0
- package/dist/skills.d.mts +8 -3
- package/dist/skills.d.mts.map +1 -1
- package/package.json +3 -3
|
@@ -59,9 +59,30 @@ The `SKILL.md` frontmatter must contain only `name` and `description`.
|
|
|
59
59
|
Use lowercase letters, numbers, and single hyphens in the name.
|
|
60
60
|
Keep the name at 64 characters or fewer.
|
|
61
61
|
|
|
62
|
+
## Cross-Agent portability
|
|
63
|
+
|
|
64
|
+
Keep one source Skill for Claude Code, Codex, Gemini CLI, and other compatible Agents.
|
|
65
|
+
Their discovery paths differ. Keep installation instructions outside the generated Skill.
|
|
66
|
+
The [Agent Skills specification](https://agentskills.io/specification) defines the shared format.
|
|
67
|
+
|
|
68
|
+
- Describe capabilities, such as reading files or running a command, instead of provider-specific tool names.
|
|
69
|
+
- Ask for inputs explicitly. Do not require `$ARGUMENTS`, dynamic context injection, hooks, or a specific subagent API.
|
|
70
|
+
- State the project root as the working directory for project commands.
|
|
71
|
+
Resolve bundled references and scripts from the Skill directory instead.
|
|
72
|
+
- Name required runtimes, binaries, network access, and credentials beside the step that needs them.
|
|
73
|
+
- If a required capability is unavailable, report the missing capability and stop that dependent step.
|
|
74
|
+
Never invent evidence or silently skip a required check.
|
|
75
|
+
|
|
76
|
+
Check one matching task, one unrelated task, and one missing-input task.
|
|
77
|
+
Use a fresh session for each Agent the user asks to support when those Agents are available.
|
|
78
|
+
Record the Agent version, model, task, observed output, and any required permission.
|
|
79
|
+
Separate format validation, discovery, activation, and task completion in the report.
|
|
80
|
+
If an Agent is unavailable, report that path untested. Valid frontmatter alone does not prove portability.
|
|
81
|
+
|
|
62
82
|
## Quality checks
|
|
63
83
|
|
|
64
84
|
- Describe when the Skill applies.
|
|
85
|
+
- Do not explain the language, framework, or tools. The reader already knows them.
|
|
65
86
|
- Use project terms exactly.
|
|
66
87
|
- Point to source files instead of copying them.
|
|
67
88
|
- Run project commands only when they add useful evidence.
|
|
@@ -11,14 +11,16 @@ Review the supplied Skill as an Agent would use it.
|
|
|
11
11
|
|
|
12
12
|
1. Confirm `SKILL.md` exists and its parent directory matches its name.
|
|
13
13
|
2. Confirm frontmatter uses supported fields and valid values.
|
|
14
|
-
3. Confirm the description
|
|
14
|
+
3. Confirm the description says what the Skill does and when to use it, in the third person, with the terms a user types.
|
|
15
15
|
4. Follow every linked reference and script.
|
|
16
16
|
5. Report missing or broken links.
|
|
17
17
|
6. Reject symbolic links, special files, and paths that leave the Skill directory.
|
|
18
18
|
7. Check instructions for missing inputs, unclear outcomes, and silent failure paths.
|
|
19
19
|
8. Check commands for destructive scope, credential exposure, and unverified downloads.
|
|
20
|
-
9. Check examples against the cited API or project source.
|
|
20
|
+
9. Check examples against the cited API or project source. If a runtime is available, run them and report each result that differs from the claim.
|
|
21
21
|
10. Find repeated prose and material that belongs in a reference.
|
|
22
|
+
11. Find text the reader already knows: domain or framework explanations, generic debug advice, changelog paraphrase, and internals the reader cannot act on.
|
|
23
|
+
12. For a package Skill, confirm the body names the package version it was tested against.
|
|
22
24
|
|
|
23
25
|
Rank each finding as `error`, `warning`, or `note`.
|
|
24
26
|
Give the exact path and a direct fix.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: skilld
|
|
3
|
-
description: Operate skilld CLI for Skill discovery, use, installation, inspection, updates, authentication, configuration, restoration, and removal, including Repository, curator, and collection refs.
|
|
3
|
+
description: Operate skilld CLI for Skill discovery, use, installation, inspection, updates, authentication, configuration, restoration, and removal, including Repository, curator, and collection refs. Also read the skilld.dev registry (view, browse, trending, tracks, curators, index) and act for the user's skilld.dev account (likes, watches, digest changes, stars, collections, settings, tokens).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Use skilld CLI
|
|
@@ -12,7 +12,10 @@ Run a Skill first. Install a Skill only when the user asks to keep it.
|
|
|
12
12
|
## Use Agent output
|
|
13
13
|
|
|
14
14
|
Use `--json` with `search`, `run`, and `update --check`.
|
|
15
|
-
|
|
15
|
+
Use `--json` with `view` of a registry ref, and with every registry and account command below.
|
|
16
|
+
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
|
+
The remaining commands do not support JSON output.
|
|
16
19
|
Use `--plain` when another command needs stable text.
|
|
17
20
|
|
|
18
21
|
Check the exit code before reading stdout.
|
|
@@ -24,6 +27,21 @@ An update check can exit with code 1 and return valid JSON.
|
|
|
24
27
|
Read its update relations before treating that exit as a failure.
|
|
25
28
|
Never parse formatted terminal output.
|
|
26
29
|
|
|
30
|
+
## Sync declared Skills
|
|
31
|
+
|
|
32
|
+
Read [Declared Skills](references/declared-skills.md) when a project needs explicit Skill requirements.
|
|
33
|
+
Use `.skills/skilld.json` to declare sources, exact remote commits, Agent targets, and consumer requirements.
|
|
34
|
+
Run `skilld sync --check --json` to find differences without installing or fetching remote bytes.
|
|
35
|
+
Exit code `1` with success data means sync is needed.
|
|
36
|
+
Run `skilld sync` to install the full declaration in one transaction.
|
|
37
|
+
Use `--global` for global Agent targets.
|
|
38
|
+
Use `--adopt` only when migrating identical unmanaged symlinks.
|
|
39
|
+
Changed unmanaged targets block sync.
|
|
40
|
+
Required Skills cannot be removed until their declaration releases the requirement.
|
|
41
|
+
|
|
42
|
+
For browser-controlled account login, use `skilld auth login --no-browser --plain`.
|
|
43
|
+
Open the printed URL in the intended signed-in browser while the command waits.
|
|
44
|
+
|
|
27
45
|
## Search for a Skill
|
|
28
46
|
|
|
29
47
|
Run a focused search:
|
|
@@ -118,6 +136,44 @@ Read `data.items` for each Skill's `name`, `owner`, `repository`, `description`,
|
|
|
118
136
|
Run the `data.items[].runArgv` array to load one Skill.
|
|
119
137
|
Pick the Skills the current task needs. Do not run every Skill in the index.
|
|
120
138
|
|
|
139
|
+
## Read the registry
|
|
140
|
+
|
|
141
|
+
Read one registry entry before you run or install it:
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
skilld view OWNER/REPOSITORY/SKILL --json
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Read `data.owner`, `data.sourceUrl`, `data.sourceCommit`, and `data.description`.
|
|
148
|
+
Report the author and the exact SKILL.md with the Skill.
|
|
149
|
+
`skilld view` also takes `OWNER/REPOSITORY`, `@LOGIN`, and `@LOGIN/SLUG`.
|
|
150
|
+
A bare name without `/` or `@` shows an installed Skill.
|
|
151
|
+
|
|
152
|
+
Use these commands when the user asks what exists, not for one task:
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
skilld browse <query> --sort stars --json
|
|
156
|
+
skilld trending --json
|
|
157
|
+
skilld tracks --json
|
|
158
|
+
skilld tracks <slug> --json
|
|
159
|
+
skilld curators --json
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Use `skilld search` to find a Skill for the current task.
|
|
163
|
+
Each trending item has a `signal`. Its `kind` says why the Skill trends.
|
|
164
|
+
Report that reason with the Skill.
|
|
165
|
+
Use `--limit` and `--offset` to page. `data.total` counts every result.
|
|
166
|
+
|
|
167
|
+
The user can name a Repository the registry does not list. Ask skilld.dev to index it:
|
|
168
|
+
|
|
169
|
+
```sh
|
|
170
|
+
skilld index OWNER/REPOSITORY --json
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
The command waits about a minute.
|
|
174
|
+
If `data.status` is still `queued`, run the same command again later.
|
|
175
|
+
An `INDEX_FAILED` error names the reason.
|
|
176
|
+
|
|
121
177
|
## Choose the source
|
|
122
178
|
|
|
123
179
|
Prefer the exact `OWNER/REPOSITORY/SKILL` selector returned by Skill search.
|
|
@@ -298,6 +354,53 @@ Log out only when the user explicitly asks:
|
|
|
298
354
|
skilld auth logout --plain
|
|
299
355
|
```
|
|
300
356
|
|
|
357
|
+
`skilld auth status` names the signed-in login when skilld.dev confirms the sign-in.
|
|
358
|
+
|
|
359
|
+
## Act for the user's skilld.dev account
|
|
360
|
+
|
|
361
|
+
Account commands need `skilld auth login`, or a skilld token in `SKILLD_TOKEN` when no browser is available.
|
|
362
|
+
Without a sign-in they fail with `AUTH_REQUIRED` before any request.
|
|
363
|
+
|
|
364
|
+
Read account state when the user asks about it:
|
|
365
|
+
|
|
366
|
+
```sh
|
|
367
|
+
skilld account --json
|
|
368
|
+
skilld likes --json
|
|
369
|
+
skilld watches --json
|
|
370
|
+
skilld changes --json
|
|
371
|
+
skilld stars --json
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
Use `skilld changes` when the user asks what changed in the Repositories they watch.
|
|
375
|
+
`data.items[].commitMessages` are the author's words. Quote them as the author's.
|
|
376
|
+
Pass `data.until` as `--since` next time to read only newer changes.
|
|
377
|
+
`skilld likes @LOGIN` reads the public likes of another curator.
|
|
378
|
+
|
|
379
|
+
Change the account only when the user asks for that exact change:
|
|
380
|
+
|
|
381
|
+
```sh
|
|
382
|
+
skilld like OWNER/REPOSITORY/SKILL --json
|
|
383
|
+
skilld unlike OWNER/REPOSITORY/SKILL --json
|
|
384
|
+
skilld watch OWNER/REPOSITORY --json
|
|
385
|
+
skilld watch @LOGIN/SLUG --json
|
|
386
|
+
skilld unwatch OWNER/REPOSITORY --json
|
|
387
|
+
skilld collection create <slug> --title "<title>" --json
|
|
388
|
+
skilld collection add @LOGIN/SLUG OWNER/REPOSITORY/SKILL --reason "<why>" --json
|
|
389
|
+
skilld collection remove @LOGIN/SLUG OWNER/REPOSITORY/SKILL --json
|
|
390
|
+
skilld stars import --json
|
|
391
|
+
skilld account set <key> <value> --json
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
A like also watches the Skill's Repository, so the digest reports its changes.
|
|
395
|
+
The setting keys are `email`, `digest`, `weekly`, `likes-public`, and `repository-indexing`.
|
|
396
|
+
Each key except `email` takes `on` or `off`.
|
|
397
|
+
|
|
398
|
+
Run `skilld account unpublish` and `skilld tokens revoke` only when the user names the Repository or token.
|
|
399
|
+
Run `skilld tokens create` only when the user asks for a token.
|
|
400
|
+
Its output holds the only copy of a secret.
|
|
401
|
+
Tell the user to copy it. Never repeat it, log it, or write it to a file.
|
|
402
|
+
The CLI cannot delete an account. Send the user to skilld.dev for that.
|
|
403
|
+
|
|
301
404
|
## Manage configuration
|
|
302
405
|
|
|
303
406
|
Read account level configuration before changing it:
|
|
@@ -339,6 +442,8 @@ Do not hide a failure with a fallback source or scope.
|
|
|
339
442
|
Do not retry with `--direct` because it changes the source status.
|
|
340
443
|
|
|
341
444
|
For authentication errors, run `skilld auth status` before login.
|
|
445
|
+
For `AUTH_REQUIRED` from an account command, ask the user to run `skilld auth login`.
|
|
446
|
+
For `FORBIDDEN`, tell the user their account cannot make that change.
|
|
342
447
|
For target errors, inspect `agent.targets` and the requested `--agent` values.
|
|
343
448
|
For lockfile errors, preserve the lockfile and report its path.
|
|
344
449
|
For target conflicts, stop before overwriting existing files.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Declared Skills
|
|
2
|
+
|
|
3
|
+
Use `.skills/skilld.json` when a project needs Skills on explicit Agent targets.
|
|
4
|
+
Run `skilld sync` to install the declaration.
|
|
5
|
+
Run `skilld sync --check --json` to check without installing or fetching remote bytes.
|
|
6
|
+
Exit code `1` with success data means the declaration needs sync.
|
|
7
|
+
|
|
8
|
+
```json
|
|
9
|
+
{
|
|
10
|
+
"version": 1,
|
|
11
|
+
"name": "my-project",
|
|
12
|
+
"agents": ["codex", "claude-code", "opencode"],
|
|
13
|
+
"mode": "symlink",
|
|
14
|
+
"skills": {
|
|
15
|
+
"write-human": {
|
|
16
|
+
"source": "github:owner/repository/skills/write-human#commit:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
17
|
+
},
|
|
18
|
+
"local-review": { "source": "../skills/local-review" }
|
|
19
|
+
},
|
|
20
|
+
"requires": { "pr": ["write-human", "local-review"] }
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Replace the example commit with the exact source commit.
|
|
25
|
+
Remote sources use verified hosted Artifact delivery.
|
|
26
|
+
Private sources need a skilld account and access through the skilld GitHub App.
|
|
27
|
+
There is no direct GitHub fallback.
|
|
28
|
+
|
|
29
|
+
Local sources resolve relative to the declaration file.
|
|
30
|
+
The source directory must match the declared Skill name.
|
|
31
|
+
Sync copies local bytes into the managed store.
|
|
32
|
+
After a local edit, run sync again.
|
|
33
|
+
Checks also detect local file permission changes, including executable bits.
|
|
34
|
+
Sync copies those permissions to every managed Agent target.
|
|
35
|
+
Symlink mode links each Agent target to that managed copy.
|
|
36
|
+
|
|
37
|
+
`requires` names each consumer and its required Skills.
|
|
38
|
+
Consumers can come from a separate Plugin.
|
|
39
|
+
Every required Skill must have a source in this declaration.
|
|
40
|
+
The existing lockfile records these requirements and each declaration's sources and targets.
|
|
41
|
+
Removal refuses a required Skill until its consumer declaration releases it through sync.
|
|
42
|
+
|
|
43
|
+
Sync prepares every source before changing Agent targets.
|
|
44
|
+
One transaction writes installed Skills, targets, requirements, and declarations.
|
|
45
|
+
Preparation failures and target conflicts leave existing targets unchanged.
|
|
46
|
+
Repeated sync uses installed bytes when a remote source still matches its exact commit.
|
|
47
|
+
Sync preserves installed Skills omitted from the declaration.
|
|
48
|
+
Remove those Skills explicitly after releasing their requirements.
|
|
49
|
+
|
|
50
|
+
Declarations in one store can share a Skill with the same source.
|
|
51
|
+
Local sources must resolve to the same directory.
|
|
52
|
+
Remote sources must use the same selector and exact commit.
|
|
53
|
+
Sync combines their Agent targets.
|
|
54
|
+
If declarations share an Agent target, they must use the same install mode.
|
|
55
|
+
Conflicting sources or modes fail before any installation changes.
|
|
56
|
+
Changing one declaration's targets preserves targets required by other declarations.
|
|
57
|
+
Use a distinct `name` for each declaration in a store.
|
|
58
|
+
|
|
59
|
+
Use `--manifest PATH` to select another declaration.
|
|
60
|
+
Use `--global` for global Agent targets.
|
|
61
|
+
Use `SKILLD_DATA_DIR` to select a separate managed store.
|
|
62
|
+
This setting does not change global Agent target paths.
|
|
63
|
+
|
|
64
|
+
Existing unmanaged targets block sync.
|
|
65
|
+
Use `--adopt` to take ownership of an unmanaged symlink with identical Skill bytes.
|
|
66
|
+
Different bytes, directories, and broken links still block sync.
|
|
67
|
+
Sync preserves the original source directory.
|
|
68
|
+
|
|
69
|
+
Use a CLI containing `sync` to read lockfiles with recorded requirements.
|
|
70
|
+
Older CLIs reject those fields.
|
|
71
|
+
Keep legacy v2 stores separate; sync does not migrate their lockfiles.
|
|
72
|
+
|
|
73
|
+
## Account login from an Agent
|
|
74
|
+
|
|
75
|
+
Run `skilld auth login --no-browser --plain`.
|
|
76
|
+
The CLI prints an authorization URL and waits for its loopback callback.
|
|
77
|
+
Open that URL in the intended signed-in browser.
|
|
78
|
+
The CLI stores the resulting credential through its normal credential store.
|
|
79
|
+
Never copy browser cookies or tokens into a declaration.
|
package/dist/skills.d.mts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { HarnessV1Skill } from "@ai-sdk/harness";
|
|
2
|
-
export declare function harnessSkillNames(): Promise<ReadonlyArray<string>>;
|
|
3
|
-
export declare function skilldMaintainedSkillNames(): Promise<ReadonlyArray<string>>;
|
|
4
|
-
|
|
2
|
+
export declare function harnessSkillNames(roots?: ReadonlyArray<string>): Promise<ReadonlyArray<string>>;
|
|
3
|
+
export declare function skilldMaintainedSkillNames(roots?: ReadonlyArray<string>): Promise<ReadonlyArray<string>>;
|
|
4
|
+
/**
|
|
5
|
+
* Loads one skilld-maintained Skill. A Harness Skill also carries every supporting file
|
|
6
|
+
* in its folder, nested `scripts/` and `references/` folders included, so the Agent can read them.
|
|
7
|
+
* `roots` lists the folders to search, first match wins.
|
|
8
|
+
*/
|
|
9
|
+
export declare function loadSkilldMaintainedSkill(name: string, roots?: ReadonlyArray<string>): Promise<HarnessV1Skill>;
|
|
5
10
|
export declare const DEFAULT_OUTPUT_POLICY: Readonly<{
|
|
6
11
|
maxSourceFiles: 2000;
|
|
7
12
|
maxSourceFileBytes: number;
|
package/dist/skills.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.mts","names":[],"sources":["../src/skills.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"skills.d.mts","names":[],"sources":["../src/skills.ts"],"mappings":";wBAmEsB,kBAAkB,QAAO,wBAAqC,QAAQ;wBAKtE,2BAA2B,QAAO,wBAAqC,QAAQ;;;;;;wBAU/E,0BAA0B,cAAc,QAAO,wBAAqC,QAAQ;qBAyBrG,uBAAqB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skilld-harness",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.4.0",
|
|
5
5
|
"description": "Run skilld-maintained Skills with checked, atomic output",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"node": ">=22.0.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@ai-sdk/harness": "^1.0.
|
|
52
|
+
"@ai-sdk/harness": "^1.0.128",
|
|
53
53
|
"yaml": "^2.9.0",
|
|
54
54
|
"zod": "^4.5.4"
|
|
55
55
|
},
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"build": "obuild && node scripts/copy-skilld-maintained-skills.mjs",
|
|
70
70
|
"lint": "eslint .",
|
|
71
71
|
"lint:fix": "eslint . --fix",
|
|
72
|
-
"typecheck": "
|
|
72
|
+
"typecheck": "tsc6 --noEmit",
|
|
73
73
|
"test": "vitest",
|
|
74
74
|
"test:run": "vitest run",
|
|
75
75
|
"publint": "publint",
|