add-skill 1.0.7 → 1.0.8
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 +10 -10
- package/dist/index.js +119 -30
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Install agent skills onto your coding agents from any git repository.
|
|
4
4
|
|
|
5
|
-
Supports [OpenCode](https://opencode.ai), [Claude Code](https://claude.ai/code), [Codex](https://developers.openai.com/codex), [Cursor](https://cursor.com), and [
|
|
5
|
+
Supports [OpenCode](https://opencode.ai), [Claude Code](https://claude.ai/code), [Codex](https://developers.openai.com/codex), [Cursor](https://cursor.com), and [Antigravity](https://antigravity.google).
|
|
6
6
|
|
|
7
7
|
## Quick Start
|
|
8
8
|
|
|
@@ -47,7 +47,7 @@ npx add-skill git@github.com:vercel-labs/agent-skills.git
|
|
|
47
47
|
| Option | Description |
|
|
48
48
|
|--------|-------------|
|
|
49
49
|
| `-g, --global` | Install to user directory instead of project |
|
|
50
|
-
| `-a, --agent <agents...>` | Target specific agents: `opencode`, `claude-code`, `codex`, `cursor`, `
|
|
50
|
+
| `-a, --agent <agents...>` | Target specific agents: `opencode`, `claude-code`, `codex`, `cursor`, `antigravity` |
|
|
51
51
|
| `-s, --skill <skills...>` | Install specific skills by name |
|
|
52
52
|
| `-l, --list` | List available skills without installing |
|
|
53
53
|
| `-y, --yes` | Skip all confirmation prompts |
|
|
@@ -87,7 +87,7 @@ Installed in your current working directory. Commit these to share with your tea
|
|
|
87
87
|
| Claude Code | `.claude/skills/<name>/` |
|
|
88
88
|
| Codex | `.codex/skills/<name>/` |
|
|
89
89
|
| Cursor | `.cursor/skills/<name>/` |
|
|
90
|
-
|
|
|
90
|
+
| Antigravity | `.agent/skills/<name>/` |
|
|
91
91
|
|
|
92
92
|
### Global (`--global`)
|
|
93
93
|
|
|
@@ -99,7 +99,7 @@ Installed in your home directory. Available across all projects.
|
|
|
99
99
|
| Claude Code | `~/.claude/skills/<name>/` |
|
|
100
100
|
| Codex | `~/.codex/skills/<name>/` |
|
|
101
101
|
| Cursor | `~/.cursor/skills/<name>/` |
|
|
102
|
-
|
|
|
102
|
+
| Antigravity | `~/.gemini/antigravity/skills/<name>/` |
|
|
103
103
|
|
|
104
104
|
## Agent Detection
|
|
105
105
|
|
|
@@ -147,7 +147,7 @@ The CLI searches for skills in these locations within a repository:
|
|
|
147
147
|
- `.claude/skills/`
|
|
148
148
|
- `.opencode/skill/`
|
|
149
149
|
- `.cursor/skills/`
|
|
150
|
-
- `.
|
|
150
|
+
- `.agent/skills/`
|
|
151
151
|
|
|
152
152
|
If no skills are found in standard locations, a recursive search is performed.
|
|
153
153
|
|
|
@@ -155,8 +155,8 @@ If no skills are found in standard locations, a recursive search is performed.
|
|
|
155
155
|
|
|
156
156
|
Skills are generally compatible across agents since they follow a shared [Agent Skills specification](https://agentskills.io). However, some features may be agent-specific:
|
|
157
157
|
|
|
158
|
-
| Feature | OpenCode | Claude Code | Codex | Cursor |
|
|
159
|
-
|
|
158
|
+
| Feature | OpenCode | Claude Code | Codex | Cursor | Antigravity |
|
|
159
|
+
|---------|----------|-------------|-------|--------|-------------|
|
|
160
160
|
| Basic skills | Yes | Yes | Yes | Yes | Yes |
|
|
161
161
|
| `allowed-tools` | Yes | Yes | Yes | Yes | Yes |
|
|
162
162
|
| `context: fork` | No | Yes | No | No | No |
|
|
@@ -182,11 +182,11 @@ Ensure you have write access to the target directory.
|
|
|
182
182
|
|
|
183
183
|
- [Vercel Agent Skills Repository](https://github.com/vercel-labs/agent-skills)
|
|
184
184
|
- [Agent Skills Specification](https://agentskills.io)
|
|
185
|
-
- [OpenCode Skills Documentation](https://opencode.ai/docs/skills
|
|
185
|
+
- [OpenCode Skills Documentation](https://opencode.ai/docs/skills)
|
|
186
186
|
- [Claude Code Skills Documentation](https://code.claude.com/docs/en/skills)
|
|
187
|
-
- [Codex Skills Documentation](https://developers.openai.com/codex/skills
|
|
187
|
+
- [Codex Skills Documentation](https://developers.openai.com/codex/skills)
|
|
188
188
|
- [Cursor Skills Documentation](https://cursor.com/docs/context/skills)
|
|
189
|
-
- [
|
|
189
|
+
- [Antigravity Skills Documentation](https://antigravity.google/docs/skills)
|
|
190
190
|
|
|
191
191
|
## License
|
|
192
192
|
|
package/dist/index.js
CHANGED
|
@@ -145,7 +145,11 @@ async function discoverSkills(basePath, subpath) {
|
|
|
145
145
|
join2(searchPath, ".claude/skills"),
|
|
146
146
|
join2(searchPath, ".opencode/skill"),
|
|
147
147
|
join2(searchPath, ".cursor/skills"),
|
|
148
|
-
join2(searchPath, ".
|
|
148
|
+
join2(searchPath, ".agents/skills"),
|
|
149
|
+
join2(searchPath, ".kilocode/skills"),
|
|
150
|
+
join2(searchPath, ".roo/skills"),
|
|
151
|
+
join2(searchPath, ".goose/skills"),
|
|
152
|
+
join2(searchPath, ".agent/skills")
|
|
149
153
|
];
|
|
150
154
|
for (const dir of prioritySearchDirs) {
|
|
151
155
|
try {
|
|
@@ -227,13 +231,49 @@ var agents = {
|
|
|
227
231
|
return existsSync(join3(home, ".cursor"));
|
|
228
232
|
}
|
|
229
233
|
},
|
|
230
|
-
|
|
231
|
-
name: "
|
|
232
|
-
displayName: "
|
|
233
|
-
skillsDir: ".
|
|
234
|
-
globalSkillsDir: join3(home, ".
|
|
234
|
+
amp: {
|
|
235
|
+
name: "amp",
|
|
236
|
+
displayName: "Amp",
|
|
237
|
+
skillsDir: ".agents/skills",
|
|
238
|
+
globalSkillsDir: join3(home, ".config/agents/skills"),
|
|
235
239
|
detectInstalled: async () => {
|
|
236
|
-
return existsSync(join3(home, ".
|
|
240
|
+
return existsSync(join3(home, ".config/amp"));
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
kilo: {
|
|
244
|
+
name: "kilo",
|
|
245
|
+
displayName: "Kilo Code",
|
|
246
|
+
skillsDir: ".kilocode/skills",
|
|
247
|
+
globalSkillsDir: join3(home, ".kilocode/skills"),
|
|
248
|
+
detectInstalled: async () => {
|
|
249
|
+
return existsSync(join3(home, ".kilocode"));
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
roo: {
|
|
253
|
+
name: "roo",
|
|
254
|
+
displayName: "Roo Code",
|
|
255
|
+
skillsDir: ".roo/skills",
|
|
256
|
+
globalSkillsDir: join3(home, ".roo/skills"),
|
|
257
|
+
detectInstalled: async () => {
|
|
258
|
+
return existsSync(join3(home, ".roo"));
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
goose: {
|
|
262
|
+
name: "goose",
|
|
263
|
+
displayName: "Goose",
|
|
264
|
+
skillsDir: ".goose/skills",
|
|
265
|
+
globalSkillsDir: join3(home, ".config/goose/skills"),
|
|
266
|
+
detectInstalled: async () => {
|
|
267
|
+
return existsSync(join3(home, ".config/goose"));
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
antigravity: {
|
|
271
|
+
name: "antigravity",
|
|
272
|
+
displayName: "Antigravity",
|
|
273
|
+
skillsDir: ".agent/skills",
|
|
274
|
+
globalSkillsDir: join3(home, ".gemini/antigravity/skills"),
|
|
275
|
+
detectInstalled: async () => {
|
|
276
|
+
return existsSync(join3(process.cwd(), ".agent")) || existsSync(join3(home, ".gemini/antigravity"));
|
|
237
277
|
}
|
|
238
278
|
}
|
|
239
279
|
};
|
|
@@ -265,10 +305,22 @@ async function installSkillForAgent(skill, agentType, options = {}) {
|
|
|
265
305
|
};
|
|
266
306
|
}
|
|
267
307
|
}
|
|
308
|
+
var EXCLUDE_FILES = /* @__PURE__ */ new Set([
|
|
309
|
+
"README.md",
|
|
310
|
+
"metadata.json"
|
|
311
|
+
]);
|
|
312
|
+
var isExcluded = (name) => {
|
|
313
|
+
if (EXCLUDE_FILES.has(name)) return true;
|
|
314
|
+
if (name.startsWith("_")) return true;
|
|
315
|
+
return false;
|
|
316
|
+
};
|
|
268
317
|
async function copyDirectory(src, dest) {
|
|
269
318
|
await mkdir(dest, { recursive: true });
|
|
270
319
|
const entries = await readdir2(src, { withFileTypes: true });
|
|
271
320
|
for (const entry of entries) {
|
|
321
|
+
if (isExcluded(entry.name)) {
|
|
322
|
+
continue;
|
|
323
|
+
}
|
|
272
324
|
const srcPath = join4(src, entry.name);
|
|
273
325
|
const destPath = join4(dest, entry.name);
|
|
274
326
|
if (entry.isDirectory()) {
|
|
@@ -295,30 +347,67 @@ function getInstallPath(skillName, agentType, options = {}) {
|
|
|
295
347
|
return join4(targetBase, skillName);
|
|
296
348
|
}
|
|
297
349
|
|
|
350
|
+
// package.json
|
|
351
|
+
var package_default = {
|
|
352
|
+
name: "add-skill",
|
|
353
|
+
version: "1.0.8",
|
|
354
|
+
description: "Install agent skills onto coding agents (OpenCode, Claude Code, Codex, Cursor)",
|
|
355
|
+
type: "module",
|
|
356
|
+
bin: {
|
|
357
|
+
"add-skill": "./dist/index.js"
|
|
358
|
+
},
|
|
359
|
+
files: [
|
|
360
|
+
"dist",
|
|
361
|
+
"README.md"
|
|
362
|
+
],
|
|
363
|
+
scripts: {
|
|
364
|
+
build: "tsup src/index.ts --format esm --dts --clean",
|
|
365
|
+
dev: "tsx src/index.ts",
|
|
366
|
+
prepublishOnly: "npm run build"
|
|
367
|
+
},
|
|
368
|
+
keywords: [
|
|
369
|
+
"cli",
|
|
370
|
+
"skills",
|
|
371
|
+
"opencode",
|
|
372
|
+
"claude-code",
|
|
373
|
+
"codex",
|
|
374
|
+
"cursor",
|
|
375
|
+
"antigravity",
|
|
376
|
+
"ai-agents"
|
|
377
|
+
],
|
|
378
|
+
repository: {
|
|
379
|
+
type: "git",
|
|
380
|
+
url: "git+https://github.com/vercel-labs/add-skill.git"
|
|
381
|
+
},
|
|
382
|
+
homepage: "https://github.com/vercel-labs/add-skill#readme",
|
|
383
|
+
bugs: {
|
|
384
|
+
url: "https://github.com/vercel-labs/add-skill/issues"
|
|
385
|
+
},
|
|
386
|
+
author: "",
|
|
387
|
+
license: "MIT",
|
|
388
|
+
dependencies: {
|
|
389
|
+
"@clack/prompts": "^0.9.1",
|
|
390
|
+
chalk: "^5.4.1",
|
|
391
|
+
commander: "^13.1.0",
|
|
392
|
+
"gray-matter": "^4.0.3",
|
|
393
|
+
"simple-git": "^3.27.0"
|
|
394
|
+
},
|
|
395
|
+
devDependencies: {
|
|
396
|
+
"@types/node": "^22.10.0",
|
|
397
|
+
tsup: "^8.3.5",
|
|
398
|
+
tsx: "^4.19.2",
|
|
399
|
+
typescript: "^5.7.2"
|
|
400
|
+
},
|
|
401
|
+
engines: {
|
|
402
|
+
node: ">=18"
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
|
|
298
406
|
// src/index.ts
|
|
299
|
-
var version =
|
|
300
|
-
program.name("add-skill").description("Install skills onto coding agents (OpenCode, Claude Code, Codex, Cursor,
|
|
407
|
+
var version = package_default.version;
|
|
408
|
+
program.name("add-skill").description("Install skills onto coding agents (OpenCode, Claude Code, Codex, Cursor, Antigravity)").version(version).argument("<source>", "Git repo URL, GitHub shorthand (owner/repo), or direct path to skill").option("-g, --global", "Install skill globally (user-level) instead of project-level").option("-a, --agent <agents...>", "Specify agents to install to (opencode, claude-code, codex, cursor)").option("-s, --skill <skills...>", "Specify skill names to install (skip selection prompt)").option("-l, --list", "List available skills in the repository without installing").option("-y, --yes", "Skip confirmation prompts").action(async (source, options) => {
|
|
301
409
|
await main(source, options);
|
|
302
410
|
});
|
|
303
|
-
program.configureOutput({
|
|
304
|
-
outputError: (str, write) => {
|
|
305
|
-
if (str.includes("missing required argument 'source'")) {
|
|
306
|
-
console.log();
|
|
307
|
-
console.log(chalk.red("Error: Missing skill source"));
|
|
308
|
-
console.log();
|
|
309
|
-
console.log("Usage:");
|
|
310
|
-
console.log(` ${chalk.cyan("npx add-skill <source>")} ${chalk.dim("[options]")}`);
|
|
311
|
-
console.log();
|
|
312
|
-
console.log("Example:");
|
|
313
|
-
console.log(` ${chalk.dim("$")} npx add-skill vercel-labs/agent-skills`);
|
|
314
|
-
console.log();
|
|
315
|
-
console.log(`Run ${chalk.cyan("npx add-skill --help")} for more options.`);
|
|
316
|
-
console.log();
|
|
317
|
-
} else {
|
|
318
|
-
write(str);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
411
|
program.parse();
|
|
323
412
|
async function main(source, options) {
|
|
324
413
|
console.log();
|
|
@@ -398,7 +487,7 @@ async function main(source, options) {
|
|
|
398
487
|
}
|
|
399
488
|
let targetAgents;
|
|
400
489
|
if (options.agent && options.agent.length > 0) {
|
|
401
|
-
const validAgents = ["opencode", "claude-code", "codex", "cursor", "
|
|
490
|
+
const validAgents = ["opencode", "claude-code", "codex", "cursor", "antigravity"];
|
|
402
491
|
const invalidAgents = options.agent.filter((a) => !validAgents.includes(a));
|
|
403
492
|
if (invalidAgents.length > 0) {
|
|
404
493
|
p.log.error(`Invalid agents: ${invalidAgents.join(", ")}`);
|
|
@@ -413,7 +502,7 @@ async function main(source, options) {
|
|
|
413
502
|
spinner2.stop(`Detected ${installedAgents.length} agent${installedAgents.length !== 1 ? "s" : ""}`);
|
|
414
503
|
if (installedAgents.length === 0) {
|
|
415
504
|
if (options.yes) {
|
|
416
|
-
targetAgents = ["opencode", "claude-code", "codex", "cursor", "
|
|
505
|
+
targetAgents = ["opencode", "claude-code", "codex", "cursor", "antigravity"];
|
|
417
506
|
p.log.info("Installing to all agents (none detected)");
|
|
418
507
|
} else {
|
|
419
508
|
p.log.warn("No coding agents detected. You can still install skills.");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "add-skill",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Install agent skills onto coding agents (OpenCode, Claude Code, Codex, Cursor
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"description": "Install agent skills onto coding agents (OpenCode, Claude Code, Codex, Cursor)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"add-skill": "./dist/index.js"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"claude-code",
|
|
23
23
|
"codex",
|
|
24
24
|
"cursor",
|
|
25
|
-
"
|
|
25
|
+
"antigravity",
|
|
26
26
|
"ai-agents"
|
|
27
27
|
],
|
|
28
28
|
"repository": {
|