install-agent-skill 1.2.6 → 1.2.7

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.
@@ -12,7 +12,7 @@ import crypto from "crypto";
12
12
  import prompts from "prompts";
13
13
  import { multiselect, isCancel, cancel, intro, outro, select, confirm, log, spinner } from "@clack/prompts";
14
14
  import kleur from "kleur";
15
- import ora from "ora";
15
+
16
16
  import boxen from "boxen";
17
17
  import { createRequire } from "module";
18
18
 
@@ -297,7 +297,7 @@ async function runInstall(spec) {
297
297
 
298
298
  // Use @clack/prompts for multiselect
299
299
  const skillsR = await multiselect({
300
- message: 'Select skills to install',
300
+ message: 'Select skills to install (Press Space to select, Enter to continue)',
301
301
  options: skillsInRepo.map(s => ({
302
302
  label: s.title,
303
303
  value: s.value,
@@ -321,22 +321,35 @@ async function runInstall(spec) {
321
321
  return;
322
322
  }
323
323
 
324
- const scopeR = await select({
325
- message: 'Installation scope',
324
+ // Agent selection
325
+ stepLine();
326
+ step("Detected 5 agents", S.diamond);
327
+
328
+ const agentsR = await multiselect({
329
+ message: 'Select agents to install skills to',
326
330
  options: [
327
- { label: 'Project (current directory)', value: 'project' },
328
- { label: 'Global', value: 'global' }
331
+ { label: 'Antigravity (.agent/skills)', value: 'antigravity', selected: true },
332
+ { label: c.dim('Claude Code'), value: 'claude', hint: c.dim('(not supported)') },
333
+ { label: c.dim('Codex'), value: 'codex', hint: c.dim('(not supported)') },
334
+ { label: c.dim('Gemini CLI'), value: 'gemini', hint: c.dim('(not supported)') },
335
+ { label: c.dim('Windsurf'), value: 'windsurf', hint: c.dim('(not supported)') }
329
336
  ],
330
- initialValue: 'project'
337
+ required: true
331
338
  });
332
339
 
333
- if (isCancel(scopeR)) {
340
+ if (isCancel(agentsR)) {
334
341
  cancel('Operation cancelled.');
335
342
  fs.rmSync(tmp, { recursive: true, force: true });
336
343
  return;
337
344
  }
338
345
 
339
- const targetScope = scopeR === "global" ? GLOBAL_DIR : WORKSPACE;
346
+ const selectedAgents = agentsR;
347
+ if (selectedAgents.includes('antigravity') === false) {
348
+ log.warn("Antigravity is currently the only supported agent. Selecting it automatically.");
349
+ }
350
+
351
+ // For now, we only support Antigravity, effectively just checking if we continue
352
+ const targetScope = WORKSPACE;
340
353
 
341
354
  log.info("Installing skills...");
342
355
  fs.mkdirSync(targetScope, { recursive: true });
@@ -385,12 +398,13 @@ async function runUpdate(skillName) {
385
398
  const meta = JSON.parse(fs.readFileSync(metaFile, "utf-8"));
386
399
  if (!meta.repo || meta.repo === "local") fatal("Cannot update local skill");
387
400
  stepLine();
388
- const spinner = ora({ text: `Updating ${skillName}`, prefixText: ` ${c.gray(S.branch)} ${c.cyan(S.diamondFilled)} `, color: "cyan" }).start();
401
+ const s = spinner();
402
+ s.start(`Updating ${skillName}`);
389
403
  try {
390
404
  if (!DRY) { createBackup(targetDir, skillName); fs.rmSync(targetDir, { recursive: true, force: true }); }
391
405
  const spec = `${meta.repo}#${meta.skill}${meta.ref ? "@" + meta.ref : ""}`;
392
- if (DRY) { spinner.stop(); step(`Would update: ${skillName}`, S.diamond); } else { await runInstall(spec); }
393
- } catch (err) { spinner.stop(); step(`Failed: ${err.message}`, S.cross, "red"); }
406
+ if (DRY) { s.stop(); step(`Would update: ${skillName}`, S.diamond); } else { await runInstall(spec); s.stop(); }
407
+ } catch (err) { s.stop(`Failed: ${err.message}`, 1); step(`Failed: ${err.message}`, S.cross, "red"); }
394
408
  }
395
409
 
396
410
  function runLock() {
@@ -7,11 +7,11 @@ import path from "path";
7
7
  import os from "os";
8
8
  import { execSync } from "child_process";
9
9
  import prompts from "prompts";
10
- import ora from "ora";
10
+
11
11
  import boxen from "boxen";
12
12
  import { parseSkillSpec, merkleHash } from "../helpers.js";
13
13
  import { parseSkillMdFrontmatter } from "../skills.js";
14
- import { step, stepLine, S, c, fatal } from "../ui.js";
14
+ import { step, stepLine, S, c, fatal, spinner } from "../ui.js";
15
15
  import { WORKSPACE, GLOBAL_DIR } from "../config.js";
16
16
 
17
17
  /**
@@ -36,11 +36,8 @@ export async function run(spec) {
36
36
  stepLine();
37
37
  step("Source: " + c.cyan(url), S.diamond);
38
38
 
39
- const spinner = ora({
40
- text: "Cloning repository",
41
- prefixText: ` ${c.gray(S.branch)} ${c.cyan(S.diamondFilled)} `,
42
- color: "cyan"
43
- }).start();
39
+ const s = spinner();
40
+ s.start("Cloning repository");
44
41
 
45
42
  const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "add-skill-"));
46
43
 
@@ -48,14 +45,13 @@ export async function run(spec) {
48
45
  execSync(`git clone --depth=1 ${url} "${tmp}"`, { stdio: "pipe" });
49
46
  if (ref) execSync(`git -C "${tmp}" checkout ${ref}`, { stdio: "pipe" });
50
47
  } catch {
51
- spinner.stop();
48
+ s.stop("Failed to clone");
52
49
  step(c.red("Failed to clone"), S.cross, "red");
53
50
  fs.rmSync(tmp, { recursive: true, force: true });
54
51
  return;
55
52
  }
56
53
 
57
- spinner.stop();
58
- step("Repository cloned", S.check, "green");
54
+ s.stop("Repository cloned");
59
55
 
60
56
  // Find skills in repo
61
57
  const skillsInRepo = [];
@@ -109,7 +105,7 @@ export async function run(spec) {
109
105
  value: s.value,
110
106
  selected: true // Pre-select all by default
111
107
  })),
112
- hint: "- Space to toggle. Return to submit",
108
+ hint: "- Press Space to select, Enter to continue",
113
109
  instructions: false
114
110
  });
115
111
 
@@ -122,20 +118,32 @@ export async function run(spec) {
122
118
  selectedSkills = skillsR.skills;
123
119
  }
124
120
 
125
- // Scope selection
121
+ // Agent selection
126
122
  stepLine();
127
- const scopeR = await prompts({
128
- type: "select",
129
- name: "scope",
130
- message: "Installation scope",
123
+ step("Detected 5 agents", S.diamond);
124
+
125
+ const agentsR = await prompts({
126
+ type: "multiselect",
127
+ name: "agents",
128
+ message: "Select agents to install skills to",
131
129
  choices: [
132
- { title: "Project (current directory)", value: "project" },
133
- { title: "Global", value: "global" }
130
+ { title: "Antigravity (.agent/skills)", value: "antigravity", selected: true },
131
+ { title: c.dim("Claude Code"), value: "claude", disabled: true },
132
+ { title: c.dim("Codex"), value: "codex", disabled: true },
133
+ { title: c.dim("Gemini CLI"), value: "gemini", disabled: true },
134
+ { title: c.dim("Windsurf"), value: "windsurf", disabled: true }
134
135
  ],
135
- initial: 0
136
+ hint: "- Space to toggle. Enter to submit",
137
+ instructions: false
136
138
  });
137
139
 
138
- const targetScope = scopeR.scope === "global" ? GLOBAL_DIR : WORKSPACE;
140
+ if (!agentsR.agents || agentsR.agents.length === 0) {
141
+ console.log(`\n ${c.yellow("No agents selected.")}`);
142
+ fs.rmSync(tmp, { recursive: true, force: true });
143
+ return;
144
+ }
145
+
146
+ const targetScope = WORKSPACE;
139
147
 
140
148
  // Summary
141
149
  stepLine();
@@ -4,9 +4,9 @@
4
4
 
5
5
  import fs from "fs";
6
6
  import path from "path";
7
- import ora from "ora";
7
+
8
8
  import { resolveScope, createBackup } from "../helpers.js";
9
- import { step, stepLine, S, c, fatal } from "../ui.js";
9
+ import { step, stepLine, S, c, fatal, spinner } from "../ui.js";
10
10
  import { DRY } from "../config.js";
11
11
 
12
12
  /**
@@ -29,11 +29,8 @@ export async function run(skillName) {
29
29
 
30
30
  stepLine();
31
31
 
32
- const spinner = ora({
33
- text: `Updating ${skillName}`,
34
- prefixText: ` ${c.gray(S.branch)} ${c.cyan(S.diamondFilled)} `,
35
- color: "cyan"
36
- }).start();
32
+ const s = spinner();
33
+ s.start(`Updating ${skillName}`);
37
34
 
38
35
  try {
39
36
  if (!DRY) {
@@ -44,15 +41,15 @@ export async function run(skillName) {
44
41
  const spec = `${meta.repo}#${meta.skill}${meta.ref ? "@" + meta.ref : ""}`;
45
42
 
46
43
  if (DRY) {
47
- spinner.stop();
44
+ s.stop();
48
45
  step(`Would update: ${skillName}`);
49
46
  } else {
50
47
  // Dynamically import install command
51
48
  const { run: install } = await import("./install.js");
52
49
  await install(spec);
50
+ s.stop();
53
51
  }
54
52
  } catch (err) {
55
- spinner.stop();
56
- step(`Failed: ${err.message}`, S.cross, "red");
53
+ s.stop(`Failed: ${err.message}`);
57
54
  }
58
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "install-agent-skill",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
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>",