skilld 2.3.0 → 3.0.0-beta.2

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.
Files changed (146) hide show
  1. package/README.md +142 -353
  2. package/bin/skilld.mjs +56 -0
  3. package/loader/resolve-artifact.mjs +37 -0
  4. package/package.json +28 -55
  5. package/dist/_chunks/add.mjs +0 -95
  6. package/dist/_chunks/add.mjs.map +0 -1
  7. package/dist/_chunks/agent-prompt.mjs +0 -90
  8. package/dist/_chunks/agent-prompt.mjs.map +0 -1
  9. package/dist/_chunks/agent.mjs +0 -1817
  10. package/dist/_chunks/agent.mjs.map +0 -1
  11. package/dist/_chunks/args.mjs +0 -49
  12. package/dist/_chunks/args.mjs.map +0 -1
  13. package/dist/_chunks/assemble.mjs +0 -126
  14. package/dist/_chunks/assemble.mjs.map +0 -1
  15. package/dist/_chunks/author.mjs +0 -432
  16. package/dist/_chunks/author.mjs.map +0 -1
  17. package/dist/_chunks/cache.mjs +0 -367
  18. package/dist/_chunks/cache.mjs.map +0 -1
  19. package/dist/_chunks/cache2.mjs +0 -151
  20. package/dist/_chunks/cache2.mjs.map +0 -1
  21. package/dist/_chunks/changes-digest.mjs +0 -49
  22. package/dist/_chunks/changes-digest.mjs.map +0 -1
  23. package/dist/_chunks/changes.mjs +0 -23
  24. package/dist/_chunks/changes.mjs.map +0 -1
  25. package/dist/_chunks/client.mjs +0 -182
  26. package/dist/_chunks/client.mjs.map +0 -1
  27. package/dist/_chunks/core.mjs +0 -13
  28. package/dist/_chunks/detect.mjs +0 -614
  29. package/dist/_chunks/detect.mjs.map +0 -1
  30. package/dist/_chunks/detect2.mjs +0 -2
  31. package/dist/_chunks/eject.mjs +0 -69
  32. package/dist/_chunks/eject.mjs.map +0 -1
  33. package/dist/_chunks/embedding-cache.mjs +0 -2
  34. package/dist/_chunks/embedding-cache2.mjs +0 -61
  35. package/dist/_chunks/embedding-cache2.mjs.map +0 -1
  36. package/dist/_chunks/env.mjs +0 -19
  37. package/dist/_chunks/env.mjs.map +0 -1
  38. package/dist/_chunks/index-identity.mjs +0 -365
  39. package/dist/_chunks/index-identity.mjs.map +0 -1
  40. package/dist/_chunks/index-identity2.mjs +0 -2
  41. package/dist/_chunks/install-many.mjs +0 -542
  42. package/dist/_chunks/install-many.mjs.map +0 -1
  43. package/dist/_chunks/install.mjs +0 -259
  44. package/dist/_chunks/install.mjs.map +0 -1
  45. package/dist/_chunks/intro.mjs +0 -63
  46. package/dist/_chunks/intro.mjs.map +0 -1
  47. package/dist/_chunks/list.mjs +0 -102
  48. package/dist/_chunks/list.mjs.map +0 -1
  49. package/dist/_chunks/lockfile.mjs +0 -174
  50. package/dist/_chunks/lockfile.mjs.map +0 -1
  51. package/dist/_chunks/login.mjs +0 -247
  52. package/dist/_chunks/login.mjs.map +0 -1
  53. package/dist/_chunks/logout.mjs +0 -27
  54. package/dist/_chunks/logout.mjs.map +0 -1
  55. package/dist/_chunks/map.mjs +0 -11
  56. package/dist/_chunks/map.mjs.map +0 -1
  57. package/dist/_chunks/markdown.mjs +0 -101
  58. package/dist/_chunks/markdown.mjs.map +0 -1
  59. package/dist/_chunks/menu.mjs +0 -33
  60. package/dist/_chunks/menu.mjs.map +0 -1
  61. package/dist/_chunks/model-picker.mjs +0 -61
  62. package/dist/_chunks/model-picker.mjs.map +0 -1
  63. package/dist/_chunks/monorepo.mjs +0 -74
  64. package/dist/_chunks/monorepo.mjs.map +0 -1
  65. package/dist/_chunks/package-json.mjs +0 -84
  66. package/dist/_chunks/package-json.mjs.map +0 -1
  67. package/dist/_chunks/paths.mjs +0 -47
  68. package/dist/_chunks/paths.mjs.map +0 -1
  69. package/dist/_chunks/pipeline.mjs +0 -993
  70. package/dist/_chunks/pipeline.mjs.map +0 -1
  71. package/dist/_chunks/pool.mjs +0 -2
  72. package/dist/_chunks/pool2.mjs +0 -121
  73. package/dist/_chunks/pool2.mjs.map +0 -1
  74. package/dist/_chunks/portable.mjs +0 -152
  75. package/dist/_chunks/portable.mjs.map +0 -1
  76. package/dist/_chunks/prepare-hook.mjs +0 -2
  77. package/dist/_chunks/prepare-hook2.mjs +0 -61
  78. package/dist/_chunks/prepare-hook2.mjs.map +0 -1
  79. package/dist/_chunks/prepare.mjs +0 -113
  80. package/dist/_chunks/prepare.mjs.map +0 -1
  81. package/dist/_chunks/prepare2.mjs +0 -80
  82. package/dist/_chunks/prepare2.mjs.map +0 -1
  83. package/dist/_chunks/prompts.mjs +0 -1252
  84. package/dist/_chunks/prompts.mjs.map +0 -1
  85. package/dist/_chunks/pull.mjs +0 -190
  86. package/dist/_chunks/pull.mjs.map +0 -1
  87. package/dist/_chunks/regex.mjs +0 -19
  88. package/dist/_chunks/regex.mjs.map +0 -1
  89. package/dist/_chunks/retriv.mjs +0 -2
  90. package/dist/_chunks/retriv2.mjs +0 -177
  91. package/dist/_chunks/retriv2.mjs.map +0 -1
  92. package/dist/_chunks/sanitize.mjs +0 -260
  93. package/dist/_chunks/sanitize.mjs.map +0 -1
  94. package/dist/_chunks/search-helpers.mjs +0 -88
  95. package/dist/_chunks/search-helpers.mjs.map +0 -1
  96. package/dist/_chunks/search-interactive.mjs +0 -249
  97. package/dist/_chunks/search-interactive.mjs.map +0 -1
  98. package/dist/_chunks/search.mjs +0 -247
  99. package/dist/_chunks/search.mjs.map +0 -1
  100. package/dist/_chunks/semver.mjs +0 -2831
  101. package/dist/_chunks/semver.mjs.map +0 -1
  102. package/dist/_chunks/skill-installer.mjs +0 -2
  103. package/dist/_chunks/skill-installer2.mjs +0 -163
  104. package/dist/_chunks/skill-installer2.mjs.map +0 -1
  105. package/dist/_chunks/skills.mjs +0 -187
  106. package/dist/_chunks/skills.mjs.map +0 -1
  107. package/dist/_chunks/store.mjs +0 -107
  108. package/dist/_chunks/store.mjs.map +0 -1
  109. package/dist/_chunks/sync.mjs +0 -1009
  110. package/dist/_chunks/sync.mjs.map +0 -1
  111. package/dist/_chunks/sync2.mjs +0 -2
  112. package/dist/_chunks/telemetry.mjs +0 -26
  113. package/dist/_chunks/telemetry.mjs.map +0 -1
  114. package/dist/_chunks/uninstall.mjs +0 -214
  115. package/dist/_chunks/uninstall.mjs.map +0 -1
  116. package/dist/_chunks/update.mjs +0 -133
  117. package/dist/_chunks/update.mjs.map +0 -1
  118. package/dist/_chunks/upload.mjs +0 -155
  119. package/dist/_chunks/upload.mjs.map +0 -1
  120. package/dist/_chunks/validate.mjs +0 -60
  121. package/dist/_chunks/validate.mjs.map +0 -1
  122. package/dist/_chunks/version.mjs +0 -19
  123. package/dist/_chunks/version.mjs.map +0 -1
  124. package/dist/_chunks/watch.mjs +0 -2
  125. package/dist/_chunks/watch2.mjs +0 -118
  126. package/dist/_chunks/watch2.mjs.map +0 -1
  127. package/dist/_chunks/whoami.mjs +0 -21
  128. package/dist/_chunks/whoami.mjs.map +0 -1
  129. package/dist/_chunks/wizard.mjs +0 -2
  130. package/dist/_chunks/wizard2.mjs +0 -200
  131. package/dist/_chunks/wizard2.mjs.map +0 -1
  132. package/dist/_chunks/yaml.mjs +0 -33
  133. package/dist/_chunks/yaml.mjs.map +0 -1
  134. package/dist/cli-entry.d.mts +0 -1
  135. package/dist/cli-entry.mjs +0 -5
  136. package/dist/cli-entry.mjs.map +0 -1
  137. package/dist/cli.d.mts +0 -1
  138. package/dist/cli.mjs +0 -1330
  139. package/dist/cli.mjs.map +0 -1
  140. package/dist/prepare.d.mts +0 -1
  141. package/dist/prepare.mjs +0 -84
  142. package/dist/prepare.mjs.map +0 -1
  143. package/dist/retriv/worker.d.mts +0 -37
  144. package/dist/retriv/worker.d.mts.map +0 -1
  145. package/dist/retriv/worker.mjs +0 -46
  146. package/dist/retriv/worker.mjs.map +0 -1
package/README.md CHANGED
@@ -4,443 +4,232 @@
4
4
  [![npm downloads](https://img.shields.io/npm/dm/skilld?color=yellow)](https://npm.chart.dev/skilld)
5
5
  [![license](https://img.shields.io/npm/l/skilld?color=yellow)](https://github.com/skilld-dev/skilld/blob/main/LICENSE)
6
6
 
7
- > Generate AI agent skills from your NPM dependencies.
7
+ Search, run, install, and keep Agent Skills current.
8
8
 
9
- ## Why?
9
+ skilld v3 has two products:
10
10
 
11
- When using new packages or migrating to new versions, agents often struggle to use the appropriate best practices. This is because
12
- agents have [knowledge cutoffs](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison) and
13
- predict based on existing patterns.
11
+ - The native `skilld` CLI manages Skills.
12
+ - The JavaScript [`skilld-harness`](./packages/harness) package runs visible Skill generation and review instructions.
14
13
 
15
- Methods of getting the right context to your agent require either manual curation, author opt-in, external servers or vendor lock-in. See [the landscape](#the-landscape)
16
- for more details.
14
+ The skilld CLI contains no Skill generation logic or Agent runtime.
17
15
 
18
- Skilld generates [agent skills](https://agentskills.io/home) from the references maintainers already create: docs, release notes and GitHub issues. With these we can create version-aware, local-first, and optimized skills.
16
+ ## Install the skilld CLI
19
17
 
20
- <p align="center">
21
- <table>
22
- <tbody>
23
- <td align="center">
24
- <sub>Made possible by my <a href="https://github.com/sponsors/harlan-zw">Sponsor Program 💖</a><br> Follow me <a href="https://twitter.com/harlan_zw">@harlan_zw</a> 🐦 - Join <a href="https://discord.gg/275MBUBvgP">Discord</a> for help</sub><br>
25
- </td>
26
- </tbody>
27
- </table>
28
- </p>
29
-
30
- ## Features
31
-
32
- - 🌍 **Any Source: Opt-in** - Any NPM dependency or GitHub source, docs auto-resolved
33
- - 📦 **Bleeding Edge Context** - Latest issues, discussions, and releases. Always use the latest best practices and avoid deprecated patterns.
34
- - 📚 **Opt-in LLM Sections** - Enhance skills with LLM-generated `Best Practices`, `API Changes`, or your own custom prompts
35
- - 🧩 **Use Any Agent** - Choose your agent: CLI , [pi](https://github.com/badlogic/pi-mono/tree/main/packages/ai) agents or no agent at all.
36
- - 🔍 **Semantic Search** - Query indexed docs across all skills via [retriv](https://github.com/harlan-zw/retriv) embeddings
37
- - 🧠 **Context-Aware** - Follows [Claude Code skill best practices](https://code.claude.com/docs/en/skills#add-supporting-files): SKILL.md stays under 500 lines, references are separate files the agent discovers on-demand - not inlined into context
38
- - 🎯 **Safe & Versioned** - Prompt injection sanitization, version-aware caching, auto-updates on new releases
39
- - 🤝 **Ecosystem** - Compatible with [`npx skills`](https://skills.sh/) and [skills-npm](https://github.com/antfu/skills-npm). Skilld auto-detects and uses skills-npm packages when available.
40
-
41
- ## Quick Start
42
-
43
- Run skilld in a project to generate skills for your dependencies through a simple interactive wizard:
44
-
45
- ```bash
46
- npx -y skilld
18
+ ```sh
19
+ npm install --global skilld
47
20
  ```
48
21
 
49
- __Requires Node 22.6.0 or higher.__
22
+ The npm package selects a native executable for the current system.
23
+ It has no JavaScript CLI engine or JavaScript fallback.
50
24
 
51
- Or add a specific package directly:
25
+ Ask your Agent to run the skilld-maintained Skill for the current session:
52
26
 
53
- ```bash
54
- npx -y skilld add npm:vue
27
+ ```sh
28
+ skilld run skilld
55
29
  ```
56
30
 
57
- If you need to re-configure skilld, just run `npx -y skilld config` to update your agent, model, or preferences.
58
-
59
- **No agent CLI?** No problem - choose "No agent" when prompted. You get a base skill immediately, plus portable prompts you can run in any LLM:
31
+ Install it only when you want your Agent to keep it across sessions:
60
32
 
61
- ```bash
62
- npx -y skilld add npm:vue
63
- # Choose "No agent" -> base skill + prompts exported
64
- # Paste prompts into ChatGPT/Claude web, save outputs, then:
65
- npx -y skilld author assemble
33
+ ```sh
34
+ skilld install skilld --global
66
35
  ```
67
36
 
68
- ### Tips
69
-
70
- - **Be selective** - Only add skills for packages your agent struggles with. Not every dependency needs one.
71
- - **LLM is optional** - Skills work without any LLM, but enhancing with one makes them significantly better.
72
- - **Multi-agent** - Run `skilld install --agent gemini-cli` to sync skills to another agent. The doc cache is shared.
73
-
74
- ## Installation
37
+ Use `--agent` when you want an explicit Agent target:
75
38
 
76
- ### Global
77
-
78
- Install globally to use `skilld` across all projects without `npx`:
79
-
80
- ```bash
81
- npm install -g skilld
82
- # or
83
- pnpm add -g skilld
39
+ ```sh
40
+ skilld install skilld --global --agent codex
84
41
  ```
85
42
 
86
- Then run `skilld` in any project directory.
43
+ ## Run a Skill without installing it
87
44
 
88
- ### Per-Project
45
+ `skilld run` is the default way to use a Skill.
46
+ It prints `SKILL.md` to stdout.
47
+ Ask your Agent to run the command and follow the printed instructions.
48
+ If you run it yourself, pass the output to your Agent.
89
49
 
90
- If you'd like to install skilld and track the lock file references, add it as a dev dependency:
91
-
92
- ```bash
93
- npm install -D skilld
94
- # or
95
- yarn add -D skilld
96
- # or
97
- pnpm add -D skilld
50
+ ```sh
51
+ npx skilld run skilld:skilld-dev/skills/vue
98
52
  ```
99
53
 
100
- ### Automatic Updates
54
+ A remote run writes no Skill files.
55
+ It creates no lockfile entry, Agent target, project file, or Skill cache.
56
+ The command retains no Skill files after it exits.
101
57
 
102
- Add to `package.json` to restore references and sync shipped skills on install:
58
+ skilld names the supporting files a Skill carries and prints none of them.
59
+ Read one when the instructions call for it:
103
60
 
104
- ```json
105
- {
106
- "scripts": {
107
- "prepare": "skilld prepare"
108
- }
109
- }
61
+ ```sh
62
+ npx skilld run skilld:skilld-dev/skills/vue --revision <commit> --file references/api.md
110
63
  ```
111
64
 
112
- This restores symlinks, auto-installs shipped skills from your deps, and notifies you when packages have new features or breaking changes. Run `skilld update` to regenerate LLM enhancements.
113
-
114
- ## FAQ
65
+ Use the revision and file-read command from the initial output.
66
+ skilld never prints executable or binary files.
67
+ A Skill that must run its own script needs an install.
115
68
 
116
- ### Why don't the skills run?
69
+ Install the Skill when you want it in every session:
117
70
 
118
- Try this in your project/user prompt:
119
-
120
- ```md
121
- Before modifying code, evaluate each installed skill against the current task.
122
- For each skill, determine YES/NO relevance and invoke all YES skills before proceeding.
71
+ ```sh
72
+ skilld install skilld:skilld-dev/skills/vue
123
73
  ```
124
74
 
125
- ### How is this different from Context7?
126
-
127
- Context7 is an MCP that fetches raw doc chunks at query time. You get different results each prompt, no curation, and it requires their server. Skilld is local-first: it generates a SKILL.md that lives in your project, tied to your actual package versions. No MCP dependency, no per-prompt latency, and it goes further with LLM-enhanced sections, prompt injection sanitization, and semantic search.
128
-
129
- ### Will I be prompt injected?
130
-
131
- Skilld pulls issues from GitHub which could be abused for potential prompt injection.
75
+ An install writes files. Ask the user first.
132
76
 
133
- Skilld treats all data as untrusted, running in permissioned environments and using best practices to avoid injections.
134
- However, always be cautious when using skills from untrusted sources.
77
+ ## Use the skilld CLI
135
78
 
136
- ### Do skills update when my deps update?
79
+ ```sh
80
+ # Find a Skill
81
+ skilld search vue
137
82
 
138
- Yes. Add `skilld prepare` to your prepare script. It restores references, auto-installs shipped skills, and tells you when packages are outdated. Run `skilld update` to regenerate LLM enhancements.
83
+ # Run a Skill for this session only
84
+ skilld run skilld:skilld-dev/skills/vue
139
85
 
140
- ## CLI Usage
86
+ # Read one supporting file that Skill carries
87
+ skilld run skilld:skilld-dev/skills/vue --revision <commit> --file references/api.md
141
88
 
142
- ```bash
143
- # Interactive mode - auto-discover from package.json
144
- skilld
89
+ # Install a Skill in the current project
90
+ skilld install skilld:skilld-dev/skills/vue
145
91
 
146
- # Add skills for specific package(s) — npm: prefix for registry packages
147
- skilld add npm:vue npm:nuxt npm:pinia
148
-
149
- # The same prefixes work in the interactive wizard's package prompt
150
-
151
- # Add a pre-authored skill from a GitHub repo
152
- skilld add gh:vercel-labs/agent-skills
153
-
154
- # Add a skill for a Rust crate (crates.io)
155
- skilld add crate:serde
156
-
157
- # Update outdated skills
158
- skilld update
159
- skilld update tailwindcss
160
-
161
- # Search docs across installed skills
162
- skilld search "useFetch options" -p nuxt
163
- skilld search "error" -p nuxt --filter '{"type":"issue"}'
164
- skilld search "routing" --agents claude-code
165
- skilld search --guide -p nuxt
166
-
167
- # Target a specific agent
168
- skilld add npm:react --agent cursor
169
-
170
- # Install globally to ~/.claude/skills
171
- skilld add npm:zod --global
172
-
173
- # Skip prompts
174
- skilld add npm:drizzle-orm --yes
175
-
176
- # Check skill info
177
- skilld info
178
-
179
- # List installed skills
92
+ # Inspect installed Skills
180
93
  skilld list
181
- skilld list --json
182
-
183
- # Manage settings
184
- skilld config
185
- ```
186
-
187
- ### Commands
188
-
189
- | Command | Description |
190
- |---------|-------------|
191
- | `skilld` | Interactive wizard (first run) or status menu (existing skills) |
192
- | `skilld add <source...>` | Add skills. Sources: `npm:<pkg>`, `crate:<name>`, `gh:<owner/repo>`, or bare names (deprecated) |
193
- | `skilld update [pkg]` | Update outdated skills (all or specific) |
194
- | `skilld search [query]` | Search indexed docs (`-p` package, `--agents` filter, `--filter` JSON, `--limit`, `--guide`) |
195
- | `skilld list` | List installed skills (`--json` for machine-readable output) |
196
- | `skilld info` | Show skill info and config |
197
- | `skilld config` | Configure agent, model, preferences |
198
- | `skilld install` | Restore references from lockfile |
199
- | `skilld remove` | Remove installed skills |
200
- | `skilld uninstall` | Remove all skilld data |
201
- | `skilld cache` | Cache management (clean expired LLM cache entries) |
202
- | `skilld author package <pkg>` | Generate a portable package skill from docs |
203
- | `skilld author publish` | Publish skills to skilld.dev |
204
- | `skilld author eject <pkg>` | Eject skill as portable directory (no symlinks) |
205
- | `skilld author validate <file>`| Validate a skill section |
206
- | `skilld author assemble [dir]` | Merge LLM output files back into SKILL.md (auto-discovers) |
207
-
208
- ### Works Without an Agent CLI
209
-
210
- No Claude, Gemini, or Codex CLI? Choose "No agent" when prompted. You get a base skill immediately, plus portable prompts you can run in any LLM to enhance it:
211
-
212
- ```bash
213
- skilld add npm:vue
214
- # Choose "No agent" -> installs to .claude/skills/vue-skilld/
215
-
216
- # What you get:
217
- # SKILL.md <- base skill (works immediately)
218
- # PROMPT_*.md <- prompts to enhance it with any LLM
219
- # references/ <- docs, issues, releases as real files
220
-
221
- # Run each PROMPT_*.md in ChatGPT/Claude web/any LLM
222
- # Save outputs as _BEST_PRACTICES.md, _API_CHANGES.md, then:
223
- skilld author assemble
224
- ```
225
-
226
- `skilld author assemble` auto-discovers skills with pending output files. `skilld update` re-exports prompts for outdated packages.
94
+ skilld view vue
227
95
 
228
- ### Local Models (Ollama)
96
+ # Keep Skills current
97
+ skilld verify vue
98
+ skilld update vue
229
99
 
230
- If [Ollama](https://ollama.com) is running, skilld auto-detects your locally-pulled text models and lists them in `skilld config` (and `-m ollama:<name>`):
100
+ # Check update relations for an Agent or CI
101
+ skilld update --check --json
231
102
 
232
- ```bash
233
- skilld add npm:vue -m ollama:qwen2.5:14b-instruct
103
+ # Remove a Skill
104
+ skilld remove vue
234
105
  ```
235
106
 
236
- Generation runs locally: free, offline, no API key. Unlike the CLI and API backends, the Ollama path is one-shot (it does not explore reference files with tools), so all source material is inlined into a single prompt. Best paired with a capable instruct model.
107
+ Project installs update `.skills/skilld-lock.yaml` and the selected Agent targets.
108
+ Use `--global` for account level Agent targets.
109
+ Use `--mode copy` or `--mode symlink` to control target writes.
237
110
 
238
- | Env var | Default | Purpose |
239
- |---------|---------|---------|
240
- | `OLLAMA_HOST` | `http://localhost:11434` | Ollama daemon address |
241
- | `OLLAMA_NUM_CTX` | `32768` | Context window; sized to fit the full prompt + output |
111
+ Run `skilld install` without a source to restore the lockfile state.
242
112
 
243
- The large default context can exceed memory for big models on constrained hardware (Ollama returns a 500). Lower `OLLAMA_NUM_CTX` or pick a smaller model if generation fails to load.
113
+ ## Artifact delivery
244
114
 
245
- ### Embedding Model
115
+ The skilld CLI resolves remote Skills through the skilld.dev API.
116
+ GitHub remains the source of truth.
246
117
 
247
- Search covers skills installed for every agent in the project, deduplicated. Restrict it with `--agents`:
118
+ skilld.dev builds an immutable Artifact from an exact Git commit.
119
+ The CLI checks its digest, Artifact attestation, check results, and archive before installation.
120
+ The CLI stops pending Artifact creation after at most 60 seconds.
248
121
 
249
- ```bash
250
- skilld search "routing" --agents claude-code
251
- skilld search "routing" --agents claude-code,codex
252
- ```
253
-
254
- `skilld search` is powered by a local embedding model. It runs offline through transformers.js. It needs no API key or network traffic after the first download. Pick one under **Embedding model** in `skilld config`:
255
-
256
- | Model | Dimensions | Notes |
257
- |-------|-----------:|-------|
258
- | `bge-small-en-v1.5` | 384 | Default. Fastest to index, smallest download. |
259
- | `bge-base-en-v1.5` | 768 | Balanced accuracy and speed. |
260
- | `Xenova/bge-large-en-v1.5` | 1024 | Most accurate English retrieval, slowest to index. |
261
- | `bge-m3` | 1024 | Multilingual, 8192-token context. |
262
-
263
- Larger models retrieve more accurately but cost more time and memory when indexing. Locally-pulled [Ollama](#ollama-embedding-models) models can be used too. Export `SKILLD_EMBED_MODEL` to override the saved setting for every index and search command in the current shell:
122
+ Private Repository delivery requires both:
264
123
 
265
- ```bash
266
- export SKILLD_EMBED_MODEL=bge-m3
267
- skilld update
268
- ```
269
-
270
- Search indexes must use one embedding model and device. Rebuild them after switching either setting:
124
+ - `skilld auth login` for a skilld.dev account
125
+ - Access through the skilld GitHub App installation
271
126
 
272
- ```bash
273
- skilld update
274
- ```
127
+ Private Artifact responses use short lived, one time grants.
128
+ The API does not expose private storage addresses.
275
129
 
276
- ### Ollama Embedding Models
130
+ ### Direct mode
277
131
 
278
- If [Ollama](https://ollama.com) is running, locally-pulled embedding models appear in the **Embedding model** picker alongside the built-in ones. They are addressed as `ollama:<name>`, matching the `-m ollama:<name>` syntax used for enhancement models:
132
+ `--direct` fetches a public GitHub Repository without the skilld.dev API.
133
+ Explicit GitHub selectors use hosted Artifact delivery unless you add `--direct`.
279
134
 
280
- ```bash
281
- ollama pull qwen3-embedding
282
- SKILLD_EMBED_MODEL=ollama:qwen3-embedding skilld add npm:vue
135
+ ```sh
136
+ skilld install github:skilld-dev/skilld/skills/skilld --direct --agent codex
283
137
  ```
284
138
 
285
- Only models that advertise the `embedding` capability are listed, so chat models cannot be selected by mistake. Dimensions and context length are read from Ollama. skilld validates each vector before indexing.
286
-
287
- This talks to Ollama's HTTP API directly. It needs no additional dependency or API key. Set `OLLAMA_HOST` to point at a non-default daemon. If Ollama is not running, the picker simply shows the built-in models.
139
+ The installed Skill receives the `unverified` source status.
140
+ The user reviews the Skill before use.
288
141
 
289
- Ollama manages its own execution device, so **Embedding device** does not apply to `ollama:` models.
142
+ Direct mode never handles private Repositories.
143
+ It never falls back to skilld.dev.
290
144
 
291
- ### Embedding Device
145
+ Generated commands use POSIX shell quoting on Unix.
146
+ They use PowerShell quoting on Windows.
292
147
 
293
- The embedding model runs on the CPU by default. **Embedding device** in `skilld config` moves it onto a GPU backend, which can be substantially faster:
148
+ ## Source status
294
149
 
295
- | Device | Notes |
296
- |--------|-------|
297
- | `auto` | Default. Lets transformers.js choose; CPU under Node. |
298
- | `cpu` | Always available, predictable. |
299
- | `webgpu` | Fastest on Apple Silicon in testing. |
300
- | `coreml` | Apple Neural Engine. Measured slower than CPU for these models. |
150
+ - `verified`: skilld checked a skilld.dev Artifact and its attestation.
151
+ - `local`: the Skill came from a local directory or a bundled skilld-maintained Skill.
152
+ - `unverified`: direct mode fetched the Skill from public GitHub.
301
153
 
302
- Measured on an Apple M5 Max, 120 documents, best of 3 after warm-up (docs/sec):
154
+ `verified` describes provenance checks.
155
+ It does not endorse the instructions inside a Skill.
303
156
 
304
- | Model | `cpu` | `coreml` | `webgpu` |
305
- |-------|------:|---------:|---------:|
306
- | `bge-small-en-v1.5` | 664 | 198 | **1713** |
307
- | `bge-base-en-v1.5` | 198 | 68 | **580** |
308
- | `Xenova/bge-large-en-v1.5` | 71 | 9 | **201** |
157
+ ## Account and configuration
309
158
 
310
- WebGPU was 2.6 to 2.9 times faster than CPU at every size. On WebGPU, `bge-large` indexed faster than `bge-base` on CPU and improved retrieval. CoreML was consistently slower.
159
+ ```sh
160
+ skilld auth login
161
+ skilld auth status
162
+ skilld auth logout
311
163
 
312
- The ranking is hardware-specific, so benchmark before trusting a device on other machines. Export `SKILLD_EMBED_DEVICE` to override the saved setting in the current shell:
313
-
314
- ```bash
315
- export SKILLD_EMBED_DEVICE=cpu
316
- skilld update
164
+ skilld config get agent.targets
165
+ skilld config set agent.targets codex,claude-code
166
+ skilld config list
317
167
  ```
318
168
 
319
- If a backend is unavailable, indexing fails to start. Switch back to `auto`.
320
-
321
- ### Eject
322
-
323
- Export a skill as a portable, self-contained directory for sharing via git repos:
324
-
325
- ```bash
326
- skilld author eject vue # Default skill directory
327
- skilld author eject vue --name vue # Custom directory name
328
- skilld author eject vue --out ./skills/ # Custom path
329
- skilld author eject vue --from 2025-07-01 # Only recent releases/issues
330
- ```
331
-
332
- Share via `skilld add gh:owner/repo` - consumers get fully functional skills with no LLM cost.
333
-
334
- ### CLI Options
169
+ Native builds store account credentials in the operating system keychain.
170
+ The CLI does not store tokens in environment variables or plain text files.
335
171
 
336
- | Option | Alias | Default | Description |
337
- |--------|-------|---------|-------------|
338
- | `--global` | `-g` | `false` | Install globally to `~/<agent>/skills` |
339
- | `--agent` | `-a` | auto-detect | Target specific agent (claude-code, cursor, etc.) |
340
- | `--yes` | `-y` | `false` | Skip prompts, use defaults |
341
- | `--force` | `-f` | `false` | Ignore all caches, re-fetch docs and regenerate |
342
- | `--model` | `-m` | config default | LLM model for skill generation (sonnet, haiku, opus, etc.) |
343
- | `--name` | `-n` | | Custom skill directory name (eject only) |
344
- | `--out` | `-o` | | Output directory path override (eject only) |
345
- | `--from` | | | Collect releases/issues/discussions from this date (YYYY-MM-DD, eject only) |
346
- | `--debug` | | `false` | Save raw LLM output to logs/ for each section |
172
+ ## Generate or review a Skill
347
173
 
348
- ## For Maintainers
174
+ Skill generation lives outside the skilld CLI.
349
175
 
350
- Ship skills with your npm package so consumers get them automatically. No LLM needed on their end.
176
+ Use these skilld-maintained Skills directly with your Agent:
351
177
 
352
- Install the official publication workflow for authoring, validation, packaging, and postpublish verification:
178
+ - [`generate-package-skill`](./skills/generate-package-skill)
179
+ - [`generate-project-skill`](./skills/generate-project-skill)
180
+ - [`review-skill`](./skills/review-skill)
181
+ - [`skilld`](./skills/skilld)
353
182
 
354
- ```bash
355
- npx skilld add gh:skilld-dev/skills --skill publish-skill --yes
356
- ```
357
-
358
- The skill orchestrates publication. `skilld author package` remains the deterministic package documentation generator it invokes.
183
+ Direct Skill runs remain user reviewed.
184
+ The instructions and changes stay visible to the user.
359
185
 
360
- ### Generate a skill
186
+ Use [`skilld-harness`](./packages/harness) when an application or CI needs strict output checks.
187
+ The Harness runs the same visible Skill files through an AI SDK Harness.
361
188
 
362
- From your package root (or monorepo root):
363
-
364
- ```bash
365
- npx skilld author
189
+ ```sh
190
+ pnpm add skilld-harness @ai-sdk/harness ws zod
366
191
  ```
367
192
 
368
- In a monorepo, skilld auto-detects workspaces and prompts which packages to generate for. Docs are resolved from: package `docs/`, monorepo `docs/content/`, `llms.txt`, or `README.md`.
369
-
370
- This creates a `skills/<your-package>/` directory with a `SKILL.md` and ejected reference files. It also adds `"skills"` to your `package.json` `files` array.
371
-
372
- ### How consumers get it
373
-
374
- Once published, consumers run:
375
-
376
- ```bash
377
- npx skilld prepare
378
- ```
193
+ ```ts
194
+ import { createSkillHarness } from 'skilld-harness'
379
195
 
380
- Or add it to their `package.json` so it runs on every install:
196
+ const skillHarness = createSkillHarness({ harness, sandbox })
381
197
 
382
- ```json
383
- {
384
- "scripts": {
385
- "prepare": "skilld prepare"
386
- }
387
- }
198
+ const result = await skillHarness.run({
199
+ _tag: 'PackageSkill',
200
+ source: { _tag: 'NpmPackage', spec: 'vue' },
201
+ destination: { rootDir: '.agents/skills', name: 'vue' },
202
+ })
388
203
  ```
389
204
 
390
- `skilld prepare` auto-detects shipped skills in `node_modules` and symlinks them into the agent's skill directory. Compatible with [skills-npm](https://github.com/antfu/skills-npm).
391
-
392
- ### Options
393
-
394
- | Flag | Alias | Default | Description |
395
- |:----------|:-----:|:-------:|:------------|
396
- | `--model` | `-m` | | LLM model for enhancement |
397
- | `--out` | `-o` | | Output directory (single package only) |
398
- | `--force` | `-f` | `false` | Clear cache and regenerate |
399
- | `--yes` | `-y` | `false` | Skip prompts, use defaults |
400
- | `--debug` | | `false` | Save raw LLM output to logs/ |
401
-
402
- ## The Landscape
403
-
404
- Several approaches exist for steering agent knowledge. Each fills a different niche:
405
-
406
- | Approach | Versioned | Curated | No Opt-in | Local | Any LLM |
407
- |:---------|:---------:|:-------:|:---------:|:-----:|:-------:|
408
- | **Manual rules** | - | yes | yes | yes | yes |
409
- | **llms.txt** | ~ | - | - | - | yes |
410
- | **MCP servers** | yes | - | - | - | - |
411
- | **skills.sh** | - | ~ | yes | - | - |
412
- | **skills-npm** | yes | yes | - | yes | - |
413
- | **skilld** | yes | yes | yes | yes | yes |
414
-
415
- > **Versioned** - tied to your installed package version. **Curated** - distilled best practices, not raw docs. **No Opt-in** - works without the package author doing anything. **Local** - runs on your machine, no external service dependency. **Any LLM** - works with any LLM, not just agent CLIs.
416
-
417
- - **Manual rules** (CLAUDE.md, .cursorrules): full control, but you need to already know the best practices and maintain them across every dep.
418
- - **[llms.txt](https://llmstxt.org/)**: standard convention for exposing docs to LLMs, but it's full docs not curated guidance and requires author adoption.
419
- - **MCP servers** (Context7, etc.): live, version-aware responses, but adds per-request latency and the maintainer has to build and maintain a server.
420
- - **[skills.sh](https://skills.sh/)**: easy skill sharing with a growing ecosystem, but community-sourced without version-awareness or author oversight.
421
- - **[skills-npm](https://github.com/antfu/skills-npm)**: the ideal end-state: zero-token skills shipped by the package author, but requires every maintainer to opt in. Skilld auto-detects and uses skills-npm packages when available.
422
- - **skilld**: generates version-aware skills from existing docs, changelogs, issues, and discussions. Works for any package without author opt-in.
205
+ See the [`skilld-harness` guide](./packages/harness/README.md) for its full contract.
423
206
 
424
- ## Telemetry
207
+ ## Upgrade from v2
425
208
 
426
- Skilld sends anonymous install events to [skills.sh](https://skills.sh/) so skills can be discovered and ranked. No personal information is collected.
209
+ v3 does not import v2 configuration or lockfiles.
210
+ Back up v2 state before replacing the CLI.
427
211
 
428
- Telemetry is automatically disabled in CI environments.
212
+ Follow the [v2 to v3 migration guide](./docs/migrate-v2-to-v3.md).
213
+ It maps removed commands and explains rollback limits.
429
214
 
430
- To opt out, set either environment variable:
215
+ ## v3 development
431
216
 
432
- ```bash
433
- DISABLE_TELEMETRY=1
434
- DO_NOT_TRACK=1
217
+ ```sh
218
+ pnpm install
219
+ pnpm test:run
220
+ pnpm lint
221
+ pnpm typecheck
222
+ pnpm build
435
223
  ```
436
224
 
437
- ## Related
225
+ The Rust workspace owns the skilld CLI.
226
+ `packages/harness` owns generation and review execution.
227
+ `packages/protocol` owns the skilld.dev wire contract.
228
+ `skills` owns the visible skilld-maintained Skills.
438
229
 
439
- - [skills-npm](https://github.com/antfu/skills-npm) - Convention for shipping agent skills in npm packages
440
- - [agentskills.io](https://agentskills.io) - Agent skills specification
441
- - [mdream](https://github.com/harlan-zw/mdream) - HTML to Markdown converter
442
- - [retriv](https://github.com/harlan-zw/retriv) - Vector search with sqlite-vec
230
+ The WASIp2 build remains an internal proof.
231
+ Published packages use native executables only.
443
232
 
444
233
  ## License
445
234
 
446
- Licensed under the [MIT license](https://github.com/skilld-dev/skilld/blob/main/LICENSE).
235
+ [MIT](./LICENSE)
package/bin/skilld.mjs ADDED
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ import { spawn } from 'node:child_process'
3
+ import { createRequire } from 'node:module'
4
+ import { constants } from 'node:os'
5
+ import { dirname, join } from 'node:path'
6
+
7
+ import { detectLibc, selectArtifact } from '../loader/resolve-artifact.mjs'
8
+
9
+ const require = createRequire(import.meta.url)
10
+
11
+ function resolvePackage(packageName, file) {
12
+ return Promise.resolve()
13
+ .then(() => join(dirname(require.resolve(`${packageName}/package.json`)), file))
14
+ .catch((error) => {
15
+ if (error?.code === 'MODULE_NOT_FOUND' || error?.code === 'ERR_PACKAGE_PATH_NOT_EXPORTED')
16
+ return undefined
17
+ throw error
18
+ })
19
+ }
20
+
21
+ async function main() {
22
+ const artifact = await selectArtifact({
23
+ arch: process.arch,
24
+ libc: process.platform === 'linux' ? detectLibc() : undefined,
25
+ platform: process.platform,
26
+ }, resolvePackage)
27
+
28
+ if (artifact._tag === 'Unavailable') {
29
+ process.stderr.write(`${artifact.message}\n`)
30
+ process.exitCode = 2
31
+ return
32
+ }
33
+
34
+ const child = spawn(artifact.executable, process.argv.slice(2), {
35
+ cwd: process.cwd(),
36
+ env: process.env,
37
+ shell: false,
38
+ stdio: 'inherit',
39
+ })
40
+
41
+ for (const signal of ['SIGINT', 'SIGTERM'])
42
+ process.on(signal, () => child.kill(signal))
43
+
44
+ child.on('error', (error) => {
45
+ process.stderr.write(`SERVICE_UNAVAILABLE: ${error.message}\n`)
46
+ process.exitCode = 2
47
+ })
48
+ child.on('exit', (code, signal) => {
49
+ process.exitCode = code ?? 128 + (constants.signals[signal] ?? 0)
50
+ })
51
+ }
52
+
53
+ main().catch((error) => {
54
+ process.stderr.write(`SERVICE_UNAVAILABLE: ${error.message}\n`)
55
+ process.exitCode = 2
56
+ })