add-skill 1.0.16 → 1.0.18
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 +31 -17
- package/dist/index.js +58 -19
- package/package.json +12 -5
package/README.md
CHANGED
|
@@ -80,22 +80,22 @@ npx add-skill vercel-labs/agent-skills -y -g
|
|
|
80
80
|
Skills can be installed to any of these supported agents. Use `-g, --global` to install to the global path instead of project-level.
|
|
81
81
|
|
|
82
82
|
<!-- available-agents:start -->
|
|
83
|
-
| Agent | Project Path | Global Path |
|
|
84
|
-
|
|
85
|
-
| OpenCode | `.opencode/
|
|
86
|
-
| Claude Code | `.claude/skills/` | `~/.claude/skills/` |
|
|
87
|
-
| Codex | `.codex/skills/` | `~/.codex/skills/` |
|
|
88
|
-
| Cursor | `.cursor/skills/` | `~/.cursor/skills/` |
|
|
89
|
-
| Amp | `.agents/skills/` | `~/.config/agents/skills/` |
|
|
90
|
-
| Kilo Code | `.kilocode/skills/` | `~/.kilocode/skills/` |
|
|
91
|
-
| Roo Code | `.roo/skills/` | `~/.roo/skills/` |
|
|
92
|
-
| Goose | `.goose/skills/` | `~/.config/goose/skills/` |
|
|
93
|
-
| Gemini CLI | `.gemini/skills/` | `~/.gemini/skills/` |
|
|
94
|
-
| Antigravity | `.agent/skills/` | `~/.gemini/antigravity/skills/` |
|
|
95
|
-
| GitHub Copilot | `.github/skills/` | `~/.copilot/skills/` |
|
|
96
|
-
| Clawdbot | `skills/` | `~/.clawdbot/skills/` |
|
|
97
|
-
| Droid | `.factory/skills/` | `~/.factory/skills/` |
|
|
98
|
-
| Windsurf | `.windsurf/skills/` | `~/.codeium/windsurf/skills/` |
|
|
83
|
+
| Agent | `--agent` | Project Path | Global Path |
|
|
84
|
+
|-------|-----------|--------------|-------------|
|
|
85
|
+
| OpenCode | `opencode` | `.opencode/skills/` | `~/.config/opencode/skills/` |
|
|
86
|
+
| Claude Code | `claude-code` | `.claude/skills/` | `~/.claude/skills/` |
|
|
87
|
+
| Codex | `codex` | `.codex/skills/` | `~/.codex/skills/` |
|
|
88
|
+
| Cursor | `cursor` | `.cursor/skills/` | `~/.cursor/skills/` |
|
|
89
|
+
| Amp | `amp` | `.agents/skills/` | `~/.config/agents/skills/` |
|
|
90
|
+
| Kilo Code | `kilo` | `.kilocode/skills/` | `~/.kilocode/skills/` |
|
|
91
|
+
| Roo Code | `roo` | `.roo/skills/` | `~/.roo/skills/` |
|
|
92
|
+
| Goose | `goose` | `.goose/skills/` | `~/.config/goose/skills/` |
|
|
93
|
+
| Gemini CLI | `gemini-cli` | `.gemini/skills/` | `~/.gemini/skills/` |
|
|
94
|
+
| Antigravity | `antigravity` | `.agent/skills/` | `~/.gemini/antigravity/skills/` |
|
|
95
|
+
| GitHub Copilot | `github-copilot` | `.github/skills/` | `~/.copilot/skills/` |
|
|
96
|
+
| Clawdbot | `clawdbot` | `skills/` | `~/.clawdbot/skills/` |
|
|
97
|
+
| Droid | `droid` | `.factory/skills/` | `~/.factory/skills/` |
|
|
98
|
+
| Windsurf | `windsurf` | `.windsurf/skills/` | `~/.codeium/windsurf/skills/` |
|
|
99
99
|
<!-- available-agents:end -->
|
|
100
100
|
|
|
101
101
|
## Agent Detection
|
|
@@ -141,7 +141,7 @@ The CLI searches for skills in these locations within a repository:
|
|
|
141
141
|
- `skills/.curated/`
|
|
142
142
|
- `skills/.experimental/`
|
|
143
143
|
- `skills/.system/`
|
|
144
|
-
- `.opencode/
|
|
144
|
+
- `.opencode/skills/`
|
|
145
145
|
- `.claude/skills/`
|
|
146
146
|
- `.codex/skills/`
|
|
147
147
|
- `.cursor/skills/`
|
|
@@ -186,6 +186,20 @@ Ensure the repository contains valid `SKILL.md` files with both `name` and `desc
|
|
|
186
186
|
|
|
187
187
|
Ensure you have write access to the target directory.
|
|
188
188
|
|
|
189
|
+
## Telemetry
|
|
190
|
+
|
|
191
|
+
This CLI collects anonymous usage data to help improve the tool. No personal information is collected.
|
|
192
|
+
|
|
193
|
+
To disable telemetry, set either of these environment variables:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
DISABLE_TELEMETRY=1 npx add-skill vercel-labs/agent-skills
|
|
197
|
+
# or
|
|
198
|
+
DO_NOT_TRACK=1 npx add-skill vercel-labs/agent-skills
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Telemetry is also automatically disabled in CI environments.
|
|
202
|
+
|
|
189
203
|
## Related Links
|
|
190
204
|
|
|
191
205
|
- [Vercel Agent Skills Repository](https://github.com/vercel-labs/agent-skills)
|
package/dist/index.js
CHANGED
|
@@ -21,17 +21,29 @@ function parseSource(input) {
|
|
|
21
21
|
localPath: resolvedPath
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const githubTreeWithPathMatch = input.match(
|
|
25
25
|
/github\.com\/([^/]+)\/([^/]+)\/tree\/([^/]+)\/(.+)/
|
|
26
26
|
);
|
|
27
|
-
if (
|
|
28
|
-
const [, owner, repo, , subpath] =
|
|
27
|
+
if (githubTreeWithPathMatch) {
|
|
28
|
+
const [, owner, repo, ref, subpath] = githubTreeWithPathMatch;
|
|
29
29
|
return {
|
|
30
30
|
type: "github",
|
|
31
31
|
url: `https://github.com/${owner}/${repo}.git`,
|
|
32
|
+
ref,
|
|
32
33
|
subpath
|
|
33
34
|
};
|
|
34
35
|
}
|
|
36
|
+
const githubTreeMatch = input.match(
|
|
37
|
+
/github\.com\/([^/]+)\/([^/]+)\/tree\/([^/]+)$/
|
|
38
|
+
);
|
|
39
|
+
if (githubTreeMatch) {
|
|
40
|
+
const [, owner, repo, ref] = githubTreeMatch;
|
|
41
|
+
return {
|
|
42
|
+
type: "github",
|
|
43
|
+
url: `https://github.com/${owner}/${repo}.git`,
|
|
44
|
+
ref
|
|
45
|
+
};
|
|
46
|
+
}
|
|
35
47
|
const githubRepoMatch = input.match(/github\.com\/([^/]+)\/([^/]+)/);
|
|
36
48
|
if (githubRepoMatch) {
|
|
37
49
|
const [, owner, repo] = githubRepoMatch;
|
|
@@ -41,17 +53,29 @@ function parseSource(input) {
|
|
|
41
53
|
url: `https://github.com/${owner}/${cleanRepo}.git`
|
|
42
54
|
};
|
|
43
55
|
}
|
|
44
|
-
const
|
|
56
|
+
const gitlabTreeWithPathMatch = input.match(
|
|
45
57
|
/gitlab\.com\/([^/]+)\/([^/]+)\/-\/tree\/([^/]+)\/(.+)/
|
|
46
58
|
);
|
|
47
|
-
if (
|
|
48
|
-
const [, owner, repo, , subpath] =
|
|
59
|
+
if (gitlabTreeWithPathMatch) {
|
|
60
|
+
const [, owner, repo, ref, subpath] = gitlabTreeWithPathMatch;
|
|
49
61
|
return {
|
|
50
62
|
type: "gitlab",
|
|
51
63
|
url: `https://gitlab.com/${owner}/${repo}.git`,
|
|
64
|
+
ref,
|
|
52
65
|
subpath
|
|
53
66
|
};
|
|
54
67
|
}
|
|
68
|
+
const gitlabTreeMatch = input.match(
|
|
69
|
+
/gitlab\.com\/([^/]+)\/([^/]+)\/-\/tree\/([^/]+)$/
|
|
70
|
+
);
|
|
71
|
+
if (gitlabTreeMatch) {
|
|
72
|
+
const [, owner, repo, ref] = gitlabTreeMatch;
|
|
73
|
+
return {
|
|
74
|
+
type: "gitlab",
|
|
75
|
+
url: `https://gitlab.com/${owner}/${repo}.git`,
|
|
76
|
+
ref
|
|
77
|
+
};
|
|
78
|
+
}
|
|
55
79
|
const gitlabRepoMatch = input.match(/gitlab\.com\/([^/]+)\/([^/]+)/);
|
|
56
80
|
if (gitlabRepoMatch) {
|
|
57
81
|
const [, owner, repo] = gitlabRepoMatch;
|
|
@@ -81,10 +105,11 @@ import simpleGit from "simple-git";
|
|
|
81
105
|
import { join, normalize, resolve as resolve2, sep } from "path";
|
|
82
106
|
import { mkdtemp, rm } from "fs/promises";
|
|
83
107
|
import { tmpdir } from "os";
|
|
84
|
-
async function cloneRepo(url) {
|
|
108
|
+
async function cloneRepo(url, ref) {
|
|
85
109
|
const tempDir = await mkdtemp(join(tmpdir(), "add-skill-"));
|
|
86
110
|
const git = simpleGit();
|
|
87
|
-
|
|
111
|
+
const cloneOptions = ref ? ["--depth", "1", "--branch", ref] : ["--depth", "1"];
|
|
112
|
+
await git.clone(url, tempDir, cloneOptions);
|
|
88
113
|
return tempDir;
|
|
89
114
|
}
|
|
90
115
|
async function cleanupTempDir(dir) {
|
|
@@ -220,8 +245,8 @@ var agents = {
|
|
|
220
245
|
opencode: {
|
|
221
246
|
name: "opencode",
|
|
222
247
|
displayName: "OpenCode",
|
|
223
|
-
skillsDir: ".opencode/
|
|
224
|
-
globalSkillsDir: join3(home, ".config/opencode/
|
|
248
|
+
skillsDir: ".opencode/skills",
|
|
249
|
+
globalSkillsDir: join3(home, ".config/opencode/skills"),
|
|
225
250
|
detectInstalled: async () => {
|
|
226
251
|
return existsSync(join3(home, ".config/opencode")) || existsSync(join3(home, ".claude/skills"));
|
|
227
252
|
}
|
|
@@ -484,7 +509,7 @@ function track(data) {
|
|
|
484
509
|
// package.json
|
|
485
510
|
var package_default = {
|
|
486
511
|
name: "add-skill",
|
|
487
|
-
version: "1.0.
|
|
512
|
+
version: "1.0.18",
|
|
488
513
|
description: "Install agent skills onto coding agents (OpenCode, Claude Code, Codex, Cursor)",
|
|
489
514
|
type: "module",
|
|
490
515
|
bin: {
|
|
@@ -497,20 +522,27 @@ var package_default = {
|
|
|
497
522
|
scripts: {
|
|
498
523
|
build: "tsup src/index.ts --format esm --dts --clean",
|
|
499
524
|
dev: "tsx src/index.ts",
|
|
500
|
-
prepublishOnly: "npm run build"
|
|
501
|
-
"update-readme": "tsx scripts/update-readme.ts"
|
|
525
|
+
prepublishOnly: "npm run build"
|
|
502
526
|
},
|
|
503
527
|
keywords: [
|
|
504
528
|
"cli",
|
|
529
|
+
"agent-skills",
|
|
505
530
|
"skills",
|
|
531
|
+
"ai-agents",
|
|
506
532
|
"opencode",
|
|
507
533
|
"claude-code",
|
|
508
534
|
"codex",
|
|
509
535
|
"cursor",
|
|
510
536
|
"amp",
|
|
537
|
+
"kilo",
|
|
538
|
+
"roo",
|
|
539
|
+
"goose",
|
|
540
|
+
"gemini-cli",
|
|
511
541
|
"antigravity",
|
|
512
|
-
"
|
|
513
|
-
"
|
|
542
|
+
"github-copilot",
|
|
543
|
+
"clawdbot",
|
|
544
|
+
"droid",
|
|
545
|
+
"windsurf"
|
|
514
546
|
],
|
|
515
547
|
repository: {
|
|
516
548
|
type: "git",
|
|
@@ -573,7 +605,7 @@ async function main(source, options) {
|
|
|
573
605
|
const spinner2 = p.spinner();
|
|
574
606
|
spinner2.start("Parsing source...");
|
|
575
607
|
const parsed = parseSource(source);
|
|
576
|
-
spinner2.stop(`Source: ${chalk.cyan(parsed.type === "local" ? parsed.localPath : parsed.url)}${parsed.subpath ? ` (${parsed.subpath})` : ""}`);
|
|
608
|
+
spinner2.stop(`Source: ${chalk.cyan(parsed.type === "local" ? parsed.localPath : parsed.url)}${parsed.ref ? ` @ ${chalk.yellow(parsed.ref)}` : ""}${parsed.subpath ? ` (${parsed.subpath})` : ""}`);
|
|
577
609
|
let skillsDir;
|
|
578
610
|
if (parsed.type === "local") {
|
|
579
611
|
spinner2.start("Validating local path...");
|
|
@@ -587,7 +619,7 @@ async function main(source, options) {
|
|
|
587
619
|
spinner2.stop("Local path validated");
|
|
588
620
|
} else {
|
|
589
621
|
spinner2.start("Cloning repository...");
|
|
590
|
-
tempDir = await cloneRepo(parsed.url);
|
|
622
|
+
tempDir = await cloneRepo(parsed.url, parsed.ref);
|
|
591
623
|
skillsDir = tempDir;
|
|
592
624
|
spinner2.stop("Repository cloned");
|
|
593
625
|
}
|
|
@@ -789,8 +821,15 @@ async function main(source, options) {
|
|
|
789
821
|
const failed = results.filter((r) => !r.success);
|
|
790
822
|
const skillFiles = {};
|
|
791
823
|
for (const skill of selectedSkills) {
|
|
792
|
-
|
|
793
|
-
|
|
824
|
+
let relativePath;
|
|
825
|
+
if (tempDir && skill.path === tempDir) {
|
|
826
|
+
relativePath = "SKILL.md";
|
|
827
|
+
} else if (tempDir && skill.path.startsWith(tempDir + "/")) {
|
|
828
|
+
relativePath = skill.path.slice(tempDir.length + 1) + "/SKILL.md";
|
|
829
|
+
} else {
|
|
830
|
+
relativePath = skill.name + "/SKILL.md";
|
|
831
|
+
}
|
|
832
|
+
skillFiles[skill.name] = relativePath;
|
|
794
833
|
}
|
|
795
834
|
track({
|
|
796
835
|
event: "install",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "add-skill",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "Install agent skills onto coding agents (OpenCode, Claude Code, Codex, Cursor)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -13,20 +13,27 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "tsup src/index.ts --format esm --dts --clean",
|
|
15
15
|
"dev": "tsx src/index.ts",
|
|
16
|
-
"prepublishOnly": "npm run build"
|
|
17
|
-
"update-readme": "tsx scripts/update-readme.ts"
|
|
16
|
+
"prepublishOnly": "npm run build"
|
|
18
17
|
},
|
|
19
18
|
"keywords": [
|
|
20
19
|
"cli",
|
|
20
|
+
"agent-skills",
|
|
21
21
|
"skills",
|
|
22
|
+
"ai-agents",
|
|
22
23
|
"opencode",
|
|
23
24
|
"claude-code",
|
|
24
25
|
"codex",
|
|
25
26
|
"cursor",
|
|
26
27
|
"amp",
|
|
28
|
+
"kilo",
|
|
29
|
+
"roo",
|
|
30
|
+
"goose",
|
|
31
|
+
"gemini-cli",
|
|
27
32
|
"antigravity",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
33
|
+
"github-copilot",
|
|
34
|
+
"clawdbot",
|
|
35
|
+
"droid",
|
|
36
|
+
"windsurf"
|
|
30
37
|
],
|
|
31
38
|
"repository": {
|
|
32
39
|
"type": "git",
|