install-agent-skill 1.2.3 → 1.2.4
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.bigtech.md +16 -16
- package/README.md +13 -13
- package/bin/add-skill.js +1 -1
- package/bin/add-skill.v2.js +76 -18
- package/package.json +1 -1
package/README.bigtech.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<img src="https://raw.githubusercontent.com/dataguruin/add-skill/main/.github/logo.svg" height="128">
|
|
3
|
-
<h1 align="center">
|
|
3
|
+
<h1 align="center">install-agent-skill</h1>
|
|
4
4
|
</p>
|
|
5
5
|
|
|
6
6
|
<p align="center">
|
|
7
|
-
<a href="https://www.npmjs.com/package
|
|
8
|
-
<a href="https://www.npmjs.com/package
|
|
7
|
+
<a href="https://www.npmjs.com/package/install-agent-skill"><img src="https://img.shields.io/npm/v/install-agent-skill?style=flat&colorA=18181b&colorB=7c3aed" alt="npm version"></a>
|
|
8
|
+
<a href="https://www.npmjs.com/package/install-agent-skill"><img src="https://img.shields.io/npm/d18m/install-agent-skill?style=flat&colorA=18181b&colorB=7c3aed" alt="npm downloads"></a>
|
|
9
9
|
<a href="https://github.com/dataguruin/add-skill/blob/main/LICENSE"><img src="https://img.shields.io/github/license/dataguruin/add-skill?style=flat&colorA=18181b&colorB=7c3aed" alt="license"></a>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
|
|
27
27
|
## What is add-skill?
|
|
28
28
|
|
|
29
|
-
`
|
|
29
|
+
`install-agent-skill` is a CLI tool for managing **Agent Skills**—immutable, verifiable intelligence artifacts that extend your AI agent's capabilities. Think of it as `npm` for AI agents.
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
npx -y
|
|
32
|
+
npx -y install-agent-skill install dataguruin/coinpika-agent-skills#coinpika-doctrine-pack
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
Skills are **data, not code**. They won't execute on your system—they're read by your agent to enhance its behavior.
|
|
@@ -40,16 +40,16 @@ Skills are **data, not code**. They won't execute on your system—they're read
|
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
42
|
# Using npm
|
|
43
|
-
npm install -g
|
|
43
|
+
npm install -g install-agent-skill
|
|
44
44
|
|
|
45
45
|
# Using pnpm
|
|
46
|
-
pnpm add -g
|
|
46
|
+
pnpm add -g install-agent-skill
|
|
47
47
|
|
|
48
48
|
# Using Yarn
|
|
49
|
-
yarn global add
|
|
49
|
+
yarn global add install-agent-skill
|
|
50
50
|
|
|
51
51
|
# Or run directly with npx
|
|
52
|
-
npx -y
|
|
52
|
+
npx -y install-agent-skill <command>
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
> **Requirements:** Node.js 18.0.0 or later
|
|
@@ -61,7 +61,7 @@ npx -y add-agent-skill <command>
|
|
|
61
61
|
### 1. Initialize your workspace
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
npx -y
|
|
64
|
+
npx -y install-agent-skill init
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
This creates the `.agent/skills` directory structure in your project.
|
|
@@ -72,22 +72,22 @@ Install from GitHub with optional version pinning:
|
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
74
|
# Latest version
|
|
75
|
-
npx -y
|
|
75
|
+
npx -y install-agent-skill install dataguruin/coinpika-agent-skills#coinpika-pr-reviewer
|
|
76
76
|
|
|
77
77
|
# Specific version
|
|
78
|
-
npx -y
|
|
78
|
+
npx -y install-agent-skill install dataguruin/coinpika-agent-skills#coinpika-doctrine-pack@v1.0.0
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
### 3. List installed skills
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
|
-
npx -y
|
|
84
|
+
npx -y install-agent-skill list
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
### 4. Validate compliance
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
|
-
npx -y
|
|
90
|
+
npx -y install-agent-skill validate
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
---
|
|
@@ -132,10 +132,10 @@ Pin exact versions for reproducible builds across your team:
|
|
|
132
132
|
|
|
133
133
|
```bash
|
|
134
134
|
# Generate lockfile
|
|
135
|
-
npx -y
|
|
135
|
+
npx -y install-agent-skill lock
|
|
136
136
|
|
|
137
137
|
# Install from lockfile
|
|
138
|
-
npx -y
|
|
138
|
+
npx -y install-agent-skill install --locked
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
### Security by Design
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://img.shields.io/badge/
|
|
2
|
+
<img src="https://img.shields.io/badge/install--agent--skill-v1.2.3-000000?style=for-the-badge&logo=npm&logoColor=white" alt="install-agent-skill v1.2.3" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<h1 align="center">
|
|
5
|
+
<h1 align="center">install-agent-skill</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<strong>The package manager for AI agent skills.</strong><br/>
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
13
|
-
<a href="https://www.npmjs.com/package
|
|
14
|
-
<a href="https://www.npmjs.com/package
|
|
13
|
+
<a href="https://www.npmjs.com/package/install-agent-skill"><img src="https://img.shields.io/npm/v/install-agent-skill?style=flat-square&color=000000" alt="npm version"></a>
|
|
14
|
+
<a href="https://www.npmjs.com/package/install-agent-skill"><img src="https://img.shields.io/npm/dm/install-agent-skill?style=flat-square&color=000000" alt="npm downloads"></a>
|
|
15
15
|
<a href="https://github.com/dataguruin/add-skill/blob/main/LICENSE"><img src="https://img.shields.io/github/license/dataguruin/add-skill?style=flat-square&color=000000" alt="license"></a>
|
|
16
16
|
</p>
|
|
17
17
|
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
|
|
27
27
|
## What is add-skill?
|
|
28
28
|
|
|
29
|
-
**
|
|
29
|
+
**install-agent-skill** is a CLI tool for managing Agent Skills—intelligent artifacts that extend your AI coding agent's capabilities.
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
npx -y
|
|
32
|
+
npx -y install-agent-skill dataguruin/agent-skills
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
```
|
|
@@ -65,13 +65,13 @@ Skills are **data, not code**—they're read by your agent to enhance its behavi
|
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
67
|
# Using npx (recommended)
|
|
68
|
-
npx -y
|
|
68
|
+
npx -y install-agent-skill <org/repo>
|
|
69
69
|
|
|
70
70
|
# Global install
|
|
71
|
-
npm install -g
|
|
71
|
+
npm install -g install-agent-skill
|
|
72
72
|
|
|
73
73
|
# Or with pnpm
|
|
74
|
-
pnpm add -g
|
|
74
|
+
pnpm add -g install-agent-skill
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
> **Requires** Node.js 18+
|
|
@@ -83,7 +83,7 @@ pnpm add -g add-agent-skill
|
|
|
83
83
|
### Install skills from GitHub
|
|
84
84
|
|
|
85
85
|
```bash
|
|
86
|
-
npx -y
|
|
86
|
+
npx -y install-agent-skill dataguruin/agent-skills
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
Interactive prompts let you select which skills to install.
|
|
@@ -91,7 +91,7 @@ Interactive prompts let you select which skills to install.
|
|
|
91
91
|
### List installed skills
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
npx -y
|
|
94
|
+
npx -y install-agent-skill list
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
```
|
|
@@ -113,7 +113,7 @@ npx -y add-agent-skill list
|
|
|
113
113
|
### Check health
|
|
114
114
|
|
|
115
115
|
```bash
|
|
116
|
-
npx -y
|
|
116
|
+
npx -y install-agent-skill doctor
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
```
|
|
@@ -187,7 +187,7 @@ skill/
|
|
|
187
187
|
### Antigravity Compatibility Score
|
|
188
188
|
|
|
189
189
|
```bash
|
|
190
|
-
npx -y
|
|
190
|
+
npx -y install-agent-skill analyze coinpika-doctrine-pack
|
|
191
191
|
```
|
|
192
192
|
|
|
193
193
|
```
|
package/bin/add-skill.js
CHANGED
package/bin/add-skill.v2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* install-agent-skill
|
|
4
4
|
* Vercel-Style CLI - Full Port v2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -10,6 +10,7 @@ import os from "os";
|
|
|
10
10
|
import { execSync } from "child_process";
|
|
11
11
|
import crypto from "crypto";
|
|
12
12
|
import prompts from "prompts";
|
|
13
|
+
import { multiselect, isCancel, cancel, intro, outro, select, confirm } from "@clack/prompts";
|
|
13
14
|
import kleur from "kleur";
|
|
14
15
|
import ora from "ora";
|
|
15
16
|
import boxen from "boxen";
|
|
@@ -47,7 +48,25 @@ const OFFLINE = flags.has("--offline");
|
|
|
47
48
|
|
|
48
49
|
// --- THEME & SYMBOLS ---
|
|
49
50
|
const S = { branch: "│", diamond: "◇", diamondFilled: "◆", check: "✓", cross: "x", arrow: "→" };
|
|
50
|
-
const c = {
|
|
51
|
+
const c = {
|
|
52
|
+
cyan: kleur.cyan,
|
|
53
|
+
gray: kleur.gray,
|
|
54
|
+
green: kleur.green,
|
|
55
|
+
red: kleur.red,
|
|
56
|
+
yellow: kleur.yellow,
|
|
57
|
+
magenta: kleur.magenta,
|
|
58
|
+
blue: kleur.blue,
|
|
59
|
+
white: kleur.white,
|
|
60
|
+
black: kleur.black,
|
|
61
|
+
bgCyan: kleur.bgCyan,
|
|
62
|
+
bgRed: kleur.bgRed,
|
|
63
|
+
bgGreen: kleur.bgGreen,
|
|
64
|
+
bgYellow: kleur.bgYellow,
|
|
65
|
+
bold: kleur.bold,
|
|
66
|
+
dim: kleur.dim,
|
|
67
|
+
italic: kleur.italic,
|
|
68
|
+
underline: kleur.underline
|
|
69
|
+
};
|
|
51
70
|
|
|
52
71
|
// --- UI Helpers ---
|
|
53
72
|
function step(text, icon = S.diamond, color = "gray") {
|
|
@@ -233,36 +252,75 @@ async function runInstall(spec) {
|
|
|
233
252
|
if (!org || !repo) { fatal("Invalid spec. Format: org/repo or org/repo#skill"); return; }
|
|
234
253
|
const url = `https://github.com/${org}/${repo}.git`;
|
|
235
254
|
stepLine();
|
|
236
|
-
console.log(` ${c.bgCyan().black(" skills ")}`);
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
const spinner = ora({ text: "Cloning repository", prefixText: `
|
|
255
|
+
console.log(` ${c.gray(S.branch)} ${c.bgCyan().black(" skills ")}`);
|
|
256
|
+
stepLine();
|
|
257
|
+
step(`Source: ${c.cyan(url)}`, S.diamond, "green");
|
|
258
|
+
stepLine();
|
|
259
|
+
const spinner = ora({ text: "Cloning repository", prefixText: ` ${c.gray(S.branch)} ${c.cyan(S.diamondFilled)} `, color: "cyan" }).start();
|
|
241
260
|
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "add-skill-"));
|
|
242
|
-
try { execSync(`git clone --depth=1 ${url} "${tmp}"`, { stdio: "pipe" }); if (ref) execSync(`git -C "${tmp}" checkout ${ref}`, { stdio: "pipe" }); } catch { spinner.stop(); console.log(`
|
|
243
|
-
spinner.stop();
|
|
261
|
+
try { execSync(`git clone --depth=1 ${url} "${tmp}"`, { stdio: "pipe" }); if (ref) execSync(`git -C "${tmp}" checkout ${ref}`, { stdio: "pipe" }); } catch { spinner.stop(); console.log(` ${c.gray(S.branch)} ${c.red(S.cross)} ${c.red("Failed to clone")}`); fs.rmSync(tmp, { recursive: true, force: true }); return; }
|
|
262
|
+
spinner.stop(); step("Repository cloned", S.check, "green");
|
|
244
263
|
const skillsInRepo = [];
|
|
245
264
|
for (const e of fs.readdirSync(tmp)) { const sp = path.join(tmp, e); if (fs.statSync(sp).isDirectory() && fs.existsSync(path.join(sp, "SKILL.md"))) { const m = parseSkillMdFrontmatter(path.join(sp, "SKILL.md")); skillsInRepo.push({ title: e + (m.description ? c.dim(` (${m.description.substring(0, 40)}...)`) : ""), value: e, selected: singleSkill ? e === singleSkill : true }); } }
|
|
246
265
|
if (skillsInRepo.length === 0) { step(c.yellow("No valid skills found"), S.diamond, "yellow"); fs.rmSync(tmp, { recursive: true, force: true }); return; }
|
|
247
266
|
stepLine(); step(`Found ${skillsInRepo.length} skills`, S.diamond); stepLine();
|
|
248
|
-
|
|
249
|
-
|
|
267
|
+
|
|
268
|
+
// Use @clack/prompts for multiselect
|
|
269
|
+
const skillsR = await multiselect({
|
|
270
|
+
message: 'Select skills to install',
|
|
271
|
+
options: skillsInRepo.map(s => ({
|
|
272
|
+
label: s.title,
|
|
273
|
+
value: s.value,
|
|
274
|
+
hint: s.value === singleSkill ? ' (requested)' : undefined
|
|
275
|
+
})),
|
|
276
|
+
initialValues: singleSkill ? [singleSkill] : [],
|
|
277
|
+
required: true
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
if (isCancel(skillsR)) {
|
|
281
|
+
cancel('Operation cancelled.');
|
|
282
|
+
fs.rmSync(tmp, { recursive: true, force: true });
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
const selectedSkills = skillsR;
|
|
287
|
+
if (selectedSkills.length === 0) { console.log(`\n ${c.yellow("Cancelled.")}`); fs.rmSync(tmp, { recursive: true, force: true }); return; }
|
|
288
|
+
|
|
250
289
|
stepLine();
|
|
251
|
-
|
|
252
|
-
|
|
290
|
+
// Re-use standard prompts for scope for now, or could switch to clack select too,
|
|
291
|
+
// but focusing on the requested "green square" UI which is multiselect.
|
|
292
|
+
// To match style, let's use clack select for scope too.
|
|
293
|
+
|
|
294
|
+
const scopeR = await select({
|
|
295
|
+
message: 'Installation scope',
|
|
296
|
+
options: [
|
|
297
|
+
{ label: 'Project (current directory)', value: 'project' },
|
|
298
|
+
{ label: 'Global', value: 'global' }
|
|
299
|
+
],
|
|
300
|
+
initialValue: 'project'
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
if (isCancel(scopeR)) {
|
|
304
|
+
cancel('Operation cancelled.');
|
|
305
|
+
fs.rmSync(tmp, { recursive: true, force: true });
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
const targetScope = scopeR === "global" ? GLOBAL_DIR : WORKSPACE;
|
|
310
|
+
|
|
253
311
|
stepLine(); step("Installation Summary", S.diamond); stepLine();
|
|
254
|
-
let boxContent = ""; for (const sn of
|
|
312
|
+
let boxContent = ""; for (const sn of selectedSkills) boxContent += `${c.cyan(sn)}\n ${c.dim(targetScope)}\n\n`;
|
|
255
313
|
const box = boxen(boxContent.trim(), { padding: 1, borderStyle: "round", borderColor: "gray", dimBorder: true });
|
|
256
|
-
box.split("\n").forEach(l => console.log(`
|
|
314
|
+
box.split("\n").forEach(l => console.log(` ${c.gray(S.branch)} ${l}`));
|
|
257
315
|
|
|
258
316
|
stepLine(); fs.mkdirSync(targetScope, { recursive: true });
|
|
259
|
-
for (const sn of
|
|
317
|
+
for (const sn of selectedSkills) {
|
|
260
318
|
const src = path.join(tmp, sn), dest = path.join(targetScope, sn);
|
|
261
319
|
if (fs.existsSync(dest)) fs.rmSync(dest, { recursive: true, force: true });
|
|
262
320
|
fs.cpSync(src, dest, { recursive: true });
|
|
263
321
|
const hash = merkleHash(dest);
|
|
264
322
|
fs.writeFileSync(path.join(dest, ".skill-source.json"), JSON.stringify({ repo: `${org}/${repo}`, skill: sn, ref: ref || null, checksum: hash, installedAt: new Date().toISOString() }, null, 2));
|
|
265
|
-
|
|
323
|
+
step(`Installed: ${c.bold(sn)}`, S.check, "green");
|
|
266
324
|
}
|
|
267
325
|
fs.rmSync(tmp, { recursive: true, force: true });
|
|
268
326
|
stepLine(); console.log(` ${c.cyan("Done!")}`); console.log();
|
|
@@ -310,7 +368,7 @@ function runLock() {
|
|
|
310
368
|
const m = JSON.parse(fs.readFileSync(mf, "utf-8"));
|
|
311
369
|
skills[name] = { repo: m.repo, skill: m.skill, ref: m.ref, checksum: `sha256:${m.checksum}`, publisher: m.publisher || null };
|
|
312
370
|
}
|
|
313
|
-
const lock = { lockVersion: 1, generatedAt: new Date().toISOString(), generator: `
|
|
371
|
+
const lock = { lockVersion: 1, generatedAt: new Date().toISOString(), generator: `install-agent-skill@${pkg.version}`, skills };
|
|
314
372
|
if (DRY) { step("Would generate skill-lock.json", S.diamond); outputJSON(lock); return; }
|
|
315
373
|
fs.mkdirSync(path.join(cwd, ".agent"), { recursive: true });
|
|
316
374
|
fs.writeFileSync(path.join(cwd, ".agent", "skill-lock.json"), JSON.stringify(lock, null, 2));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "install-agent-skill",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "Enterprise-grade Agent Skill Manager with Antigravity Skills support, Progressive Disclosure detection, and semantic routing validation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "DataGuruIn <contact@dataguruin.com>",
|