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 CHANGED
@@ -4,7 +4,7 @@
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/harlan-zw/skilld/blob/main/LICENSE)
6
6
 
7
- > Expert SKILL.md knowledge for your NPM dependencies.
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** only add skills for packages your agent already struggles with or that you're actively debugging. Not every dependency needs a skill.
58
- - **LLM enhancement is optional** skilld generates a useful SKILL.md without any LLM, but enhancing with one makes them significantly better. This costs tokens, so be mindful.
59
- - **Multi-agent support** if you switch between agents (e.g. Claude Code and Gemini CLI), run `skilld install --agent gemini-cli` to sync your existing skills to the other agent. The doc cache is shared, so nothing is re-downloaded.
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 auto-discover from package.json
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 { n as sanitizeMarkdown, t as repairMarkdown } from "./sanitize2.mjs";
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 = [];