add-skill-kit 1.0.3 → 1.3.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.
package/README.md CHANGED
@@ -1,194 +1,204 @@
1
- <p align="center">
2
- <img src="https://raw.githubusercontent.com/agentskillkit/add-skill-kit/main/.github/logo.svg" height="128">
3
- <h1 align="center">add-skill-kit</h1>
4
- </p>
5
-
6
- <p align="center">
7
- <a href="https://www.npmjs.com/package/add-skill-kit"><img src="https://img.shields.io/npm/v/add-skill-kit?style=flat&colorA=18181b&colorB=7c3aed" alt="npm version"></a>
8
- <a href="https://www.npmjs.com/package/add-skill-kit"><img src="https://img.shields.io/npm/d18m/add-skill-kit?style=flat&colorA=18181b&colorB=7c3aed" alt="npm downloads"></a>
9
- <a href="https://github.com/agentskillkit/add-skill-kit/blob/main/LICENSE"><img src="https://img.shields.io/github/license/agentskillkit/add-skill-kit?style=flat&colorA=18181b&colorB=7c3aed" alt="license"></a>
10
- </p>
11
-
12
- <p align="center">
13
- The enterprise-grade package manager for AI Agent Skills.<br/>
14
- Designed for the <strong>Antigravity Skills</strong> specification.
15
- </p>
16
-
17
- <p align="center">
18
- <a href="#installation">Installation</a> •
19
- <a href="#quick-start">Quick Start</a> •
20
- <a href="#commands">Commands</a> •
21
- <a href="#features">Features</a> •
22
- <a href="#documentation">Docs</a>
23
- </p>
1
+ # add-skill-kit
24
2
 
25
- ---
3
+ > **The package manager for AI Agent Skills**
4
+
5
+ [![npm](https://img.shields.io/npm/v/add-skill-kit?style=flat&colorA=18181b&colorB=7c3aed)](https://www.npmjs.com/package/add-skill-kit)
6
+ [![downloads](https://img.shields.io/npm/dm/add-skill-kit?style=flat&colorA=18181b&colorB=7c3aed)](https://www.npmjs.com/package/add-skill-kit)
7
+ [![license](https://img.shields.io/github/license/agentskillkit/add-skill-kit?style=flat&colorA=18181b&colorB=7c3aed)](https://github.com/agentskillkit/add-skill-kit/blob/main/LICENSE)
26
8
 
27
- ## What is add-skill-kit?
9
+ ---
28
10
 
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.
11
+ ## Quick Install
30
12
 
31
13
  ```bash
32
14
  npx -y add-skill-kit agentskillkit/agent-skills
33
15
  ```
34
16
 
35
- Skills are **data, not code**. They won't execute on your system—they're read by your agent to enhance its behavior.
36
-
37
- ---
38
-
39
- ## Installation
17
+ Or install globally:
40
18
 
41
19
  ```bash
42
- # Using npm
43
20
  npm install -g add-skill-kit
21
+ add-skill-kit agentskillkit/agent-skills
22
+ ```
44
23
 
45
- # Using pnpm
46
- pnpm add -g add-skill-kit
24
+ This installs the `.agent` folder containing all templates into your project.
47
25
 
48
- # Using Yarn
49
- yarn global add add-skill-kit
26
+ ---
50
27
 
51
- # Or run directly with npx (use -y to skip install prompt)
52
- npx -y add-skill-kit <command>
53
- ```
28
+ ## What's Included
54
29
 
55
- > **Requirements:** Node.js 18.0.0 or later
30
+ | Component | Count | Description |
31
+ |-----------|-------|-------------|
32
+ | **Agents** | 20 | Specialist AI personas (frontend, backend, security, PM, QA, etc.) |
33
+ | **Skills** | 40+ | Domain-specific knowledge modules |
34
+ | **Workflows** | 11 | Slash command procedures |
56
35
 
57
36
  ---
58
37
 
59
- ## Quick Start
38
+ ## Usage
60
39
 
61
- ### 1. Initialize your workspace
40
+ ### Using Agents
41
+
42
+ **No need to mention agents explicitly!** The system automatically detects and applies the right specialist(s):
62
43
 
63
- ```bash
64
- npx -y add-skill-kit init
65
44
  ```
45
+ You: "Add JWT authentication"
46
+ AI: 🤖 Applying @security-auditor + @backend-specialist...
66
47
 
67
- This creates the `.agent/skills` directory structure in your project.
48
+ You: "Fix the dark mode button"
49
+ AI: 🤖 Using @frontend-specialist...
68
50
 
69
- ### 2. Install a skill
51
+ You: "Login returns 500 error"
52
+ AI: 🤖 Using @debugger for systematic analysis...
53
+ ```
70
54
 
71
- Install from GitHub with optional version pinning:
55
+ **How it works:**
56
+ 1. Analyzes your request silently
57
+ 2. Detects domain(s) automatically (frontend, backend, security, etc.)
58
+ 3. Selects the best specialist(s)
59
+ 4. Informs you which expertise is being applied
72
60
 
73
- ```bash
74
- # Latest version
75
- npx -y add-skill-kit agentskillkit/agent-skills
61
+ **Benefits:**
62
+ - Zero learning curve - just describe what you need
63
+ - Always get expert responses
64
+ - ✅ Transparent - shows which agent is being used
65
+ - ✅ Can still override by mentioning agent explicitly
76
66
 
77
- # Specific skill
78
- npx -y add-skill-kit agentskillkit/agent-skills#react-patterns
67
+ ---
79
68
 
80
- # Specific version
81
- npx -y add-skill-kit agentskillkit/agent-skills#react-patterns@v1.0.0
82
- ```
69
+ ### Using Workflows
83
70
 
84
- ### 3. List installed skills
71
+ Invoke workflows with slash commands:
85
72
 
86
- ```bash
87
- npx -y add-skill-kit list
73
+ | Command | Description |
74
+ |---------|-------------|
75
+ | `/brainstorm` | Explore options before implementation |
76
+ | `/create` | Create new features or apps |
77
+ | `/debug` | Systematic debugging |
78
+ | `/deploy` | Deploy application |
79
+ | `/enhance` | Improve existing code |
80
+ | `/orchestrate` | Multi-agent coordination |
81
+ | `/plan` | Create task breakdown |
82
+ | `/preview` | Preview changes locally |
83
+ | `/status` | Check project status |
84
+ | `/test` | Generate and run tests |
85
+ | `/ui-ux-pro-max` | Design with 50 styles |
86
+
87
+ **Example:**
88
88
  ```
89
-
90
- ### 4. Validate compliance
91
-
92
- ```bash
93
- npx -y add-skill-kit validate
89
+ /brainstorm authentication system
90
+ /create landing page with hero section
91
+ /debug why login fails
94
92
  ```
95
93
 
96
94
  ---
97
95
 
98
- ## Commands
96
+ ### Using Skills
99
97
 
100
- | Command | Description |
101
- | :--- | :--- |
102
- | `init` | Initialize `.agent/skills` workspace |
103
- | `install <spec>` | Install a skill from GitHub or registry |
104
- | `uninstall <name>` | Remove an installed skill |
105
- | `update <name>` | Update a skill to latest version |
106
- | `upgrade-all` | Upgrade all skills in workspace |
107
- | `list` | List installed skills with metadata |
108
- | `validate` | Check Antigravity compliance |
109
- | `analyze <name>` | Inspect skill structure & Progressive Disclosure |
110
- | `doctor` | Check health & integrity |
111
- | `lock` | Generate `skill-lock.json` |
112
- | `cache clear` | Clear local cache |
98
+ Skills are loaded automatically based on task context:
99
+
100
+ | Skill | Description |
101
+ |-------|-------------|
102
+ | `react-patterns` | Modern React hooks & composition |
103
+ | `api-patterns` | REST, GraphQL, tRPC design |
104
+ | `testing-patterns` | Unit, integration, E2E strategies |
105
+ | `clean-code` | Pragmatic coding standards |
106
+ | `systematic-debugging` | 4-phase debug methodology |
107
+ | `vulnerability-scanner` | OWASP security audit |
108
+ | ...and 30+ more | |
113
109
 
114
110
  ---
115
111
 
116
- ## Features
112
+ ## CLI Commands
117
113
 
118
- ### Progressive Disclosure
114
+ ```bash
115
+ # Install skills from repository
116
+ npx -y add-skill-kit <org/repo>
119
117
 
120
- Skills follow a structured hierarchy that lets agents read only what they need:
118
+ # Install specific skill
119
+ npx -y add-skill-kit <org/repo>#skill-name
121
120
 
122
- ```
123
- skill/
124
- ├── SKILL.md # Core instructions (always read)
125
- ├── resources/ # Reference materials (on-demand)
126
- ├── examples/ # Implementation patterns (when coding)
127
- ├── scripts/ # Helper utilities (when needed)
128
- ├── constitution/ # Governing rules
129
- └── doctrines/ # Behavioral policies
121
+ # List installed skills
122
+ npx -y add-skill-kit list
123
+
124
+ # Validate skill integrity
125
+ npx -y add-skill-kit validate
126
+
127
+ # Check workspace health
128
+ npx -y add-skill-kit doctor
130
129
  ```
131
130
 
132
- ### Deterministic Locking
131
+ ---
133
132
 
134
- Pin exact versions for reproducible builds across your team:
133
+ ## How It Works
135
134
 
136
- ```bash
137
- # Generate lockfile
138
- npx -y add-skill-kit lock
135
+ Skills are **data, not code**. They never execute on your system.
139
136
 
140
- # Install from lockfile
141
- npx -y add-skill-kit install --locked
142
137
  ```
138
+ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
139
+ │ GitHub Repo │────▶│ add-skill-kit │────▶│ .agent/skills │
140
+ │ (source) │ │ (installer) │ │ (your project) │
141
+ └─────────────────┘ └─────────────────┘ └─────────────────┘
142
+
143
+
144
+ ┌─────────────────┐
145
+ │ AI Agent │
146
+ │ reads skills │
147
+ └─────────────────┘
148
+ ```
149
+
150
+ **Security:**
151
+ - ✅ Skills are read-only markdown & YAML
152
+ - ✅ No scripts executed during install
153
+ - ✅ SHA-256 integrity verification
154
+ - ✅ Full audit trail in `.skill-source.json`
155
+
156
+ ---
143
157
 
144
- ### Security by Design
158
+ ## Project Structure After Install
145
159
 
146
- | Feature | Description |
147
- | :--- | :--- |
148
- | **No Execution** | Skills are data artifacts, never executed |
149
- | **SHA-256 Hashing** | Every skill is verified against its Merkle hash |
150
- | **Integrity Checks** | `doctor` command detects tampering |
151
- | **Audit Trail** | Full provenance tracking in `.skill-source.json` |
160
+ ```
161
+ your-project/
162
+ └── .agent/
163
+ ├── skills/ # 40+ domain skills
164
+ │ ├── react-patterns/
165
+ │ ├── api-patterns/
166
+ │ ├── testing-patterns/
167
+ │ └── ...
168
+ ├── workflows/ # Slash commands
169
+ │ ├── brainstorm.md
170
+ │ ├── debug.md
171
+ │ └── ...
172
+ └── GEMINI.md # Agent configuration
173
+ ```
152
174
 
153
175
  ---
154
176
 
155
- ## Documentation
177
+ ## Supported Agents
156
178
 
157
- <table>
158
- <tbody>
159
- <tr>
160
- <td><a href="https://github.com/agentskillkit/add-skill-kit/blob/main/specs/SKILL_V1.md">Skill Spec v1.0</a></td>
161
- <td>The Antigravity Skills specification</td>
162
- </tr>
163
- <tr>
164
- <td><a href="https://github.com/agentskillkit/add-skill-kit/tree/main/examples">Examples</a></td>
165
- <td>Example skills and integration patterns</td>
166
- </tr>
167
- <tr>
168
- <td><a href="https://github.com/agentskillkit/add-skill-kit/issues">Issues</a></td>
169
- <td>Report bugs or request features</td>
170
- </tr>
171
- </tbody>
172
- </table>
179
+ | Agent | Status |
180
+ |-------|--------|
181
+ | **Antigravity** | ✅ Ready |
182
+ | Claude Code | 🔜 Coming |
183
+ | Gemini CLI | 🔜 Coming |
184
+ | Codex | 🔜 Coming |
173
185
 
174
186
  ---
175
187
 
176
- ## Community
188
+ ## Requirements
189
+
190
+ - Node.js 18+
177
191
 
178
- We welcome contributions! See our [Contributing Guide](https://github.com/agentskillkit/add-skill-kit/blob/main/CONTRIBUTING.md) to get started.
192
+ ---
193
+
194
+ ## Documentation
179
195
 
180
- <a href="https://github.com/agentskillkit/add-skill-kit/graphs/contributors">
181
- <img src="https://contrib.rocks/image?repo=agentskillkit/add-skill-kit" />
182
- </a>
196
+ - [GitHub Repository](https://github.com/agentskillkit/add-skill-kit)
197
+ - [Issues & Feature Requests](https://github.com/agentskillkit/add-skill-kit/issues)
198
+ - [npm Package](https://www.npmjs.com/package/add-skill-kit)
183
199
 
184
200
  ---
185
201
 
186
- <p align="center">
187
- <sub>Built with ❤️ by <a href="https://github.com/agentskillkit">Agent Skill Kit</a></sub>
188
- </p>
202
+ ## License
189
203
 
190
- <p align="center">
191
- <a href="https://github.com/agentskillkit/add-skill-kit">GitHub</a> •
192
- <a href="https://www.npmjs.com/package/add-skill-kit">npm</a> •
193
- <a href="https://github.com/agentskillkit/add-skill-kit/blob/main/LICENSE">License</a>
194
- </p>
204
+ MIT © [Agent Skill Kit](https://github.com/agentskillkit)
@@ -12,7 +12,7 @@ import boxen from "boxen";
12
12
  import { parseSkillSpec, merkleHash } from "../helpers.js";
13
13
  import { parseSkillMdFrontmatter } from "../skills.js";
14
14
  import { step, activeStep, stepLine, S, c, fatal, spinner, multiselect, select, confirm, isCancel, cancel } from "../ui.js";
15
- import { WORKSPACE, GLOBAL_DIR } from "../config.js";
15
+ import { WORKSPACE, GLOBAL_DIR, OFFLINE } from "../config.js";
16
16
  import { installSkill } from "../installer.js";
17
17
 
18
18
  /**
@@ -32,6 +32,15 @@ export async function run(spec) {
32
32
  return;
33
33
  }
34
34
 
35
+ // Check offline mode
36
+ if (OFFLINE) {
37
+ stepLine();
38
+ step(c.yellow("Offline mode enabled"), S.diamond, "yellow");
39
+ step(c.dim("Cannot install from remote repository in offline mode"), S.branch, "gray");
40
+ step(c.dim("Use --locked to install from lockfile instead"), S.branch, "gray");
41
+ return;
42
+ }
43
+
35
44
  const url = `https://github.com/${org}/${repo}.git`;
36
45
 
37
46
  stepLine();
@@ -42,11 +51,50 @@ export async function run(spec) {
42
51
 
43
52
  const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "add-skill-"));
44
53
 
45
- try {
46
- await execAsync(`git clone --depth=1 ${url} "${tmp}"`);
47
- if (ref) await execAsync(`git -C "${tmp}" checkout ${ref}`);
48
- } catch {
49
- s.fail("Failed to clone");
54
+ // Retry logic with exponential backoff
55
+ const MAX_RETRIES = 3;
56
+ let lastError = null;
57
+
58
+ for (let attempt = 1; attempt <= MAX_RETRIES; attempt++) {
59
+ try {
60
+ await execAsync(`git clone --depth=1 ${url} "${tmp}"`, { timeout: 60000 });
61
+ if (ref) await execAsync(`git -C "${tmp}" checkout ${ref}`, { timeout: 30000 });
62
+ lastError = null;
63
+ break;
64
+ } catch (err) {
65
+ lastError = err;
66
+
67
+ if (attempt < MAX_RETRIES) {
68
+ const delay = Math.pow(2, attempt) * 1000; // 2s, 4s
69
+ s.message(`Retry ${attempt}/${MAX_RETRIES} in ${delay / 1000}s...`);
70
+ await new Promise(r => setTimeout(r, delay));
71
+
72
+ // Clean up failed attempt
73
+ try { fs.rmSync(tmp, { recursive: true, force: true }); } catch { }
74
+ fs.mkdirSync(tmp, { recursive: true });
75
+ }
76
+ }
77
+ }
78
+
79
+ if (lastError) {
80
+ s.fail("Failed to clone repository");
81
+ stepLine();
82
+
83
+ // Provide helpful error messages
84
+ const errMsg = lastError.message || "";
85
+ if (errMsg.includes("not found") || errMsg.includes("404")) {
86
+ step(c.red(`Repository not found: ${org}/${repo}`), S.cross, "red");
87
+ step(c.dim("Check if the repository exists and is public"), S.branch, "gray");
88
+ } else if (errMsg.includes("timeout")) {
89
+ step(c.red("Connection timeout"), S.cross, "red");
90
+ step(c.dim("Check your internet connection and try again"), S.branch, "gray");
91
+ } else if (errMsg.includes("Could not resolve")) {
92
+ step(c.red("Network error: Unable to reach GitHub"), S.cross, "red");
93
+ step(c.dim("Check your internet connection"), S.branch, "gray");
94
+ } else {
95
+ step(c.red("Clone failed: " + errMsg.split("\n")[0]), S.cross, "red");
96
+ }
97
+
50
98
  fs.rmSync(tmp, { recursive: true, force: true });
51
99
  return;
52
100
  }
package/bin/lib/config.js CHANGED
@@ -8,11 +8,11 @@ import os from "os";
8
8
  /** Current working directory */
9
9
  export const cwd = process.cwd();
10
10
 
11
- /** Local workspace skills directory */
12
- export const WORKSPACE = path.join(cwd, ".agent", "skills");
11
+ /** Local workspace skills directory (configurable via ADD_SKILL_WORKSPACE) */
12
+ export const WORKSPACE = process.env.ADD_SKILL_WORKSPACE || path.join(cwd, ".agent", "skills");
13
13
 
14
- /** Global skills directory */
15
- export const GLOBAL_DIR = path.join(os.homedir(), ".gemini", "antigravity", "skills");
14
+ /** Global skills directory (configurable via ADD_SKILL_GLOBAL_DIR) */
15
+ export const GLOBAL_DIR = process.env.ADD_SKILL_GLOBAL_DIR || path.join(os.homedir(), ".gemini", "antigravity", "skills");
16
16
 
17
17
  /** Cache root directory */
18
18
  export const CACHE_ROOT = process.env.ADD_SKILL_CACHE_DIR || path.join(os.homedir(), ".cache", "agentskillskit");
@@ -41,31 +41,28 @@ export const params = args.filter((a) => !a.startsWith("--")).slice(1);
41
41
 
42
42
  // --- Flag Shortcuts ---
43
43
 
44
- /** Use global scope */
44
+ /** @type {boolean} Use global scope */
45
45
  export const GLOBAL = flags.has("--global") || flags.has("-g");
46
46
 
47
- /** Verbose output */
47
+ /** @type {boolean} Verbose output */
48
48
  export const VERBOSE = flags.has("--verbose") || flags.has("-v");
49
49
 
50
- /** JSON output mode */
50
+ /** @type {boolean} JSON output mode */
51
51
  export const JSON_OUTPUT = flags.has("--json");
52
52
 
53
- /** Force operation */
53
+ /** @type {boolean} Force operation */
54
54
  export const FORCE = flags.has("--force") || flags.has("-f");
55
55
 
56
- /** Dry run mode */
56
+ /** @type {boolean} Dry run mode */
57
57
  export const DRY = flags.has("--dry-run");
58
58
 
59
- /** Strict mode */
59
+ /** @type {boolean} Strict mode */
60
60
  export const STRICT = flags.has("--strict");
61
61
 
62
- /** Auto-fix mode */
63
- export const FIX = flags.has("--fix");
64
-
65
- /** Locked mode */
62
+ /** @type {boolean} Locked mode (install from lockfile) */
66
63
  export const LOCKED = flags.has("--locked");
67
64
 
68
- /** Offline mode */
65
+ /** @type {boolean} Offline mode (skip network operations) */
69
66
  export const OFFLINE = flags.has("--offline");
70
67
 
71
68
  // --- Package Info ---
@@ -73,8 +70,9 @@ export const OFFLINE = flags.has("--offline");
73
70
  import { createRequire } from "module";
74
71
  const require = createRequire(import.meta.url);
75
72
 
76
- /** Package version */
73
+ /** @type {string} Package version */
77
74
  export const VERSION = (() => {
78
75
  try { return require("../../package.json").version; }
79
- catch { return "5.0.0"; }
76
+ catch { return "1.2.0"; }
80
77
  })();
78
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "add-skill-kit",
3
- "version": "1.0.3",
3
+ "version": "1.3.0",
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>",