skilllib 1.11.3 → 1.11.4
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 +22 -19
- package/dist/{chunk-3XDWEHI4.js → chunk-CS6T66EE.js} +961 -355
- package/dist/index.js +6 -4
- package/dist/json.d.cts +20 -8
- package/dist/json.d.ts +20 -8
- package/dist/{tui-WSHQRBPF.js → tui-BDLJOMSC.js} +205 -128
- package/package.json +2 -2
- package/skills/skilllib/SKILL.md +9 -6
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
unhide,
|
|
31
31
|
update,
|
|
32
32
|
usage
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-CS6T66EE.js";
|
|
34
34
|
|
|
35
35
|
// src/index.ts
|
|
36
36
|
import { readFileSync } from "fs";
|
|
@@ -97,7 +97,7 @@ var FLAGS_OF = {
|
|
|
97
97
|
status: ["days"],
|
|
98
98
|
add: ["force", "allow-tracked"],
|
|
99
99
|
remove: ["force"],
|
|
100
|
-
sync: ["all", "force"
|
|
100
|
+
sync: ["all", "force"],
|
|
101
101
|
update: ["all", "force", "allow-tracked"],
|
|
102
102
|
outdated: ["all"],
|
|
103
103
|
list: ["days"],
|
|
@@ -120,6 +120,7 @@ var FLAGS_OF = {
|
|
|
120
120
|
version: [],
|
|
121
121
|
help: []
|
|
122
122
|
};
|
|
123
|
+
var NO_ARGS = /* @__PURE__ */ new Set(["", "ui", "status", "outdated", "list", "projects", "link", "doctor", "usage", "version"]);
|
|
123
124
|
async function main() {
|
|
124
125
|
const argv = process.argv.slice(2);
|
|
125
126
|
setJsonMode(argv.includes("--json"));
|
|
@@ -132,13 +133,14 @@ async function main() {
|
|
|
132
133
|
const flagOf = (a) => a.slice(2).split("=")[0];
|
|
133
134
|
const wrong = takes ? rest.filter((a) => a.startsWith("--") && flagOf(a) !== "json" && !takes.includes(flagOf(a))) : [];
|
|
134
135
|
if (wrong.length) throw new Error(`skilllib${command ? ` ${command}` : ""} doesn't take ${wrong.join(", ")}`);
|
|
136
|
+
if (NO_ARGS.has(command ?? "") && args.positional.length) throw new Error(`skilllib${command ? ` ${command}` : ""} doesn't take ${args.positional.join(" ")}`);
|
|
135
137
|
if (!["--version", "-v", "version", "help", "--help", "-h"].includes(command ?? "")) refreshAgentSkill();
|
|
136
138
|
switch (command) {
|
|
137
139
|
case void 0:
|
|
138
|
-
return process.stdin.isTTY && process.stdout.isTTY ? (await import("./tui-
|
|
140
|
+
return process.stdin.isTTY && process.stdout.isTTY ? (await import("./tui-BDLJOMSC.js")).tui() : overview(args);
|
|
139
141
|
case "ui":
|
|
140
142
|
if (!process.stdin.isTTY || !process.stdout.isTTY) throw new Error("`skilllib ui` needs an interactive terminal. Agents and scripts: use `skilllib status --json`.");
|
|
141
|
-
return (await import("./tui-
|
|
143
|
+
return (await import("./tui-BDLJOMSC.js")).tui();
|
|
142
144
|
case "status":
|
|
143
145
|
return status(args);
|
|
144
146
|
case "add":
|
package/dist/json.d.cts
CHANGED
|
@@ -11,12 +11,17 @@ type AgentSkillState = "installed" | "outdated" | "missing";
|
|
|
11
11
|
*/
|
|
12
12
|
type GitState = "committed" | "changed" | "new" | "ignored";
|
|
13
13
|
|
|
14
|
-
type SkillState = "ok" | "update available" | "edited locally" | "edited locally, update available"
|
|
14
|
+
type SkillState = "ok" | "update available" | "edited locally" | "edited locally, update available"
|
|
15
|
+
/** The copy is another version from your library than the one skilllib.json pins (after a pull, say): sync installs the pinned one. */
|
|
16
|
+
| "out of sync" | "folder missing" | "not in library" | "untracked copy of library skill" | "untracked, differs from library" | "local only" | "repo skill" | "repo skill, in library" | "repo skill, differs from library" | "from npx skills";
|
|
15
17
|
type Change = {
|
|
16
18
|
name: string;
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* reset: back to the version it had; its local edits were overwritten (and backed up, see `backedUp`).
|
|
21
|
+
* relinked: the copy was as pinned; only the links skilllib.json records were put back.
|
|
22
|
+
* unchanged: it was already as asked (same version, same links): nothing was written.
|
|
23
|
+
*/
|
|
24
|
+
action: "installed" | "updated" | "reset" | "relinked" | "unchanged" | "removed" | "skipped";
|
|
20
25
|
reason?: string;
|
|
21
26
|
from?: number;
|
|
22
27
|
to?: number;
|
|
@@ -24,6 +29,8 @@ type Change = {
|
|
|
24
29
|
blocked?: string[];
|
|
25
30
|
/** Harness folders git tracks, left without a link because git doesn't share the real copy (teammates would get a broken link). */
|
|
26
31
|
uncommitted?: string[];
|
|
32
|
+
/** What kept a link out (a file or another copy where it goes): an agent can't use the skill there. */
|
|
33
|
+
inTheWay?: string[];
|
|
27
34
|
/** Where overwritten local edits went (~/.skilllib/edit-backup/…); `skilllib restore` puts them back. */
|
|
28
35
|
backedUp?: string;
|
|
29
36
|
};
|
|
@@ -34,7 +41,7 @@ type Change = {
|
|
|
34
41
|
* - skills.sh: a symlink into ~/.agents/skills, installed by `npx skills`
|
|
35
42
|
* - claude.ai: synced from your claude.ai account
|
|
36
43
|
* - plugin: shipped inside an enabled Claude Code plugin
|
|
37
|
-
* - built-in: bundled with an agent (Cursor's ~/.cursor/skills-cursor, Grok's ~/.grok/bundled/skills)
|
|
44
|
+
* - built-in: bundled with an agent (Cursor's ~/.cursor/skills-cursor, Codex's ~/.codex/skills/.system, Grok's ~/.grok/bundled/skills)
|
|
38
45
|
* - system: a machine-wide folder an admin manages (/etc/codex/skills)
|
|
39
46
|
* - skilllib: skilllib's own skill, which `skilllib agent-skill install` puts in your global folders
|
|
40
47
|
*/
|
|
@@ -42,7 +49,7 @@ type SourceKind = "global" | "skills.sh" | "claude.ai" | "plugin" | "built-in" |
|
|
|
42
49
|
|
|
43
50
|
/**
|
|
44
51
|
* - library: added from your skills with skilllib (pinned in skilllib.json)
|
|
45
|
-
* - repo: the team's: committed to git (any skill folder), or in .agents/skills
|
|
52
|
+
* - repo: the team's: committed to git (any skill folder), or in .agents/skills or .grok/skills
|
|
46
53
|
* - local: only on this machine: not committed, not managed by skilllib
|
|
47
54
|
*/
|
|
48
55
|
type ProjectSource = "library" | "repo" | "local";
|
|
@@ -53,7 +60,7 @@ type StatusSkillGroup = {
|
|
|
53
60
|
/** Folder with the real copy, when it isn't .claude/skills. */
|
|
54
61
|
dir?: string;
|
|
55
62
|
version?: number;
|
|
56
|
-
/** Only when it isn't "ok". */
|
|
63
|
+
/** Only when it isn't the usual one: "ok", "local only", or a repo skill's. */
|
|
57
64
|
state?: SkillState;
|
|
58
65
|
/** Newer library version, when there is one. */
|
|
59
66
|
latest?: number;
|
|
@@ -171,7 +178,10 @@ type DoctorJson = {
|
|
|
171
178
|
detail: string;
|
|
172
179
|
/** A safe repair; `doctor --fix` runs it. */
|
|
173
180
|
fix?: string;
|
|
174
|
-
/**
|
|
181
|
+
/**
|
|
182
|
+
* Fixes that need a decision: `skilllib apply <id> <n>` runs the nth (from 1). An issue that spans repos can list
|
|
183
|
+
* other choices inside one (status there), and then apply takes only the label: `skilllib apply <id> "<label>"`.
|
|
184
|
+
*/
|
|
175
185
|
choices?: string[];
|
|
176
186
|
/** With --fix: what running `fix` did. */
|
|
177
187
|
fixed?: {
|
|
@@ -196,6 +206,8 @@ type GlobalMoveJson = {
|
|
|
196
206
|
/** Added to every repo and no longer global. When false, it still loads globally and `reason` says why. */
|
|
197
207
|
moved: boolean;
|
|
198
208
|
reason?: string;
|
|
209
|
+
/** Links in a repo's packages now pointing at nothing (the repo's own copy serves them): remove them. */
|
|
210
|
+
left?: string[];
|
|
199
211
|
projects: {
|
|
200
212
|
project: string;
|
|
201
213
|
path: string;
|
package/dist/json.d.ts
CHANGED
|
@@ -11,12 +11,17 @@ type AgentSkillState = "installed" | "outdated" | "missing";
|
|
|
11
11
|
*/
|
|
12
12
|
type GitState = "committed" | "changed" | "new" | "ignored";
|
|
13
13
|
|
|
14
|
-
type SkillState = "ok" | "update available" | "edited locally" | "edited locally, update available"
|
|
14
|
+
type SkillState = "ok" | "update available" | "edited locally" | "edited locally, update available"
|
|
15
|
+
/** The copy is another version from your library than the one skilllib.json pins (after a pull, say): sync installs the pinned one. */
|
|
16
|
+
| "out of sync" | "folder missing" | "not in library" | "untracked copy of library skill" | "untracked, differs from library" | "local only" | "repo skill" | "repo skill, in library" | "repo skill, differs from library" | "from npx skills";
|
|
15
17
|
type Change = {
|
|
16
18
|
name: string;
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* reset: back to the version it had; its local edits were overwritten (and backed up, see `backedUp`).
|
|
21
|
+
* relinked: the copy was as pinned; only the links skilllib.json records were put back.
|
|
22
|
+
* unchanged: it was already as asked (same version, same links): nothing was written.
|
|
23
|
+
*/
|
|
24
|
+
action: "installed" | "updated" | "reset" | "relinked" | "unchanged" | "removed" | "skipped";
|
|
20
25
|
reason?: string;
|
|
21
26
|
from?: number;
|
|
22
27
|
to?: number;
|
|
@@ -24,6 +29,8 @@ type Change = {
|
|
|
24
29
|
blocked?: string[];
|
|
25
30
|
/** Harness folders git tracks, left without a link because git doesn't share the real copy (teammates would get a broken link). */
|
|
26
31
|
uncommitted?: string[];
|
|
32
|
+
/** What kept a link out (a file or another copy where it goes): an agent can't use the skill there. */
|
|
33
|
+
inTheWay?: string[];
|
|
27
34
|
/** Where overwritten local edits went (~/.skilllib/edit-backup/…); `skilllib restore` puts them back. */
|
|
28
35
|
backedUp?: string;
|
|
29
36
|
};
|
|
@@ -34,7 +41,7 @@ type Change = {
|
|
|
34
41
|
* - skills.sh: a symlink into ~/.agents/skills, installed by `npx skills`
|
|
35
42
|
* - claude.ai: synced from your claude.ai account
|
|
36
43
|
* - plugin: shipped inside an enabled Claude Code plugin
|
|
37
|
-
* - built-in: bundled with an agent (Cursor's ~/.cursor/skills-cursor, Grok's ~/.grok/bundled/skills)
|
|
44
|
+
* - built-in: bundled with an agent (Cursor's ~/.cursor/skills-cursor, Codex's ~/.codex/skills/.system, Grok's ~/.grok/bundled/skills)
|
|
38
45
|
* - system: a machine-wide folder an admin manages (/etc/codex/skills)
|
|
39
46
|
* - skilllib: skilllib's own skill, which `skilllib agent-skill install` puts in your global folders
|
|
40
47
|
*/
|
|
@@ -42,7 +49,7 @@ type SourceKind = "global" | "skills.sh" | "claude.ai" | "plugin" | "built-in" |
|
|
|
42
49
|
|
|
43
50
|
/**
|
|
44
51
|
* - library: added from your skills with skilllib (pinned in skilllib.json)
|
|
45
|
-
* - repo: the team's: committed to git (any skill folder), or in .agents/skills
|
|
52
|
+
* - repo: the team's: committed to git (any skill folder), or in .agents/skills or .grok/skills
|
|
46
53
|
* - local: only on this machine: not committed, not managed by skilllib
|
|
47
54
|
*/
|
|
48
55
|
type ProjectSource = "library" | "repo" | "local";
|
|
@@ -53,7 +60,7 @@ type StatusSkillGroup = {
|
|
|
53
60
|
/** Folder with the real copy, when it isn't .claude/skills. */
|
|
54
61
|
dir?: string;
|
|
55
62
|
version?: number;
|
|
56
|
-
/** Only when it isn't "ok". */
|
|
63
|
+
/** Only when it isn't the usual one: "ok", "local only", or a repo skill's. */
|
|
57
64
|
state?: SkillState;
|
|
58
65
|
/** Newer library version, when there is one. */
|
|
59
66
|
latest?: number;
|
|
@@ -171,7 +178,10 @@ type DoctorJson = {
|
|
|
171
178
|
detail: string;
|
|
172
179
|
/** A safe repair; `doctor --fix` runs it. */
|
|
173
180
|
fix?: string;
|
|
174
|
-
/**
|
|
181
|
+
/**
|
|
182
|
+
* Fixes that need a decision: `skilllib apply <id> <n>` runs the nth (from 1). An issue that spans repos can list
|
|
183
|
+
* other choices inside one (status there), and then apply takes only the label: `skilllib apply <id> "<label>"`.
|
|
184
|
+
*/
|
|
175
185
|
choices?: string[];
|
|
176
186
|
/** With --fix: what running `fix` did. */
|
|
177
187
|
fixed?: {
|
|
@@ -196,6 +206,8 @@ type GlobalMoveJson = {
|
|
|
196
206
|
/** Added to every repo and no longer global. When false, it still loads globally and `reason` says why. */
|
|
197
207
|
moved: boolean;
|
|
198
208
|
reason?: string;
|
|
209
|
+
/** Links in a repo's packages now pointing at nothing (the repo's own copy serves them): remove them. */
|
|
210
|
+
left?: string[];
|
|
199
211
|
projects: {
|
|
200
212
|
project: string;
|
|
201
213
|
path: string;
|