add-skill 1.0.9 → 1.0.11
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 -7
- package/dist/index.js +25 -45
- 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), [Cursor](https://cursor.com),
|
|
5
|
+
Supports [OpenCode](https://opencode.ai), [Claude Code](https://claude.ai/code), [Codex](https://developers.openai.com/codex), [Cursor](https://cursor.com), [Antigravity](https://antigravity.google), and [Roo Code](https://roocode.com).
|
|
6
6
|
|
|
7
7
|
## Quick Start
|
|
8
8
|
|
|
@@ -88,6 +88,7 @@ Installed in your current working directory. Commit these to share with your tea
|
|
|
88
88
|
| Codex | `.codex/skills/<name>/` |
|
|
89
89
|
| Cursor | `.cursor/skills/<name>/` |
|
|
90
90
|
| Antigravity | `.agent/skills/<name>/` |
|
|
91
|
+
| Roo Code | `.roo/skills/<name>/` |
|
|
91
92
|
|
|
92
93
|
### Global (`--global`)
|
|
93
94
|
|
|
@@ -100,6 +101,7 @@ Installed in your home directory. Available across all projects.
|
|
|
100
101
|
| Codex | `~/.codex/skills/<name>/` |
|
|
101
102
|
| Cursor | `~/.cursor/skills/<name>/` |
|
|
102
103
|
| Antigravity | `~/.gemini/antigravity/skills/<name>/` |
|
|
104
|
+
| Roo Code | `~/.roo/skills/<name>/` |
|
|
103
105
|
|
|
104
106
|
## Agent Detection
|
|
105
107
|
|
|
@@ -155,12 +157,12 @@ If no skills are found in standard locations, a recursive search is performed.
|
|
|
155
157
|
|
|
156
158
|
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
159
|
|
|
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 |
|
|
160
|
+
| Feature | OpenCode | Claude Code | Codex | Cursor | Antigravity | Roo Code |
|
|
161
|
+
|---------|----------|-------------|-------|--------|-------------|----------|
|
|
162
|
+
| Basic skills | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
163
|
+
| `allowed-tools` | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
164
|
+
| `context: fork` | No | Yes | No | No | No | No |
|
|
165
|
+
| Hooks | No | Yes | No | No | No | No |
|
|
164
166
|
|
|
165
167
|
## Troubleshooting
|
|
166
168
|
|
|
@@ -187,6 +189,7 @@ Ensure you have write access to the target directory.
|
|
|
187
189
|
- [Codex Skills Documentation](https://developers.openai.com/codex/skills)
|
|
188
190
|
- [Cursor Skills Documentation](https://cursor.com/docs/context/skills)
|
|
189
191
|
- [Antigravity Skills Documentation](https://antigravity.google/docs/skills)
|
|
192
|
+
- [Roo Code Skills Documentation](https://docs.roocode.com/features/skills)
|
|
190
193
|
|
|
191
194
|
## License
|
|
192
195
|
|
package/dist/index.js
CHANGED
|
@@ -349,14 +349,7 @@ function getInstallPath(skillName, agentType, options = {}) {
|
|
|
349
349
|
|
|
350
350
|
// src/telemetry.ts
|
|
351
351
|
var TELEMETRY_URL = "https://add-skill.vercel.sh/t";
|
|
352
|
-
var sessionId = null;
|
|
353
352
|
var cliVersion = null;
|
|
354
|
-
function getSessionId() {
|
|
355
|
-
if (!sessionId) {
|
|
356
|
-
sessionId = Math.random().toString(36).substring(2, 10);
|
|
357
|
-
}
|
|
358
|
-
return sessionId;
|
|
359
|
-
}
|
|
360
353
|
function isCI() {
|
|
361
354
|
return !!(process.env.CI || process.env.GITHUB_ACTIONS || process.env.GITLAB_CI || process.env.CIRCLECI || process.env.TRAVIS || process.env.BUILDKITE || process.env.JENKINS_URL || process.env.TEAMCITY_VERSION);
|
|
362
355
|
}
|
|
@@ -368,27 +361,29 @@ function setVersion(version2) {
|
|
|
368
361
|
}
|
|
369
362
|
function track(data) {
|
|
370
363
|
if (!isEnabled()) return;
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}
|
|
376
|
-
if (isCI()) {
|
|
377
|
-
params.set("ci", "1");
|
|
378
|
-
}
|
|
379
|
-
for (const [key, value] of Object.entries(data)) {
|
|
380
|
-
if (value !== void 0 && value !== null) {
|
|
381
|
-
params.set(key, String(value));
|
|
364
|
+
try {
|
|
365
|
+
const params = new URLSearchParams();
|
|
366
|
+
if (cliVersion) {
|
|
367
|
+
params.set("v", cliVersion);
|
|
382
368
|
}
|
|
369
|
+
if (isCI()) {
|
|
370
|
+
params.set("ci", "1");
|
|
371
|
+
}
|
|
372
|
+
for (const [key, value] of Object.entries(data)) {
|
|
373
|
+
if (value !== void 0 && value !== null) {
|
|
374
|
+
params.set(key, String(value));
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
fetch(`${TELEMETRY_URL}?${params.toString()}`).catch(() => {
|
|
378
|
+
});
|
|
379
|
+
} catch {
|
|
383
380
|
}
|
|
384
|
-
fetch(`${TELEMETRY_URL}?${params.toString()}`).catch(() => {
|
|
385
|
-
});
|
|
386
381
|
}
|
|
387
382
|
|
|
388
383
|
// package.json
|
|
389
384
|
var package_default = {
|
|
390
385
|
name: "add-skill",
|
|
391
|
-
version: "1.0.
|
|
386
|
+
version: "1.0.11",
|
|
392
387
|
description: "Install agent skills onto coding agents (OpenCode, Claude Code, Codex, Cursor)",
|
|
393
388
|
type: "module",
|
|
394
389
|
bin: {
|
|
@@ -411,6 +406,7 @@ var package_default = {
|
|
|
411
406
|
"codex",
|
|
412
407
|
"cursor",
|
|
413
408
|
"antigravity",
|
|
409
|
+
"roo-code",
|
|
414
410
|
"ai-agents"
|
|
415
411
|
],
|
|
416
412
|
repository: {
|
|
@@ -444,19 +440,13 @@ var package_default = {
|
|
|
444
440
|
// src/index.ts
|
|
445
441
|
var version = package_default.version;
|
|
446
442
|
setVersion(version);
|
|
447
|
-
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) => {
|
|
443
|
+
program.name("add-skill").description("Install skills onto coding agents (OpenCode, Claude Code, Codex, Cursor, Antigravity, Roo Code)").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, antigravity, roo)").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) => {
|
|
448
444
|
await main(source, options);
|
|
449
445
|
});
|
|
450
446
|
program.parse();
|
|
451
447
|
async function main(source, options) {
|
|
452
448
|
console.log();
|
|
453
449
|
p.intro(chalk.bgCyan.black(" add-skill "));
|
|
454
|
-
track({
|
|
455
|
-
event: "run",
|
|
456
|
-
source,
|
|
457
|
-
...options.global && { global: "1" },
|
|
458
|
-
...options.list && { list: "1" }
|
|
459
|
-
});
|
|
460
450
|
let tempDir = null;
|
|
461
451
|
try {
|
|
462
452
|
const spinner2 = p.spinner();
|
|
@@ -470,13 +460,11 @@ async function main(source, options) {
|
|
|
470
460
|
const skills = await discoverSkills(tempDir, parsed.subpath);
|
|
471
461
|
if (skills.length === 0) {
|
|
472
462
|
spinner2.stop(chalk.red("No skills found"));
|
|
473
|
-
track({ event: "error", error: "no_skills_found" });
|
|
474
463
|
p.outro(chalk.red("No valid skills found. Skills require a SKILL.md with name and description."));
|
|
475
464
|
await cleanup(tempDir);
|
|
476
465
|
process.exit(1);
|
|
477
466
|
}
|
|
478
467
|
spinner2.stop(`Found ${chalk.green(skills.length)} skill${skills.length > 1 ? "s" : ""}`);
|
|
479
|
-
track({ event: "skills_discovered", skills_found: skills.length });
|
|
480
468
|
if (options.list) {
|
|
481
469
|
console.log();
|
|
482
470
|
p.log.step(chalk.bold("Available Skills"));
|
|
@@ -526,7 +514,6 @@ async function main(source, options) {
|
|
|
526
514
|
required: true
|
|
527
515
|
});
|
|
528
516
|
if (p.isCancel(selected)) {
|
|
529
|
-
track({ event: "cancelled" });
|
|
530
517
|
p.cancel("Installation cancelled");
|
|
531
518
|
await cleanup(tempDir);
|
|
532
519
|
process.exit(0);
|
|
@@ -535,7 +522,7 @@ async function main(source, options) {
|
|
|
535
522
|
}
|
|
536
523
|
let targetAgents;
|
|
537
524
|
if (options.agent && options.agent.length > 0) {
|
|
538
|
-
const validAgents = ["opencode", "claude-code", "codex", "cursor", "antigravity"];
|
|
525
|
+
const validAgents = ["opencode", "claude-code", "codex", "cursor", "antigravity", "roo"];
|
|
539
526
|
const invalidAgents = options.agent.filter((a) => !validAgents.includes(a));
|
|
540
527
|
if (invalidAgents.length > 0) {
|
|
541
528
|
p.log.error(`Invalid agents: ${invalidAgents.join(", ")}`);
|
|
@@ -550,7 +537,7 @@ async function main(source, options) {
|
|
|
550
537
|
spinner2.stop(`Detected ${installedAgents.length} agent${installedAgents.length !== 1 ? "s" : ""}`);
|
|
551
538
|
if (installedAgents.length === 0) {
|
|
552
539
|
if (options.yes) {
|
|
553
|
-
targetAgents = ["opencode", "claude-code", "codex", "cursor", "antigravity"];
|
|
540
|
+
targetAgents = ["opencode", "claude-code", "codex", "cursor", "antigravity", "roo"];
|
|
554
541
|
p.log.info("Installing to all agents (none detected)");
|
|
555
542
|
} else {
|
|
556
543
|
p.log.warn("No coding agents detected. You can still install skills.");
|
|
@@ -564,7 +551,6 @@ async function main(source, options) {
|
|
|
564
551
|
required: true
|
|
565
552
|
});
|
|
566
553
|
if (p.isCancel(selected)) {
|
|
567
|
-
track({ event: "cancelled" });
|
|
568
554
|
p.cancel("Installation cancelled");
|
|
569
555
|
await cleanup(tempDir);
|
|
570
556
|
process.exit(0);
|
|
@@ -592,7 +578,6 @@ async function main(source, options) {
|
|
|
592
578
|
initialValues: installedAgents
|
|
593
579
|
});
|
|
594
580
|
if (p.isCancel(selected)) {
|
|
595
|
-
track({ event: "cancelled" });
|
|
596
581
|
p.cancel("Installation cancelled");
|
|
597
582
|
await cleanup(tempDir);
|
|
598
583
|
process.exit(0);
|
|
@@ -610,7 +595,6 @@ async function main(source, options) {
|
|
|
610
595
|
]
|
|
611
596
|
});
|
|
612
597
|
if (p.isCancel(scope)) {
|
|
613
|
-
track({ event: "cancelled" });
|
|
614
598
|
p.cancel("Installation cancelled");
|
|
615
599
|
await cleanup(tempDir);
|
|
616
600
|
process.exit(0);
|
|
@@ -632,7 +616,6 @@ async function main(source, options) {
|
|
|
632
616
|
if (!options.yes) {
|
|
633
617
|
const confirmed = await p.confirm({ message: "Proceed with installation?" });
|
|
634
618
|
if (p.isCancel(confirmed) || !confirmed) {
|
|
635
|
-
track({ event: "cancelled" });
|
|
636
619
|
p.cancel("Installation cancelled");
|
|
637
620
|
await cleanup(tempDir);
|
|
638
621
|
process.exit(0);
|
|
@@ -655,12 +638,11 @@ async function main(source, options) {
|
|
|
655
638
|
const successful = results.filter((r) => r.success);
|
|
656
639
|
const failed = results.filter((r) => !r.success);
|
|
657
640
|
track({
|
|
658
|
-
event: "
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
failed: failed.length
|
|
641
|
+
event: "install",
|
|
642
|
+
source,
|
|
643
|
+
skills: selectedSkills.map((s) => s.name).join(","),
|
|
644
|
+
agents: targetAgents.join(","),
|
|
645
|
+
...installGlobally && { global: "1" }
|
|
664
646
|
});
|
|
665
647
|
if (successful.length > 0) {
|
|
666
648
|
p.log.success(chalk.green(`Successfully installed ${successful.length} skill${successful.length !== 1 ? "s" : ""}`));
|
|
@@ -680,8 +662,6 @@ async function main(source, options) {
|
|
|
680
662
|
console.log();
|
|
681
663
|
p.outro(chalk.green("Done!"));
|
|
682
664
|
} catch (error) {
|
|
683
|
-
const errorType = error instanceof Error ? error.message.includes("clone") ? "clone_failed" : error.message.includes("permission") ? "permission_denied" : "unknown" : "unknown";
|
|
684
|
-
track({ event: "error", error: errorType });
|
|
685
665
|
p.log.error(error instanceof Error ? error.message : "Unknown error occurred");
|
|
686
666
|
p.outro(chalk.red("Installation failed"));
|
|
687
667
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "add-skill",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Install agent skills onto coding agents (OpenCode, Claude Code, Codex, Cursor)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"codex",
|
|
24
24
|
"cursor",
|
|
25
25
|
"antigravity",
|
|
26
|
+
"roo-code",
|
|
26
27
|
"ai-agents"
|
|
27
28
|
],
|
|
28
29
|
"repository": {
|