skilllib 1.7.0 → 1.11.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 +83 -35
- package/dist/{chunk-AYAN7Q2X.js → chunk-LO4FMXDE.js} +446 -148
- package/dist/index.js +12 -6
- package/dist/json.d.cts +222 -0
- package/dist/json.d.ts +222 -0
- package/dist/{tui-RU255WYX.js → tui-3LDZ5GOZ.js} +350 -107
- package/package.json +16 -3
- package/skills/skilllib/SKILL.md +12 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skilllib",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Manage your agent skills like dependencies. One library for all your skills; each repo gets only the ones it needs, and every agent can see them. Works with Claude Code, Cursor, Codex and
|
|
3
|
+
"version": "1.11.0",
|
|
4
|
+
"description": "Manage your agent skills like dependencies. One library for all your skills; each repo gets only the ones it needs, and every agent can see them. Works with Claude Code, Cursor, Codex, Zed and Grok.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-skills",
|
|
7
7
|
"skills",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"cursor",
|
|
12
12
|
"codex",
|
|
13
13
|
"zed",
|
|
14
|
+
"grok",
|
|
14
15
|
"ai-agents",
|
|
15
16
|
"skills-manager",
|
|
16
17
|
"cli",
|
|
@@ -30,6 +31,18 @@
|
|
|
30
31
|
"bin": {
|
|
31
32
|
"skilllib": "dist/index.js"
|
|
32
33
|
},
|
|
34
|
+
"types": "./dist/json.d.ts",
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"import": {
|
|
38
|
+
"types": "./dist/json.d.ts"
|
|
39
|
+
},
|
|
40
|
+
"require": {
|
|
41
|
+
"types": "./dist/json.d.cts"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"./package.json": "./package.json"
|
|
45
|
+
},
|
|
33
46
|
"files": [
|
|
34
47
|
"dist",
|
|
35
48
|
"skills",
|
|
@@ -37,7 +50,7 @@
|
|
|
37
50
|
"LICENSE"
|
|
38
51
|
],
|
|
39
52
|
"scripts": {
|
|
40
|
-
"build": "tsup src/index.ts --format esm --target node22 --clean",
|
|
53
|
+
"build": "tsup src/index.ts --format esm --target node22 --clean && tsup src/json.ts --dts-only --format esm,cjs",
|
|
41
54
|
"dev": "tsx src/index.ts",
|
|
42
55
|
"design": "tsx src/tui/design.ts",
|
|
43
56
|
"type-check": "tsc --noEmit",
|
package/skills/skilllib/SKILL.md
CHANGED
|
@@ -14,25 +14,32 @@ Always pass `--json` (one line of JSON on stdout; messages go to stderr). Never
|
|
|
14
14
|
|
|
15
15
|
The **Now** section at the end has this repo's `status` and `list` output. Answer from it and don't run them again. If it shows the commands instead of their output, run both in parallel.
|
|
16
16
|
|
|
17
|
-
`status --json`: `skills` are this repo's own; `nested` (when there are any) are in subfolders such as monorepo packages, and load only when the agent works in their `dir`; `global` groups load in every repo, as this repo loads them (its `.claude/settings.json` can turn a plugin on or off); `issues` are everything skilllib finds wrong (out-of-date or missing skills, broken links, skills loaded twice), with either a `fix` (a safe repair; `skilllib doctor --fix` applies every fix, across all the user's projects) or `choices` (decisions the user
|
|
17
|
+
`status --json`: `skills` are this repo's own; `nested` (when there are any) are in subfolders such as monorepo packages, and load only when the agent works in their `dir`; `global` groups load in every repo, as this repo loads them (its `.claude/settings.json` can turn a plugin on or off); `issues` are everything skilllib finds wrong (out-of-date or missing skills, broken links, skills loaded twice), one `ids` entry per `problems` entry, with either a `fix` (a safe repair; `skilllib doctor --fix` applies every fix, across all the user's projects) or `choices` (decisions: propose one, and apply it once the user agrees, see Changing). When asked what's out of date or broken, `issues` and each skill's `state` are the answer. Don't audit skill contents unless asked.
|
|
18
18
|
|
|
19
19
|
- `source`: `library` (added with skilllib) · `repo` (the team's: committed to git, or in `.agents/skills`) · `local` (only on this machine: not committed, not managed by skilllib) · `global` (`~/.claude/skills`, `~/.agents/skills` or `~/.codex/skills`) · `skills.sh` (`npx skills add`; `from` is the source repo) · `plugin` (Claude Code plugin; turn off with `/plugin`) · `claude.ai` (synced from the account) · `built-in` (bundled with an agent) · `skilllib` (this skill; `skilllib agent-skill remove` takes it out).
|
|
20
20
|
- Missing fields mean the usual: loaded by all of `agents`, state ok, in `.claude/skills`. `usesHere` counts Claude Code uses in this repo.
|
|
21
21
|
|
|
22
|
-
`list --json`: `inThisProject` (names) and `skills`, the library skills the repo doesn't have, each with a short `description` and the `projects` using it. To recommend, read the repo's README and manifests (see `files` in `status`) in one parallel step, then give a reason for each pick. Don't add a skill that already loads globally (it would load twice):
|
|
22
|
+
`list --json`: `inThisProject` (names) and `skills`, the library skills the repo doesn't have, each with a short `description` and the `projects` using it. To recommend, read the repo's README and manifests (see `files` in `status`) in one parallel step, then give a reason for each pick. Don't add a skill that already loads globally (it would load twice): offer to move it into just the repos that need it instead (`global move`). `show <name> --json` has the full SKILL.md.
|
|
23
23
|
|
|
24
|
-
Also: `usage --json` (Claude Code usage only, so "unused" is a hint), `projects --json` (every repo), `outdated --all --json
|
|
24
|
+
Also: `usage --json` (Claude Code usage only, so "unused" is a hint; each skill lists the `projects` that used it), `projects --json` (every repo), `outdated --all --json`, `doctor --json` (every issue in every repo and globally, each with an `id`).
|
|
25
25
|
|
|
26
26
|
## Changing (ask first unless the user asked for this exact change)
|
|
27
27
|
|
|
28
|
-
`add <name>...` · `remove <name>...` · `update [name...]` · `sync` (pinned versions) · `import <dir>` (into the library) · `doctor --fix`. Pass several names in one call.
|
|
28
|
+
`add <name>...` · `remove <name>...` · `update [name...]` · `sync` (pinned versions) · `import <dir>` (into the library) · `doctor --fix`. Pass several names in one call. Their result is `[{name, action, from, to, dirs, reason, blocked, uncommitted, backedUp}]`, which is the whole result: there's no need to check files afterwards.
|
|
29
29
|
|
|
30
30
|
- `skipped` + `reason`: nothing changed for that skill, and the command exits 1; tell the user. `--force` overwrites local edits (`backedUp` says where they went; `skilllib restore <name>` brings them back), but only use it with their OK.
|
|
31
31
|
- `blocked`: git tracks that folder. Re-run with `--allow-tracked` only with their OK.
|
|
32
32
|
- `uncommitted`: git tracks that folder but not the skill's real copy, so a link there would break for teammates; `--allow-tracked` doesn't change that. Once the copy is committed, `link --allow-tracked` adds it.
|
|
33
33
|
- Changes apply from the agent's next session. Remind the user to commit `skilllib.json` and `.claude/skills`.
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
**Prefer per-repo skills to global ones.** A global skill loads in every repo, for every agent. When `usage --json` shows one used in only a few repos, propose moving it there:
|
|
36
|
+
|
|
37
|
+
- `global move <name>... --to <repo>[,<repo>...]` (a project name from `projects`, or the path of a repo's top folder): imports it into the library, adds it to each repo, and only then stops loading it globally (restorable with `skilllib restore`). Prints `[{skill, moved, reason, projects: [{project, path, change}]}]`; `moved: false` means it still loads globally, and `reason` says why.
|
|
38
|
+
- `global keep <name>...`: the user wants it everywhere; skilllib stops flagging it.
|
|
39
|
+
|
|
40
|
+
**Fixes and decisions.** `apply <id> [choice]` runs one problem's `fix`, or the choice you name: its label (safest), or its number from 1. With several choices it needs one. Prints `{id, applied, ok, message}`. Ids come from `issues` in `status --json` (Now, below) or from `doctor --json` (every repo; pass `apply` the same `--days` you gave `doctor`). A few issues span repos and offer different choices in each; then `apply` takes only the label.
|
|
41
|
+
|
|
42
|
+
**Importing.** `import <dir>...` copies skill folders (each with a `SKILL.md`) into the library; skilllib doesn't download anything. For a skill on GitHub, clone the repo into a temporary folder, `import` the skill's folder, then `add` it here.
|
|
36
43
|
|
|
37
44
|
## Now
|
|
38
45
|
|