skild 0.1.1 → 0.1.3
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 +1 -1
- package/dist/index.js +48 -17
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ skild install ./path/to/your-skill
|
|
|
22
22
|
skild install https://github.com/anthropics/skills/tree/main/skills/pdf -t codex --local
|
|
23
23
|
|
|
24
24
|
# List installed skills
|
|
25
|
-
skild list
|
|
25
|
+
skild list --local
|
|
26
26
|
|
|
27
27
|
# Inspect / Validate / Update / Uninstall
|
|
28
28
|
skild info pdf -t codex --local
|
package/dist/index.js
CHANGED
|
@@ -108,27 +108,58 @@ async function install(source, options = {}) {
|
|
|
108
108
|
|
|
109
109
|
// src/commands/list.ts
|
|
110
110
|
import chalk3 from "chalk";
|
|
111
|
-
import { listSkills } from "@skild/core";
|
|
111
|
+
import { PLATFORMS, listAllSkills, listSkills } from "@skild/core";
|
|
112
112
|
async function list(options = {}) {
|
|
113
|
-
const platform = options.target || "claude";
|
|
114
113
|
const scope = options.local ? "project" : "global";
|
|
115
|
-
const
|
|
114
|
+
const platform = options.target;
|
|
115
|
+
if (platform) {
|
|
116
|
+
const skills = listSkills({ platform, scope });
|
|
117
|
+
if (options.json) {
|
|
118
|
+
console.log(JSON.stringify(skills, null, 2));
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
if (skills.length === 0) {
|
|
122
|
+
console.log(chalk3.dim("No skills installed."));
|
|
123
|
+
console.log(chalk3.dim(`Use ${chalk3.cyan("skild install <source>")} to install a skill.`));
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
console.log(chalk3.bold(`
|
|
127
|
+
\u{1F4E6} Installed Skills (${skills.length}) \u2014 ${platform} (${scope}):
|
|
128
|
+
`));
|
|
129
|
+
for (const s of skills) {
|
|
130
|
+
const status = s.hasSkillMd ? chalk3.green("\u2713") : chalk3.yellow("\u26A0");
|
|
131
|
+
console.log(` ${status} ${chalk3.cyan(s.name)}`);
|
|
132
|
+
console.log(chalk3.dim(` \u2514\u2500 ${s.installDir}`));
|
|
133
|
+
}
|
|
134
|
+
console.log("");
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const allSkills = listAllSkills({ scope });
|
|
116
138
|
if (options.json) {
|
|
117
|
-
console.log(JSON.stringify(
|
|
139
|
+
console.log(JSON.stringify(allSkills, null, 2));
|
|
118
140
|
return;
|
|
119
141
|
}
|
|
120
|
-
if (
|
|
142
|
+
if (allSkills.length === 0) {
|
|
121
143
|
console.log(chalk3.dim("No skills installed."));
|
|
122
144
|
console.log(chalk3.dim(`Use ${chalk3.cyan("skild install <source>")} to install a skill.`));
|
|
123
145
|
return;
|
|
124
146
|
}
|
|
125
147
|
console.log(chalk3.bold(`
|
|
126
|
-
\u{1F4E6} Installed Skills
|
|
148
|
+
\u{1F4E6} Installed Skills \u2014 all platforms (${scope}):
|
|
127
149
|
`));
|
|
128
|
-
for (const
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
console.log(chalk3.
|
|
150
|
+
for (const p of PLATFORMS) {
|
|
151
|
+
const platformSkills = allSkills.filter((s) => s.platform === p).sort((a, b) => a.name.localeCompare(b.name));
|
|
152
|
+
const header = `${p} (${platformSkills.length})`;
|
|
153
|
+
console.log(chalk3.bold(` ${header}`));
|
|
154
|
+
if (platformSkills.length === 0) {
|
|
155
|
+
console.log(chalk3.dim(" (none)"));
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
for (const s of platformSkills) {
|
|
159
|
+
const status = s.hasSkillMd ? chalk3.green("\u2713") : chalk3.yellow("\u26A0");
|
|
160
|
+
console.log(` ${status} ${chalk3.cyan(s.name)}`);
|
|
161
|
+
console.log(chalk3.dim(` \u2514\u2500 ${s.installDir}`));
|
|
162
|
+
}
|
|
132
163
|
}
|
|
133
164
|
console.log("");
|
|
134
165
|
}
|
|
@@ -261,19 +292,19 @@ async function init(name, options = {}) {
|
|
|
261
292
|
}
|
|
262
293
|
|
|
263
294
|
// src/index.ts
|
|
264
|
-
import { PLATFORMS } from "@skild/core";
|
|
295
|
+
import { PLATFORMS as PLATFORMS2 } from "@skild/core";
|
|
265
296
|
var require2 = createRequire(import.meta.url);
|
|
266
297
|
var { version } = require2("../package.json");
|
|
267
298
|
var program = new Command();
|
|
268
299
|
program.name("skild").description("The npm for Agent Skills \u2014 Discover, install, manage, and publish AI Agent Skills with ease.").version(version);
|
|
269
|
-
program.command("install <source>").alias("i").description("Install a Skill from a Git URL, degit shorthand, or local directory").option("-t, --target <platform>", `Target platform: ${
|
|
300
|
+
program.command("install <source>").alias("i").description("Install a Skill from a Git URL, degit shorthand, or local directory").option("-t, --target <platform>", `Target platform: ${PLATFORMS2.join(", ")}`, "claude").option("-l, --local", "Install to project-level directory instead of global").option("-f, --force", "Overwrite existing installation").option("--json", "Output JSON").action(async (source, options) => {
|
|
270
301
|
await install(source, options);
|
|
271
302
|
});
|
|
272
|
-
program.command("list").alias("ls").description("List installed Skills").option("-t, --target <platform>", `Target platform: ${
|
|
273
|
-
program.command("info <skill>").description("Show installed Skill details").option("-t, --target <platform>", `Target platform: ${
|
|
274
|
-
program.command("uninstall <skill>").alias("rm").description("Uninstall a Skill").option("-t, --target <platform>", `Target platform: ${
|
|
275
|
-
program.command("update [skill]").alias("up").description("Update one or all installed Skills").option("-t, --target <platform>", `Target platform: ${
|
|
276
|
-
program.command("validate [target]").alias("v").description("Validate a Skill folder (path) or an installed Skill name").option("-t, --target <platform>", `Target platform: ${
|
|
303
|
+
program.command("list").alias("ls").description("List installed Skills").option("-t, --target <platform>", `Target platform: ${PLATFORMS2.join(", ")} (optional; omit to list all)`).option("-l, --local", "List project-level directory instead of global").option("--json", "Output JSON").action(async (options) => list(options));
|
|
304
|
+
program.command("info <skill>").description("Show installed Skill details").option("-t, --target <platform>", `Target platform: ${PLATFORMS2.join(", ")}`, "claude").option("-l, --local", "Use project-level directory instead of global").option("--json", "Output JSON").action(async (skill, options) => info(skill, options));
|
|
305
|
+
program.command("uninstall <skill>").alias("rm").description("Uninstall a Skill").option("-t, --target <platform>", `Target platform: ${PLATFORMS2.join(", ")}`, "claude").option("-l, --local", "Use project-level directory instead of global").option("-f, --force", "Uninstall even if metadata is missing").action(async (skill, options) => uninstall(skill, options));
|
|
306
|
+
program.command("update [skill]").alias("up").description("Update one or all installed Skills").option("-t, --target <platform>", `Target platform: ${PLATFORMS2.join(", ")}`, "claude").option("-l, --local", "Use project-level directory instead of global").option("--json", "Output JSON").action(async (skill, options) => update(skill, options));
|
|
307
|
+
program.command("validate [target]").alias("v").description("Validate a Skill folder (path) or an installed Skill name").option("-t, --target <platform>", `Target platform: ${PLATFORMS2.join(", ")}`, "claude").option("-l, --local", "Use project-level directory instead of global").option("--json", "Output JSON").action(async (target, options) => validate(target, options));
|
|
277
308
|
program.command("init <name>").description("Create a new Skill project").option("--dir <path>", "Target directory (defaults to <name>)").option("--description <text>", "Skill description").option("-f, --force", "Overwrite target directory if it exists").action(async (name, options) => init(name, options));
|
|
278
309
|
program.action(() => {
|
|
279
310
|
console.log(chalk9.bold("\n\u{1F6E1}\uFE0F skild \u2014 Get your agents skilled.\n"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skild",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "The npm for Agent Skills — Discover, install, manage, and publish AI Agent Skills with ease.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"chalk": "^5.3.0",
|
|
37
37
|
"commander": "^12.1.0",
|
|
38
38
|
"ora": "^8.0.1",
|
|
39
|
-
"@skild/core": "^0.1.
|
|
39
|
+
"@skild/core": "^0.1.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^20.10.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"node": ">=18"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
|
-
"build": "tsup src/index.ts --format esm --dts --clean",
|
|
50
|
+
"build": "tsup src/index.ts --format esm --dts --clean --silent",
|
|
51
51
|
"dev": "tsup src/index.ts --format esm --watch",
|
|
52
52
|
"start": "node dist/index.js",
|
|
53
53
|
"typecheck": "pnpm -C ../core build && tsc -p tsconfig.json --noEmit"
|