skilld 0.8.1 → 0.9.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 +28 -0
- package/dist/_chunks/chunk.mjs +13 -0
- package/dist/_chunks/config.mjs +25 -0
- package/dist/_chunks/config.mjs.map +1 -0
- package/dist/_chunks/detect-imports.mjs +2005 -0
- package/dist/_chunks/detect-imports.mjs.map +1 -0
- package/dist/_chunks/embedding-cache.mjs +50 -0
- package/dist/_chunks/embedding-cache.mjs.map +1 -0
- package/dist/_chunks/npm.mjs +1941 -0
- package/dist/_chunks/npm.mjs.map +1 -0
- package/dist/_chunks/pool2.mjs +120 -0
- package/dist/_chunks/pool2.mjs.map +1 -0
- package/dist/_chunks/storage.mjs +436 -0
- package/dist/_chunks/storage.mjs.map +1 -0
- package/dist/_chunks/types.d.mts +90 -0
- package/dist/_chunks/types.d.mts.map +1 -0
- package/dist/_chunks/utils.d.mts +541 -0
- package/dist/_chunks/utils.d.mts.map +1 -0
- package/dist/_chunks/version.d.mts +153 -0
- package/dist/_chunks/version.d.mts.map +1 -0
- package/dist/_chunks/yaml.mjs +468 -0
- package/dist/_chunks/yaml.mjs.map +1 -0
- package/dist/agent/index.d.mts +318 -1
- package/dist/agent/index.d.mts.map +1 -0
- package/dist/agent/index.mjs +6 -1
- package/dist/cache/index.d.mts +2 -1
- package/dist/cache/index.mjs +3 -1
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +4275 -1
- package/dist/cli.mjs.map +1 -0
- package/dist/index.d.mts +6 -1
- package/dist/index.mjs +10 -1
- package/dist/retriv/index.d.mts +26 -1
- package/dist/retriv/index.d.mts.map +1 -0
- package/dist/retriv/index.mjs +109 -1
- package/dist/retriv/index.mjs.map +1 -0
- package/dist/retriv/worker.d.mts +33 -1
- package/dist/retriv/worker.d.mts.map +1 -0
- package/dist/retriv/worker.mjs +51 -1
- package/dist/retriv/worker.mjs.map +1 -0
- package/dist/sources/index.d.mts +2 -1
- package/dist/sources/index.mjs +4 -1
- package/dist/types.d.mts +6 -1
- package/dist/types.mjs +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -159,6 +159,20 @@ skilld config
|
|
|
159
159
|
| `skilld uninstall` | Remove all skilld data |
|
|
160
160
|
| `skilld cache` | Cache management (clean expired LLM cache entries) |
|
|
161
161
|
|
|
162
|
+
### Eject
|
|
163
|
+
|
|
164
|
+
Export a skill as a portable, self-contained directory with references copied as real files instead of symlinks. Useful for sharing skills via git repos.
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Eject to the default skill directory
|
|
168
|
+
skilld add vue --eject
|
|
169
|
+
|
|
170
|
+
# Eject to a custom path
|
|
171
|
+
skilld add vue --eject ./skills/vue/
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
The ejected skill contains `SKILL.md` plus a `references/` directory with docs, issues, and releases as real files. Share it via `skilld add owner/repo` — consumers get fully functional skills with no LLM cost.
|
|
175
|
+
|
|
162
176
|
### CLI Options
|
|
163
177
|
|
|
164
178
|
| Option | Alias | Default | Description |
|
|
@@ -168,6 +182,7 @@ skilld config
|
|
|
168
182
|
| `--yes` | `-y` | `false` | Skip prompts, use defaults |
|
|
169
183
|
| `--force` | `-f` | `false` | Ignore all caches, re-fetch docs and regenerate |
|
|
170
184
|
| `--model` | `-m` | config default | LLM model for skill generation (sonnet, haiku, opus, etc.) |
|
|
185
|
+
| `--eject` | `-e` | | Eject skill with references as real files (optional path override) |
|
|
171
186
|
| `--debug` | | `false` | Save raw LLM output to logs/ for each section |
|
|
172
187
|
|
|
173
188
|
## The Landscape
|
|
@@ -192,6 +207,19 @@ Several approaches exist for steering agent knowledge. Each fills a different ni
|
|
|
192
207
|
- **[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.
|
|
193
208
|
- **skilld**: generates version-aware skills from existing docs, changelogs, issues, and discussions. Works for any package without author opt-in.
|
|
194
209
|
|
|
210
|
+
## Telemetry
|
|
211
|
+
|
|
212
|
+
Skilld sends anonymous install events to [skills.sh](https://skills.sh/) so skills can be discovered and ranked. No personal information is collected.
|
|
213
|
+
|
|
214
|
+
Telemetry is automatically disabled in CI environments.
|
|
215
|
+
|
|
216
|
+
To opt out, set either environment variable:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
DISABLE_TELEMETRY=1
|
|
220
|
+
DO_NOT_TRACK=1
|
|
221
|
+
```
|
|
222
|
+
|
|
195
223
|
## Related
|
|
196
224
|
|
|
197
225
|
- [skills-npm](https://github.com/antfu/skills-npm) - Convention for shipping agent skills in npm packages
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
13
|
+
export { __require as n, __exportAll as t };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { homedir } from "node:os";
|
|
2
|
+
import { join, resolve } from "pathe";
|
|
3
|
+
const VALID_PKG_NAME = /^(?:@[a-z0-9][-a-z0-9._]*\/)?[a-z0-9][-a-z0-9._]*$/;
|
|
4
|
+
const VALID_VERSION = /^[a-z0-9][-\w.+]*$/i;
|
|
5
|
+
function getVersionKey(version) {
|
|
6
|
+
return version;
|
|
7
|
+
}
|
|
8
|
+
function getCacheKey(name, version) {
|
|
9
|
+
return `${name}@${getVersionKey(version)}`;
|
|
10
|
+
}
|
|
11
|
+
function getCacheDir(name, version) {
|
|
12
|
+
if (!VALID_PKG_NAME.test(name)) throw new Error(`Invalid package name: ${name}`);
|
|
13
|
+
if (!VALID_VERSION.test(version)) throw new Error(`Invalid version: ${version}`);
|
|
14
|
+
const dir = resolve(REFERENCES_DIR, getCacheKey(name, version));
|
|
15
|
+
if (!dir.startsWith(REFERENCES_DIR)) throw new Error(`Path traversal detected: ${dir}`);
|
|
16
|
+
return dir;
|
|
17
|
+
}
|
|
18
|
+
const CACHE_DIR = join(homedir(), ".skilld");
|
|
19
|
+
const REFERENCES_DIR = join(CACHE_DIR, "references");
|
|
20
|
+
function getPackageDbPath(name, version) {
|
|
21
|
+
return join(REFERENCES_DIR, getCacheKey(name, version), "search.db");
|
|
22
|
+
}
|
|
23
|
+
export { getCacheKey as a, getCacheDir as i, REFERENCES_DIR as n, getVersionKey as o, getPackageDbPath as r, CACHE_DIR as t };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=config.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.mjs","names":[],"sources":["../../src/cache/version.ts","../../src/cache/config.ts"],"sourcesContent":["/**\n * Version utilities\n */\n\nimport { resolve } from 'pathe'\nimport { REFERENCES_DIR } from './config.ts'\n\n/** Validate npm package name (scoped or unscoped) */\nconst VALID_PKG_NAME = /^(?:@[a-z0-9][-a-z0-9._]*\\/)?[a-z0-9][-a-z0-9._]*$/\n\n/** Validate version string (semver-ish, no path separators) */\nconst VALID_VERSION = /^[a-z0-9][-\\w.+]*$/i\n\n/**\n * Get exact version key for cache keying\n */\nexport function getVersionKey(version: string): string {\n return version\n}\n\n/**\n * Get cache key for a package: name@version\n */\nexport function getCacheKey(name: string, version: string): string {\n return `${name}@${getVersionKey(version)}`\n}\n\n/**\n * Get path to cached package references.\n * Validates name/version to prevent path traversal.\n */\nexport function getCacheDir(name: string, version: string): string {\n if (!VALID_PKG_NAME.test(name))\n throw new Error(`Invalid package name: ${name}`)\n if (!VALID_VERSION.test(version))\n throw new Error(`Invalid version: ${version}`)\n\n const dir = resolve(REFERENCES_DIR, getCacheKey(name, version))\n if (!dir.startsWith(REFERENCES_DIR))\n throw new Error(`Path traversal detected: ${dir}`)\n return dir\n}\n","/**\n * Cache configuration\n */\n\nimport { homedir } from 'node:os'\nimport { join } from 'pathe'\nimport { getCacheKey } from './version.ts'\n\n/** Global cache directory */\nexport const CACHE_DIR = join(homedir(), '.skilld')\n\n/** References subdirectory */\nexport const REFERENCES_DIR = join(CACHE_DIR, 'references')\n\n/** Get search DB path for a specific package@version */\nexport function getPackageDbPath(name: string, version: string): string {\n return join(REFERENCES_DIR, getCacheKey(name, version), 'search.db')\n}\n"],"mappings":";;AAQA,MAAM,iBAAiB;AAGvB,MAAM,gBAAgB;AAKtB,SAAgB,cAAc,SAAyB;AACrD,QAAO;;AAMT,SAAgB,YAAY,MAAc,SAAyB;AACjE,QAAO,GAAG,KAAK,GAAG,cAAc,QAAQ;;AAO1C,SAAgB,YAAY,MAAc,SAAyB;AACjE,KAAI,CAAC,eAAe,KAAK,KAAK,CAC5B,OAAM,IAAI,MAAM,yBAAyB,OAAO;AAClD,KAAI,CAAC,cAAc,KAAK,QAAQ,CAC9B,OAAM,IAAI,MAAM,oBAAoB,UAAU;CAEhD,MAAM,MAAM,QAAQ,gBAAgB,YAAY,MAAM,QAAQ,CAAC;AAC/D,KAAI,CAAC,IAAI,WAAW,eAAe,CACjC,OAAM,IAAI,MAAM,4BAA4B,MAAM;AACpD,QAAO;;AC/BT,MAAa,YAAY,KAAK,SAAS,EAAE,UAAU;AAGnD,MAAa,iBAAiB,KAAK,WAAW,aAAa;AAG3D,SAAgB,iBAAiB,MAAc,SAAyB;AACtE,QAAO,KAAK,gBAAgB,YAAY,MAAM,QAAQ,EAAE,YAAY"}
|