@vegastack/skills 0.3.0 → 0.5.0

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.
Files changed (3) hide show
  1. package/README.md +3 -1
  2. package/dist/index.js +30 -10
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -36,6 +36,8 @@ npx @vegastack/skills add arch-guardian
36
36
  | `--force` | Overwrite a modified installed copy |
37
37
  | `--non-interactive` | Skip prompts and use defaults: `--agent both`, project-local (for automation) |
38
38
 
39
+ Agent targeting is automatic: the CLI detects which agents you have (`~/.claude`, `~/.codex`/`~/.agents`, `~/.hermes`) and targets them without asking — `--agent` overrides. A numbered picker appears only when nothing is detected. Installs are project-local by default; pass `--global` for the home directory (required for Hermes).
40
+
39
41
  ## Agent surfaces
40
42
 
41
43
  | Agent | Project install | Global install |
@@ -56,7 +58,7 @@ Zero telemetry. The only network call in the tool is `doctor`'s single version c
56
58
 
57
59
  ## Requirements
58
60
 
59
- - Node >= 20.11
61
+ - Node >= 24
60
62
  - macOS or Linux. Windows is not yet supported (path handling; tracked in the repo issues).
61
63
 
62
64
  ## Docs
package/dist/index.js CHANGED
@@ -77,20 +77,40 @@ async function requireSkill(options) {
77
77
  throw new Error(`Unknown skill: ${options.skill}. Bundled skills: ${skills.join(", ")}`);
78
78
  return options.skill;
79
79
  }
80
+ var agentLabels = { claude: "Claude Code", codex: "Codex", hermes: "Hermes" };
81
+ async function detectAgents() {
82
+ const detected = [];
83
+ if (await exists(join(homedir(), ".claude")))
84
+ detected.push("claude");
85
+ if (await exists(join(homedir(), ".codex")) || await exists(join(homedir(), ".agents")))
86
+ detected.push("codex");
87
+ if (await exists(join(homedir(), ".hermes")))
88
+ detected.push("hermes");
89
+ return detected;
90
+ }
80
91
  async function prompt(options) {
81
- if (options.agent && options.mode)
82
- return { agent: options.agent, mode: options.mode };
83
- if (options.nonInteractive || !process.stdin.isTTY) {
84
- return { agent: options.agent ?? "both", mode: options.mode ?? "project" };
92
+ const mode = options.mode ?? "project";
93
+ if (options.agent)
94
+ return { agent: options.agent, mode };
95
+ if (options.nonInteractive || !process.stdin.isTTY)
96
+ return { agent: "both", mode };
97
+ const detected = (await detectAgents()).filter((agent2) => mode === "global" || agent2 !== "hermes");
98
+ if (detected.length) {
99
+ console.log(`Detected: ${detected.map((agent2) => agentLabels[agent2]).join(", ")} (override with --agent)`);
100
+ if (detected.length === 1)
101
+ return { agent: detected[0], mode };
102
+ return { agent: detected.includes("hermes") ? "all" : "both", mode };
85
103
  }
104
+ console.log("Where should this skill be installed?");
105
+ console.log(" 1) Claude Code (.claude/skills)");
106
+ console.log(" 2) Codex (.agents/skills)");
107
+ console.log(" 3) Both (recommended)");
86
108
  const rl = createInterface({ input: process.stdin, output: process.stdout });
87
- const agentAnswer = options.agent ?? await rl.question("Install for codex, claude, hermes, both (codex+claude), or all? [both] ");
88
- const modeAnswer = options.mode ?? await rl.question("Install project-local or user-global? [project] ");
109
+ const answer = (await rl.question("Select 1-3 [3]: ")).trim();
89
110
  rl.close();
90
- const agent = agentAnswer || "both";
91
- const mode = modeAnswer === "global" ? "global" : "project";
92
- if (!["codex", "claude", "hermes", "both", "all"].includes(agent))
93
- throw new Error(`Invalid agent choice: ${agent}`);
111
+ const agent = { "1": "claude", "2": "codex", "3": "both", "": "both" }[answer];
112
+ if (!agent)
113
+ throw new Error(`Invalid selection: ${answer} (expected 1, 2, or 3)`);
94
114
  return { agent, mode };
95
115
  }
96
116
  function resolveAgents(choice, mode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vegastack/skills",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Installer and verifier for VegaStack Agent Skills (Claude Code, Codex, and Hermes)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -32,7 +32,7 @@
32
32
  "LICENSE"
33
33
  ],
34
34
  "engines": {
35
- "node": ">=20.11"
35
+ "node": ">=24"
36
36
  },
37
37
  "scripts": {
38
38
  "sync": "bun scripts/sync-skill.mjs",