skilllib 1.3.1 → 1.7.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/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  add,
4
+ agentSkill,
4
5
  doctor,
5
6
  error,
6
7
  folders,
@@ -11,11 +12,14 @@ import {
11
12
  list,
12
13
  newSkill,
13
14
  outdated,
15
+ overview,
14
16
  parseArgs,
15
17
  projects,
18
+ refreshAgentSkill,
16
19
  remove,
17
20
  restore,
18
21
  scan,
22
+ setJsonMode,
19
23
  show,
20
24
  status,
21
25
  sync,
@@ -23,7 +27,7 @@ import {
23
27
  unhide,
24
28
  update,
25
29
  usage
26
- } from "./chunk-TWQQHXVG.js";
30
+ } from "./chunk-AYAN7Q2X.js";
27
31
 
28
32
  // src/index.ts
29
33
  import { readFileSync } from "fs";
@@ -37,11 +41,11 @@ Set up:
37
41
  skilllib folders [add|remove] Show or change your project folders
38
42
  skilllib harnesses [id...] Show or set the agents you use (claude-code cursor codex zed)
39
43
  skilllib import <dir>... Add skill folders to the library (--force replaces)
40
- skilllib import --global Copy ~/.claude/skills into the library
44
+ skilllib import --global Copy your global skills (every agent's folder) into the library
41
45
  skilllib global [keep|unkeep <name>...] Your global skills; mark ones you keep global on purpose
42
46
 
43
- In a project:
44
- skilllib status This project's skills and their status
47
+ In a project (a git repo or a folder with skilllib.json; never your home folder):
48
+ skilllib status This project's skills, which agents load them, and issues
45
49
  skilllib add <name>... Install library skills where your harnesses look
46
50
  skilllib remove <name>... Remove skills from this project
47
51
  skilllib link [--all] Make every skill here usable by all your agents (adds links)
@@ -64,6 +68,13 @@ Health:
64
68
  skilllib restore [name] Restore something skilllib moved out of the way
65
69
  skilllib unhide <path> Show a hidden project again
66
70
 
71
+ Agents:
72
+ skilllib agent-skill [install|remove]
73
+ Teach your agents to use skilllib, so you can ask them
74
+ "which skills can you use here?" in any repo
75
+ --json Machine-readable output (status list show projects outdated
76
+ usage doctor add remove sync update import agent-skill)
77
+
67
78
  Options: --force (overwrite local edits) --allow-tracked (link into git-tracked skill folders) --days N
68
79
  `.trim();
69
80
  function packageVersion() {
@@ -77,11 +88,14 @@ function packageVersion() {
77
88
  async function main() {
78
89
  const [command, ...rest] = process.argv.slice(2);
79
90
  const args = parseArgs(rest);
91
+ setJsonMode(args.json);
92
+ if (!["--version", "-v", "version", "help", "--help", "-h"].includes(command ?? "")) refreshAgentSkill();
80
93
  switch (command) {
81
94
  case void 0:
82
- return process.stdin.isTTY && process.stdout.isTTY ? (await import("./tui-H5IQAGAL.js")).tui() : status(args);
95
+ return process.stdin.isTTY && process.stdout.isTTY ? (await import("./tui-RU255WYX.js")).tui() : overview(args);
83
96
  case "ui":
84
- return (await import("./tui-H5IQAGAL.js")).tui();
97
+ if (!process.stdin.isTTY || !process.stdout.isTTY) throw new Error("`skilllib ui` needs an interactive terminal. Agents and scripts: use `skilllib status --json`.");
98
+ return (await import("./tui-RU255WYX.js")).tui();
85
99
  case "status":
86
100
  return status(args);
87
101
  case "add":
@@ -107,7 +121,7 @@ async function main() {
107
121
  case "scan":
108
122
  return scan(args);
109
123
  case "projects":
110
- return projects();
124
+ return projects(args);
111
125
  case "link":
112
126
  return link(args);
113
127
  case "tidy":
@@ -132,6 +146,8 @@ async function main() {
132
146
  return doctor(args);
133
147
  case "usage":
134
148
  return usage(args);
149
+ case "agent-skill":
150
+ return agentSkill(args);
135
151
  case "--version":
136
152
  case "-v":
137
153
  case "version":