skilld 0.2.0 → 0.2.1
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 +55 -106
- package/dist/cli.mjs +7 -1
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://npmjs.com/package/skilld)
|
|
4
4
|
[](https://npm.chart.dev/skilld)
|
|
5
|
-
[](https://github.com/harlan-zw/skilld/blob/main/LICENSE)
|
|
6
6
|
|
|
7
|
-
>
|
|
7
|
+
> Expert SKILL.md knowledge for your NPM dependencies.
|
|
8
8
|
|
|
9
9
|
## Why?
|
|
10
10
|
|
|
11
|
-
Agents
|
|
11
|
+
Agents suck at following latest conventions beyond their [reliable knowledge cut-off](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison). They shoot themselves in the foot
|
|
12
|
+
with new APIs and conventions, and they don't know what they don't know.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
[Agent Skills](https://agentskills.io/home) help us solve this by distilling the most important patterns and conventions for a package into a single SKILL.md file.
|
|
15
|
+
Getting skills for our packages either involves the maintainer (or ourselves) taking on the maintenance burden and surfacing them or using skill sharing
|
|
16
|
+
sites like [skills.sh](https://skills.sh/).
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
While these are great for generic skills, they aren't good for NPM skills:
|
|
19
|
+
- No version-awareness, high maintenance burden to keep up with new releases and deprecations
|
|
20
|
+
- Non-optimized context windows, prompt injection risks
|
|
21
|
+
- Community-sourced skills leak personal opinions and biases. Maintainers are out of the loop, and may not even know about them.
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
npm install vueuse → skilld add vueuse → AI knows current vueuse API
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Compatible with [skills-npm](https://github.com/antfu/skills-npm)—if a package ships a `skills/` directory, skilld uses it directly. Generation is the fallback.
|
|
23
|
+
Skilld leverages maintainers existing effort. Maintainers write great docs for us, we generate our own local skills optimized for our models and codebase from them.
|
|
24
24
|
|
|
25
25
|
<p align="center">
|
|
26
26
|
<table>
|
|
@@ -34,20 +34,36 @@ Compatible with [skills-npm](https://github.com/antfu/skills-npm)—if a package
|
|
|
34
34
|
|
|
35
35
|
## Features
|
|
36
36
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
37
|
+
- 🌍 **Any NPM Package** - Repo, docs, releases, issues, discussions
|
|
38
|
+
- 🤖 **BYO Agent** - Generate SKILL.md with or without an LLM
|
|
39
|
+
- 📚 **Customizable** - `Best practices`, `LLM Gaps`, `Doc Map` or your own prompts
|
|
40
|
+
- 🔍 **Semantic Search** - Token-optimized search via [retriv](https://github.com/harlan-zw/retriv)
|
|
41
|
+
- 🎯 **Safe** - Prompt injection sanitization, version-aware output
|
|
42
|
+
- 🤝 **Ecosystem** - [skills-npm](https://github.com/antfu/skills-npm) and `/llms.txt` support
|
|
43
|
+
|
|
44
|
+
## Quick Start
|
|
45
|
+
|
|
46
|
+
Run skilld in a project to generate skills for your dependencies through a simple interactive wizard:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx skilld
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
If you need to re-configure skilld, just run `npx skilld config` to update your agent, model, or preferences.
|
|
43
53
|
|
|
44
54
|
## Installation
|
|
45
55
|
|
|
56
|
+
If you'd like to install skilld and track the lock file references, add it as a dev dependency:
|
|
57
|
+
|
|
46
58
|
```bash
|
|
47
|
-
|
|
59
|
+
npm install -D skilld
|
|
60
|
+
# or
|
|
61
|
+
yarn add -D skilld
|
|
62
|
+
# or
|
|
63
|
+
pnpm add -D skilld
|
|
48
64
|
```
|
|
49
65
|
|
|
50
|
-
|
|
66
|
+
### Automatic Updates
|
|
51
67
|
|
|
52
68
|
Add to `package.json` to keep skills fresh on install:
|
|
53
69
|
|
|
@@ -59,8 +75,6 @@ Add to `package.json` to keep skills fresh on install:
|
|
|
59
75
|
}
|
|
60
76
|
```
|
|
61
77
|
|
|
62
|
-
skilld fast-paths unchanged versions—only regenerates when minor/major versions bump.
|
|
63
|
-
|
|
64
78
|
## CLI Usage
|
|
65
79
|
|
|
66
80
|
```bash
|
|
@@ -87,8 +101,12 @@ skilld add vueuse --global
|
|
|
87
101
|
# Skip prompts
|
|
88
102
|
skilld add vueuse --yes
|
|
89
103
|
|
|
90
|
-
# Check skill
|
|
91
|
-
skilld
|
|
104
|
+
# Check skill info
|
|
105
|
+
skilld info
|
|
106
|
+
|
|
107
|
+
# List installed skills
|
|
108
|
+
skilld list
|
|
109
|
+
skilld list --json
|
|
92
110
|
|
|
93
111
|
# Manage settings
|
|
94
112
|
skilld config
|
|
@@ -102,11 +120,13 @@ skilld config
|
|
|
102
120
|
| `skilld add <pkg...>` | Add skills for package(s), space or comma-separated |
|
|
103
121
|
| `skilld update [pkg]` | Update outdated skills (all or specific) |
|
|
104
122
|
| `skilld search <query>` | Search indexed docs (`-p` to filter by package) |
|
|
105
|
-
| `skilld
|
|
106
|
-
| `skilld
|
|
107
|
-
| `skilld
|
|
108
|
-
| `skilld
|
|
109
|
-
| `skilld
|
|
123
|
+
| `skilld list` | List installed skills (`--json` for machine-readable output) |
|
|
124
|
+
| `skilld info` | Show skill info and config |
|
|
125
|
+
| `skilld config` | Configure agent, model, preferences |
|
|
126
|
+
| `skilld install` | Restore references from lockfile |
|
|
127
|
+
| `skilld remove` | Remove installed skills |
|
|
128
|
+
| `skilld uninstall` | Remove all skilld data |
|
|
129
|
+
| `skilld cache` | Cache management (clean expired LLM cache entries) |
|
|
110
130
|
|
|
111
131
|
### CLI Options
|
|
112
132
|
|
|
@@ -116,87 +136,16 @@ skilld config
|
|
|
116
136
|
| `--agent` | `-a` | auto-detect | Target specific agent (claude-code, cursor, etc.) |
|
|
117
137
|
| `--yes` | `-y` | `false` | Skip prompts, use defaults |
|
|
118
138
|
| `--force` | `-f` | `false` | Ignore all caches, re-fetch docs and regenerate |
|
|
119
|
-
| `--
|
|
120
|
-
| `--
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
Package name → Resolve docs → Fetch → Generate → Install
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
1. **Resolve** - Looks up npm registry for homepage, repository URL
|
|
129
|
-
2. **Fetch** - Tries versioned git docs → GitHub README → llms.txt (via ungh)
|
|
130
|
-
3. **Generate** - Your agent creates SKILL.md from fetched docs
|
|
131
|
-
4. **Cache** - References stored in `~/.skilld/` (shared across projects)
|
|
132
|
-
5. **Install** - Writes SKILL.md to `./<agent>/skills/<package>/` (e.g. `.claude/skills/vueuse/`)
|
|
133
|
-
|
|
134
|
-
Supported agents: Claude Code, Cursor, Windsurf, Cline, Codex, GitHub Copilot, Gemini CLI, Goose, Amp, OpenCode, Roo Code
|
|
135
|
-
|
|
136
|
-
## Output Structure
|
|
137
|
-
|
|
138
|
-
Skills install to each detected agent's skill directory. References are cached globally and shared across projects:
|
|
139
|
-
|
|
140
|
-
```
|
|
141
|
-
.claude/skills/vueuse/
|
|
142
|
-
├── SKILL.md # Project-specific, adapts to your conventions
|
|
143
|
-
└── .skilld/ # Gitignored, recreated by `skilld install`
|
|
144
|
-
├── pkg -> node_modules/vueuse
|
|
145
|
-
└── docs -> ~/.skilld/references/vueuse@10.9.0/docs
|
|
146
|
-
|
|
147
|
-
~/.skilld/references/
|
|
148
|
-
└── vueuse@10.9.0/ # Global cache, static docs
|
|
149
|
-
├── docs/
|
|
150
|
-
├── issues/
|
|
151
|
-
└── discussions/
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
SKILL.md is regenerated per-project (different conventions), but references stay static (same package docs). Version frontmatter enables sync:
|
|
155
|
-
|
|
156
|
-
```yaml
|
|
157
|
-
---
|
|
158
|
-
name: vueuse
|
|
159
|
-
version: 10.9.0
|
|
160
|
-
description: Collection of Vue Composition Utilities
|
|
161
|
-
---
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
## Package.json Auto-Discovery
|
|
165
|
-
|
|
166
|
-
Run `skilld` without arguments to interactively generate skills for your dependencies:
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
cd my-project
|
|
170
|
-
pnpx skilld
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
On first run, skilld launches a wizard to configure your agent and model, then lets you choose packages from:
|
|
174
|
-
- **Source imports** — scans your code for actually used packages
|
|
175
|
-
- **package.json** — all dependencies and devDependencies
|
|
176
|
-
- **Manual entry** — comma-separated package names
|
|
177
|
-
|
|
178
|
-
Skips `@types/*` and common dev tools (typescript, eslint, vitest, etc).
|
|
179
|
-
|
|
180
|
-
## Shipped Skills (skills-npm)
|
|
181
|
-
|
|
182
|
-
skilld supports the [skills-npm](https://github.com/antfu/skills-npm) convention. If a package ships a `skills/` directory, skilld symlinks it directly — no doc fetching, no caching, no LLM generation, no tokens spent.
|
|
183
|
-
|
|
184
|
-
```
|
|
185
|
-
node_modules/@slidev/cli/skills/
|
|
186
|
-
slidev/
|
|
187
|
-
SKILL.md
|
|
188
|
-
references/
|
|
189
|
-
|
|
190
|
-
→ .claude/skills/slidev -> node_modules/@slidev/cli/skills/slidev
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
Package authors can ship skills alongside their code. skilld detects and links them automatically during sync. Generation is the fallback for packages that haven't adopted the convention yet.
|
|
139
|
+
| `--model` | `-m` | config default | LLM model for skill generation (sonnet, haiku, opus, etc.) |
|
|
140
|
+
| `--debug` | | `false` | Save raw LLM output to logs/ for each section |
|
|
141
|
+
| `--prepare` | | `false` | Non-interactive sync for prepare hook (outdated only) |
|
|
142
|
+
| `--background` | `-b` | `false` | Run `--prepare` in a detached background process |
|
|
194
143
|
|
|
195
144
|
## Related
|
|
196
145
|
|
|
197
146
|
- [skills-npm](https://github.com/antfu/skills-npm) - Convention for shipping agent skills in npm packages
|
|
198
|
-
- [mdream](https://github.com/harlan-zw/mdream) - HTML to Markdown converter
|
|
199
|
-
- [retriv](https://github.com/harlan-zw/retriv) - Vector
|
|
147
|
+
- [mdream](https://github.com/harlan-zw/mdream) - HTML to Markdown converter
|
|
148
|
+
- [retriv](https://github.com/harlan-zw/retriv) - Vector search with sqlite-vec
|
|
200
149
|
|
|
201
150
|
## License
|
|
202
151
|
|
package/dist/cli.mjs
CHANGED
|
@@ -3193,7 +3193,13 @@ runMain(defineCommand({
|
|
|
3193
3193
|
message: "Enter package names (space or comma-separated)",
|
|
3194
3194
|
placeholder: "vue nuxt pinia"
|
|
3195
3195
|
});
|
|
3196
|
-
if (p.isCancel(input))
|
|
3196
|
+
if (p.isCancel(input)) {
|
|
3197
|
+
if (!hasPkgJson) {
|
|
3198
|
+
p.cancel("Setup cancelled");
|
|
3199
|
+
return;
|
|
3200
|
+
}
|
|
3201
|
+
continue;
|
|
3202
|
+
}
|
|
3197
3203
|
if (!input) {
|
|
3198
3204
|
p.log.warn("No packages entered");
|
|
3199
3205
|
continue;
|