add-skill 1.0.6 → 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 +14 -10
- package/dist/index.js +123 -24
- package/package.json +2 -1
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),
|
|
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,6 +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
|
+
| Antigravity | `.agent/skills/<name>/` |
|
|
90
91
|
|
|
91
92
|
### Global (`--global`)
|
|
92
93
|
|
|
@@ -98,6 +99,7 @@ Installed in your home directory. Available across all projects.
|
|
|
98
99
|
| Claude Code | `~/.claude/skills/<name>/` |
|
|
99
100
|
| Codex | `~/.codex/skills/<name>/` |
|
|
100
101
|
| Cursor | `~/.cursor/skills/<name>/` |
|
|
102
|
+
| Antigravity | `~/.gemini/antigravity/skills/<name>/` |
|
|
101
103
|
|
|
102
104
|
## Agent Detection
|
|
103
105
|
|
|
@@ -145,6 +147,7 @@ The CLI searches for skills in these locations within a repository:
|
|
|
145
147
|
- `.claude/skills/`
|
|
146
148
|
- `.opencode/skill/`
|
|
147
149
|
- `.cursor/skills/`
|
|
150
|
+
- `.agent/skills/`
|
|
148
151
|
|
|
149
152
|
If no skills are found in standard locations, a recursive search is performed.
|
|
150
153
|
|
|
@@ -152,12 +155,12 @@ If no skills are found in standard locations, a recursive search is performed.
|
|
|
152
155
|
|
|
153
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:
|
|
154
157
|
|
|
155
|
-
| Feature | OpenCode | Claude Code | Codex | Cursor |
|
|
156
|
-
|
|
157
|
-
| Basic skills | Yes | Yes | Yes | Yes |
|
|
158
|
-
| `allowed-tools` | Yes | Yes | Yes | Yes |
|
|
159
|
-
| `context: fork` | No | Yes | No | No |
|
|
160
|
-
| Hooks | No | Yes | No | No |
|
|
158
|
+
| Feature | OpenCode | Claude Code | Codex | Cursor | Antigravity |
|
|
159
|
+
|---------|----------|-------------|-------|--------|-------------|
|
|
160
|
+
| Basic skills | Yes | Yes | Yes | Yes | Yes |
|
|
161
|
+
| `allowed-tools` | Yes | Yes | Yes | Yes | Yes |
|
|
162
|
+
| `context: fork` | No | Yes | No | No | No |
|
|
163
|
+
| Hooks | No | Yes | No | No | No |
|
|
161
164
|
|
|
162
165
|
## Troubleshooting
|
|
163
166
|
|
|
@@ -179,10 +182,11 @@ Ensure you have write access to the target directory.
|
|
|
179
182
|
|
|
180
183
|
- [Vercel Agent Skills Repository](https://github.com/vercel-labs/agent-skills)
|
|
181
184
|
- [Agent Skills Specification](https://agentskills.io)
|
|
182
|
-
- [OpenCode Skills Documentation](https://opencode.ai/docs/skills
|
|
185
|
+
- [OpenCode Skills Documentation](https://opencode.ai/docs/skills)
|
|
183
186
|
- [Claude Code Skills Documentation](https://code.claude.com/docs/en/skills)
|
|
184
|
-
- [Codex Skills Documentation](https://developers.openai.com/codex/skills
|
|
187
|
+
- [Codex Skills Documentation](https://developers.openai.com/codex/skills)
|
|
185
188
|
- [Cursor Skills Documentation](https://cursor.com/docs/context/skills)
|
|
189
|
+
- [Antigravity Skills Documentation](https://antigravity.google/docs/skills)
|
|
186
190
|
|
|
187
191
|
## License
|
|
188
192
|
|
package/dist/index.js
CHANGED
|
@@ -144,7 +144,12 @@ async function discoverSkills(basePath, subpath) {
|
|
|
144
144
|
join2(searchPath, ".codex/skills"),
|
|
145
145
|
join2(searchPath, ".claude/skills"),
|
|
146
146
|
join2(searchPath, ".opencode/skill"),
|
|
147
|
-
join2(searchPath, ".cursor/skills")
|
|
147
|
+
join2(searchPath, ".cursor/skills"),
|
|
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")
|
|
148
153
|
];
|
|
149
154
|
for (const dir of prioritySearchDirs) {
|
|
150
155
|
try {
|
|
@@ -225,6 +230,51 @@ var agents = {
|
|
|
225
230
|
detectInstalled: async () => {
|
|
226
231
|
return existsSync(join3(home, ".cursor"));
|
|
227
232
|
}
|
|
233
|
+
},
|
|
234
|
+
amp: {
|
|
235
|
+
name: "amp",
|
|
236
|
+
displayName: "Amp",
|
|
237
|
+
skillsDir: ".agents/skills",
|
|
238
|
+
globalSkillsDir: join3(home, ".config/agents/skills"),
|
|
239
|
+
detectInstalled: async () => {
|
|
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"));
|
|
277
|
+
}
|
|
228
278
|
}
|
|
229
279
|
};
|
|
230
280
|
async function detectInstalledAgents() {
|
|
@@ -255,10 +305,22 @@ async function installSkillForAgent(skill, agentType, options = {}) {
|
|
|
255
305
|
};
|
|
256
306
|
}
|
|
257
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
|
+
};
|
|
258
317
|
async function copyDirectory(src, dest) {
|
|
259
318
|
await mkdir(dest, { recursive: true });
|
|
260
319
|
const entries = await readdir2(src, { withFileTypes: true });
|
|
261
320
|
for (const entry of entries) {
|
|
321
|
+
if (isExcluded(entry.name)) {
|
|
322
|
+
continue;
|
|
323
|
+
}
|
|
262
324
|
const srcPath = join4(src, entry.name);
|
|
263
325
|
const destPath = join4(dest, entry.name);
|
|
264
326
|
if (entry.isDirectory()) {
|
|
@@ -285,30 +347,67 @@ function getInstallPath(skillName, agentType, options = {}) {
|
|
|
285
347
|
return join4(targetBase, skillName);
|
|
286
348
|
}
|
|
287
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
|
+
|
|
288
406
|
// src/index.ts
|
|
289
|
-
var version =
|
|
290
|
-
program.name("add-skill").description("Install skills onto coding agents (OpenCode, Claude Code, Codex, Cursor)").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) => {
|
|
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) => {
|
|
291
409
|
await main(source, options);
|
|
292
410
|
});
|
|
293
|
-
program.configureOutput({
|
|
294
|
-
outputError: (str, write) => {
|
|
295
|
-
if (str.includes("missing required argument 'source'")) {
|
|
296
|
-
console.log();
|
|
297
|
-
console.log(chalk.red("Error: Missing skill source"));
|
|
298
|
-
console.log();
|
|
299
|
-
console.log("Usage:");
|
|
300
|
-
console.log(` ${chalk.cyan("npx add-skill <source>")} ${chalk.dim("[options]")}`);
|
|
301
|
-
console.log();
|
|
302
|
-
console.log("Example:");
|
|
303
|
-
console.log(` ${chalk.dim("$")} npx add-skill vercel-labs/agent-skills`);
|
|
304
|
-
console.log();
|
|
305
|
-
console.log(`Run ${chalk.cyan("npx add-skill --help")} for more options.`);
|
|
306
|
-
console.log();
|
|
307
|
-
} else {
|
|
308
|
-
write(str);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
411
|
program.parse();
|
|
313
412
|
async function main(source, options) {
|
|
314
413
|
console.log();
|
|
@@ -388,7 +487,7 @@ async function main(source, options) {
|
|
|
388
487
|
}
|
|
389
488
|
let targetAgents;
|
|
390
489
|
if (options.agent && options.agent.length > 0) {
|
|
391
|
-
const validAgents = ["opencode", "claude-code", "codex", "cursor"];
|
|
490
|
+
const validAgents = ["opencode", "claude-code", "codex", "cursor", "antigravity"];
|
|
392
491
|
const invalidAgents = options.agent.filter((a) => !validAgents.includes(a));
|
|
393
492
|
if (invalidAgents.length > 0) {
|
|
394
493
|
p.log.error(`Invalid agents: ${invalidAgents.join(", ")}`);
|
|
@@ -403,7 +502,7 @@ async function main(source, options) {
|
|
|
403
502
|
spinner2.stop(`Detected ${installedAgents.length} agent${installedAgents.length !== 1 ? "s" : ""}`);
|
|
404
503
|
if (installedAgents.length === 0) {
|
|
405
504
|
if (options.yes) {
|
|
406
|
-
targetAgents = ["opencode", "claude-code", "codex", "cursor"];
|
|
505
|
+
targetAgents = ["opencode", "claude-code", "codex", "cursor", "antigravity"];
|
|
407
506
|
p.log.info("Installing to all agents (none detected)");
|
|
408
507
|
} else {
|
|
409
508
|
p.log.warn("No coding agents detected. You can still install skills.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "add-skill",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Install agent skills onto coding agents (OpenCode, Claude Code, Codex, Cursor)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"claude-code",
|
|
23
23
|
"codex",
|
|
24
24
|
"cursor",
|
|
25
|
+
"antigravity",
|
|
25
26
|
"ai-agents"
|
|
26
27
|
],
|
|
27
28
|
"repository": {
|