add-skill-kit 1.0.0 → 1.0.1

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 CHANGED
@@ -29,7 +29,7 @@
29
29
  `add-skill-kit` 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 add-skill-kit agentskillkit/agent-skills
32
+ npx -y add-skill-kit agentskillkit/agent-skills
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.
@@ -48,8 +48,8 @@ pnpm add -g add-skill-kit
48
48
  # Using Yarn
49
49
  yarn global add add-skill-kit
50
50
 
51
- # Or run directly with npx
52
- npx add-skill-kit <command>
51
+ # Or run directly with npx (use -y to skip install prompt)
52
+ npx -y add-skill-kit <command>
53
53
  ```
54
54
 
55
55
  > **Requirements:** Node.js 18.0.0 or later
@@ -61,7 +61,7 @@ npx add-skill-kit <command>
61
61
  ### 1. Initialize your workspace
62
62
 
63
63
  ```bash
64
- npx add-skill-kit init
64
+ npx -y add-skill-kit init
65
65
  ```
66
66
 
67
67
  This creates the `.agent/skills` directory structure in your project.
@@ -72,25 +72,25 @@ Install from GitHub with optional version pinning:
72
72
 
73
73
  ```bash
74
74
  # Latest version
75
- npx add-skill-kit agentskillkit/agent-skills
75
+ npx -y add-skill-kit agentskillkit/agent-skills
76
76
 
77
77
  # Specific skill
78
- npx add-skill-kit agentskillkit/agent-skills#react-patterns
78
+ npx -y add-skill-kit agentskillkit/agent-skills#react-patterns
79
79
 
80
80
  # Specific version
81
- npx add-skill-kit agentskillkit/agent-skills#react-patterns@v1.0.0
81
+ npx -y add-skill-kit agentskillkit/agent-skills#react-patterns@v1.0.0
82
82
  ```
83
83
 
84
84
  ### 3. List installed skills
85
85
 
86
86
  ```bash
87
- npx add-skill-kit list
87
+ npx -y add-skill-kit list
88
88
  ```
89
89
 
90
90
  ### 4. Validate compliance
91
91
 
92
92
  ```bash
93
- npx add-skill-kit validate
93
+ npx -y add-skill-kit validate
94
94
  ```
95
95
 
96
96
  ---
@@ -135,10 +135,10 @@ Pin exact versions for reproducible builds across your team:
135
135
 
136
136
  ```bash
137
137
  # Generate lockfile
138
- npx add-skill-kit lock
138
+ npx -y add-skill-kit lock
139
139
 
140
140
  # Install from lockfile
141
- npx add-skill-kit install --locked
141
+ npx -y add-skill-kit install --locked
142
142
  ```
143
143
 
144
144
  ### Security by Design
@@ -53,22 +53,50 @@ export async function run(spec) {
53
53
 
54
54
  s.stop("Repository cloned");
55
55
 
56
- // Find skills in repo
56
+ // Find skills in repo - check multiple possible locations
57
57
  const skillsInRepo = [];
58
- for (const e of fs.readdirSync(tmp)) {
59
- const sp = path.join(tmp, e);
60
- if (fs.statSync(sp).isDirectory() && fs.existsSync(path.join(sp, "SKILL.md"))) {
61
- const m = parseSkillMdFrontmatter(path.join(sp, "SKILL.md"));
62
- skillsInRepo.push({
63
- title: e + (m.description ? c.dim(` (${m.description.substring(0, 40)}...)`) : ""),
64
- value: e,
65
- selected: singleSkill ? e === singleSkill : true
66
- });
58
+
59
+ // Possible skill locations (in order of priority)
60
+ const possibleSkillDirs = [
61
+ path.join(tmp, ".agent", "skills"), // Standard location
62
+ path.join(tmp, "skills"), // Alternative location
63
+ tmp // Root level (legacy)
64
+ ];
65
+
66
+ let skillsDir = null;
67
+ for (const dir of possibleSkillDirs) {
68
+ if (fs.existsSync(dir) && fs.statSync(dir).isDirectory()) {
69
+ // Check if this directory contains skill folders
70
+ const entries = fs.readdirSync(dir);
71
+ for (const e of entries) {
72
+ const sp = path.join(dir, e);
73
+ if (fs.statSync(sp).isDirectory() && fs.existsSync(path.join(sp, "SKILL.md"))) {
74
+ skillsDir = dir;
75
+ break;
76
+ }
77
+ }
78
+ if (skillsDir) break;
79
+ }
80
+ }
81
+
82
+ if (skillsDir) {
83
+ for (const e of fs.readdirSync(skillsDir)) {
84
+ const sp = path.join(skillsDir, e);
85
+ if (fs.statSync(sp).isDirectory() && fs.existsSync(path.join(sp, "SKILL.md"))) {
86
+ const m = parseSkillMdFrontmatter(path.join(sp, "SKILL.md"));
87
+ skillsInRepo.push({
88
+ title: e + (m.description ? c.dim(` (${m.description.substring(0, 40)}...)`) : ""),
89
+ value: e,
90
+ selected: singleSkill ? e === singleSkill : true,
91
+ _path: sp // Store actual path for later use
92
+ });
93
+ }
67
94
  }
68
95
  }
69
96
 
70
97
  if (skillsInRepo.length === 0) {
71
98
  step(c.yellow("No valid skills found"), S.diamond, "yellow");
99
+ step(c.dim("Expected skills in .agent/skills/ or skills/ directory"), S.branch, "gray");
72
100
  fs.rmSync(tmp, { recursive: true, force: true });
73
101
  return;
74
102
  }
@@ -255,8 +283,11 @@ export async function run(spec) {
255
283
  stepLine();
256
284
  fs.mkdirSync(targetScope, { recursive: true });
257
285
 
286
+ // Create a map for skill paths
287
+ const skillPathMap = Object.fromEntries(skillsInRepo.map(s => [s.value, s._path]));
288
+
258
289
  for (const sn of selectedSkills) {
259
- const src = path.join(tmp, sn);
290
+ const src = skillPathMap[sn] || path.join(skillsDir || tmp, sn);
260
291
  const dest = path.join(targetScope, sn);
261
292
 
262
293
  await installSkill(src, dest, installMethod, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "add-skill-kit",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
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": "agentskillkit <agentskillkit@gmail.com>",