@toolbeltai/skills 0.1.2 → 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 +3 -2
- package/bin/install.js +37 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
npx @toolbeltai/skills install
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Copies every skill to `~/.claude/skills
|
|
13
|
-
you'll see them as slash commands: `/run-toolbelt`,
|
|
12
|
+
Copies every skill to `~/.claude/skills/` (flat, per the AgentSkills spec).
|
|
13
|
+
Restart Claude Code and you'll see them as slash commands: `/run-toolbelt`,
|
|
14
|
+
`/geo-analyst`, …
|
|
14
15
|
|
|
15
16
|
No account required; no network calls to Toolbelt. Skills work against any
|
|
16
17
|
Toolbelt MCP server (cloud or self-hosted).
|
package/bin/install.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* toolbelt-skills — install Toolbelt's
|
|
3
|
+
* toolbelt-skills — install Toolbelt's skills into ~/.claude/skills/
|
|
4
4
|
*
|
|
5
5
|
* Usage:
|
|
6
6
|
* npx @toolbeltai/skills install # copy skills (default)
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
* The @toolbeltai/cli package wraps this for its own install flow; this
|
|
12
12
|
* CLI exists so the skills package stands on its own — anyone can install
|
|
13
13
|
* without needing the Toolbelt CLI or hitting any Toolbelt-hosted service.
|
|
14
|
+
*
|
|
15
|
+
* Layout: skills install FLAT under ~/.claude/skills/ per AgentSkills spec
|
|
16
|
+
* (agentskills.io) and Claude Code docs. An earlier version nested them
|
|
17
|
+
* under ~/.claude/skills/toolbelt/; that broke discovery in OpenClaw and
|
|
18
|
+
* was non-standard for Claude Code. We clean up the legacy dir on install.
|
|
14
19
|
*/
|
|
15
20
|
import { cpSync, existsSync, mkdirSync, readdirSync, rmSync, statSync } from 'node:fs';
|
|
16
21
|
import { homedir } from 'node:os';
|
|
@@ -18,7 +23,8 @@ import { dirname, join } from 'node:path';
|
|
|
18
23
|
import { fileURLToPath } from 'node:url';
|
|
19
24
|
|
|
20
25
|
const PKG_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
21
|
-
const TARGET = join(homedir(), '.claude', 'skills'
|
|
26
|
+
const TARGET = join(homedir(), '.claude', 'skills');
|
|
27
|
+
const LEGACY_NESTED_DIR = join(TARGET, 'toolbelt');
|
|
22
28
|
|
|
23
29
|
/** Any top-level directory containing a SKILL.md is a skill. */
|
|
24
30
|
function listSkills() {
|
|
@@ -28,6 +34,13 @@ function listSkills() {
|
|
|
28
34
|
.filter((name) => existsSync(join(PKG_ROOT, name, 'SKILL.md')));
|
|
29
35
|
}
|
|
30
36
|
|
|
37
|
+
function cleanupLegacy() {
|
|
38
|
+
if (existsSync(LEGACY_NESTED_DIR)) {
|
|
39
|
+
rmSync(LEGACY_NESTED_DIR, { recursive: true, force: true });
|
|
40
|
+
console.log(` migrated: removed legacy ~/.claude/skills/toolbelt/`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
31
44
|
function cmdInstall() {
|
|
32
45
|
const skills = listSkills();
|
|
33
46
|
if (skills.length === 0) {
|
|
@@ -36,12 +49,14 @@ function cmdInstall() {
|
|
|
36
49
|
}
|
|
37
50
|
|
|
38
51
|
mkdirSync(TARGET, { recursive: true });
|
|
52
|
+
cleanupLegacy();
|
|
53
|
+
|
|
39
54
|
for (const name of skills) {
|
|
40
55
|
const src = join(PKG_ROOT, name);
|
|
41
56
|
const dst = join(TARGET, name);
|
|
42
57
|
rmSync(dst, { recursive: true, force: true });
|
|
43
58
|
cpSync(src, dst, { recursive: true });
|
|
44
|
-
console.log(`
|
|
59
|
+
console.log(` ✓ ${name}`);
|
|
45
60
|
}
|
|
46
61
|
// Optional assets (icons, tapes) — copy if present so popups render right.
|
|
47
62
|
const assetsSrc = join(PKG_ROOT, 'assets');
|
|
@@ -57,12 +72,26 @@ function cmdInstall() {
|
|
|
57
72
|
}
|
|
58
73
|
|
|
59
74
|
function cmdUninstall() {
|
|
60
|
-
|
|
75
|
+
// Remove installed skills and legacy nested dir.
|
|
76
|
+
cleanupLegacy();
|
|
77
|
+
const skills = listSkills();
|
|
78
|
+
let removed = 0;
|
|
79
|
+
for (const name of skills) {
|
|
80
|
+
const dst = join(TARGET, name);
|
|
81
|
+
if (existsSync(dst)) {
|
|
82
|
+
rmSync(dst, { recursive: true, force: true });
|
|
83
|
+
removed++;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const assetsDst = join(TARGET, 'assets');
|
|
87
|
+
if (existsSync(assetsDst)) {
|
|
88
|
+
rmSync(assetsDst, { recursive: true, force: true });
|
|
89
|
+
}
|
|
90
|
+
if (removed === 0) {
|
|
61
91
|
console.log(' (nothing to remove)');
|
|
62
|
-
|
|
92
|
+
} else {
|
|
93
|
+
console.log(` Removed ${removed} skills from ${TARGET}`);
|
|
63
94
|
}
|
|
64
|
-
rmSync(TARGET, { recursive: true, force: true });
|
|
65
|
-
console.log(` Removed ${TARGET}`);
|
|
66
95
|
}
|
|
67
96
|
|
|
68
97
|
function cmdList() {
|
|
@@ -74,7 +103,7 @@ function cmdPath() {
|
|
|
74
103
|
}
|
|
75
104
|
|
|
76
105
|
function usage() {
|
|
77
|
-
console.log(`toolbelt-skills — install Toolbelt skills into ~/.claude/skills/
|
|
106
|
+
console.log(`toolbelt-skills — install Toolbelt skills into ~/.claude/skills/
|
|
78
107
|
|
|
79
108
|
Usage:
|
|
80
109
|
npx @toolbeltai/skills install Install skills (default)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolbeltai/skills",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Official Toolbelt skills for Claude Code and MCP agents — run-toolbelt, geo-analyst, knowledge-graph, sql-analyst, vector-search, streaming-analyst, multi-agent-workspace, data-blend.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://toolbelt.ai",
|