skilld 0.4.0 → 0.4.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.
- package/README.md +19 -5
- package/dist/_chunks/detect-imports.mjs +3 -4
- package/dist/_chunks/detect-imports.mjs.map +1 -1
- package/dist/_chunks/{pool.mjs → pool2.mjs} +7 -2
- package/dist/_chunks/pool2.mjs.map +1 -0
- package/dist/_chunks/releases.mjs +361 -31
- package/dist/_chunks/releases.mjs.map +1 -1
- package/dist/_chunks/storage.mjs +241 -2
- package/dist/_chunks/storage.mjs.map +1 -1
- package/dist/_chunks/utils.d.mts +4 -3
- package/dist/_chunks/utils.d.mts.map +1 -1
- package/dist/agent/index.d.mts.map +1 -1
- package/dist/cli.mjs +366 -41
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +0 -1
- package/dist/retriv/index.mjs +1 -1
- package/dist/retriv/index.mjs.map +1 -1
- package/dist/sources/index.mjs +1 -2
- package/package.json +1 -1
- package/dist/_chunks/git-skills.mjs +0 -319
- package/dist/_chunks/git-skills.mjs.map +0 -1
- package/dist/_chunks/pool.mjs.map +0 -1
- package/dist/_chunks/sanitize2.mjs +0 -249
- package/dist/_chunks/sanitize2.mjs.map +0 -1
- package/dist/_chunks/sync-git.mjs +0 -69
- package/dist/_chunks/sync-git.mjs.map +0 -1
- package/dist/_chunks/sync-parallel.mjs +0 -302
- package/dist/_chunks/sync-parallel.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://npm.chart.dev/skilld)
|
|
5
5
|
[](https://github.com/harlan-zw/skilld/blob/main/LICENSE)
|
|
6
6
|
|
|
7
|
-
>
|
|
7
|
+
> Generate AI agent skills from your NPM dependencies.
|
|
8
8
|
|
|
9
9
|
## Why?
|
|
10
10
|
|
|
@@ -54,9 +54,9 @@ If you need to re-configure skilld, just run `npx -y skilld config` to update yo
|
|
|
54
54
|
|
|
55
55
|
### Tips
|
|
56
56
|
|
|
57
|
-
- **Be selective**
|
|
58
|
-
- **LLM
|
|
59
|
-
- **Multi-agent
|
|
57
|
+
- **Be selective** - Only add skills for packages your agent struggles with. Not every dependency needs one.
|
|
58
|
+
- **LLM is optional** - Skills work without any LLM, but enhancing with one makes them significantly better.
|
|
59
|
+
- **Multi-agent** - Run `skilld install --agent gemini-cli` to sync skills to another agent. The doc cache is shared.
|
|
60
60
|
|
|
61
61
|
## Installation
|
|
62
62
|
|
|
@@ -85,7 +85,7 @@ Add to `package.json` to keep skills fresh on install:
|
|
|
85
85
|
## CLI Usage
|
|
86
86
|
|
|
87
87
|
```bash
|
|
88
|
-
# Interactive mode
|
|
88
|
+
# Interactive mode - auto-discover from package.json
|
|
89
89
|
skilld
|
|
90
90
|
|
|
91
91
|
# Add skills for specific package(s)
|
|
@@ -147,6 +147,20 @@ skilld config
|
|
|
147
147
|
| `--prepare` | | `false` | Non-interactive sync for prepare hook (outdated only) |
|
|
148
148
|
| `--background` | `-b` | `false` | Run `--prepare` in a detached background process |
|
|
149
149
|
|
|
150
|
+
## FAQ
|
|
151
|
+
|
|
152
|
+
### How is this different from Context7?
|
|
153
|
+
|
|
154
|
+
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.
|
|
155
|
+
|
|
156
|
+
### Aren't these just AI convention files?
|
|
157
|
+
|
|
158
|
+
Similar idea, but instead of hand-writing them, skilld generates them from the latest package docs, issues, and releases. This makes them considerably more accurate at a low token cost. They also auto-update when your dependencies ship new versions.
|
|
159
|
+
|
|
160
|
+
### Do skills update when my deps update?
|
|
161
|
+
|
|
162
|
+
Yes. Run `skilld update` to regenerate outdated skills, or add `skilld --prepare -b` to your prepare script and they regenerate in the background whenever you install packages.
|
|
163
|
+
|
|
150
164
|
## Related
|
|
151
165
|
|
|
152
166
|
- [skills-npm](https://github.com/antfu/skills-npm) - Convention for shipping agent skills in npm packages
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as writeSections, h as readCachedSection } from "./storage.mjs";
|
|
1
|
+
import { _ as writeSections, b as sanitizeMarkdown, h as readCachedSection, y as repairMarkdown } from "./storage.mjs";
|
|
3
2
|
import { t as yamlEscape } from "./yaml.mjs";
|
|
4
3
|
import { createRequire } from "node:module";
|
|
5
4
|
import { homedir } from "node:os";
|
|
@@ -9,7 +8,9 @@ import { exec, spawn, spawnSync } from "node:child_process";
|
|
|
9
8
|
import { globby } from "globby";
|
|
10
9
|
import { findDynamicImports, findStaticImports } from "mlly";
|
|
11
10
|
import { createHash } from "node:crypto";
|
|
11
|
+
import { promisify } from "node:util";
|
|
12
12
|
import { readFile } from "node:fs/promises";
|
|
13
|
+
import { parseSync } from "oxc-parser";
|
|
13
14
|
var __defProp = Object.defineProperty;
|
|
14
15
|
var __exportAll = (all, no_symbols) => {
|
|
15
16
|
let target = {};
|
|
@@ -1315,7 +1316,6 @@ function getModelLabel(id) {
|
|
|
1315
1316
|
return `${targets[config.agentId]?.displayName ?? config.cli} · ${config.name}`;
|
|
1316
1317
|
}
|
|
1317
1318
|
async function getAvailableModels() {
|
|
1318
|
-
const { promisify } = await import("node:util");
|
|
1319
1319
|
const execAsync = promisify(exec);
|
|
1320
1320
|
const agentsWithCli = detectInstalledAgents().filter((id) => targets[id].cli);
|
|
1321
1321
|
const cliChecks = await Promise.all(agentsWithCli.map(async (agentId) => {
|
|
@@ -1733,7 +1733,6 @@ function extractModuleStrings(node) {
|
|
|
1733
1733
|
async function detectNuxtModules(cwd) {
|
|
1734
1734
|
const config = await findNuxtConfig(cwd);
|
|
1735
1735
|
if (!config) return [];
|
|
1736
|
-
const { parseSync } = await import("oxc-parser");
|
|
1737
1736
|
const modules = extractModuleStrings(parseSync(config.path, config.content).program);
|
|
1738
1737
|
const seen = /* @__PURE__ */ new Set();
|
|
1739
1738
|
const packages = [];
|