add-skill-kit 1.1.0 → 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 +146 -73
- package/bin/lib/commands/install.js +54 -6
- package/bin/lib/config.js +15 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,105 +1,175 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="https://raw.githubusercontent.com/agentskillkit/add-skill-kit/main/.github/logo.svg" height="96">
|
|
3
|
-
</p>
|
|
1
|
+
# add-skill-kit
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
> **The package manager for AI Agent Skills**
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<p align="center">
|
|
12
|
-
<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"></a>
|
|
13
|
-
<a href="https://www.npmjs.com/package/add-skill-kit"><img src="https://img.shields.io/npm/dm/add-skill-kit?style=flat&colorA=18181b&colorB=7c3aed" alt="downloads"></a>
|
|
14
|
-
<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>
|
|
15
|
-
</p>
|
|
16
|
-
|
|
17
|
-
<p align="center">
|
|
18
|
-
<a href="#install">Install</a> •
|
|
19
|
-
<a href="#why">Why?</a> •
|
|
20
|
-
<a href="#what-you-get">What You Get</a> •
|
|
21
|
-
<a href="#commands">Commands</a>
|
|
22
|
-
</p>
|
|
5
|
+
[](https://www.npmjs.com/package/add-skill-kit)
|
|
6
|
+
[](https://www.npmjs.com/package/add-skill-kit)
|
|
7
|
+
[](https://github.com/agentskillkit/add-skill-kit/blob/main/LICENSE)
|
|
23
8
|
|
|
24
9
|
---
|
|
25
10
|
|
|
26
|
-
## Install
|
|
11
|
+
## Quick Install
|
|
27
12
|
|
|
28
13
|
```bash
|
|
29
14
|
npx -y add-skill-kit agentskillkit/agent-skills
|
|
30
15
|
```
|
|
31
16
|
|
|
32
|
-
|
|
17
|
+
Or install globally:
|
|
33
18
|
|
|
34
|
-
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g add-skill-kit
|
|
21
|
+
add-skill-kit agentskillkit/agent-skills
|
|
22
|
+
```
|
|
35
23
|
|
|
36
|
-
|
|
24
|
+
This installs the `.agent` folder containing all templates into your project.
|
|
37
25
|
|
|
38
|
-
|
|
26
|
+
---
|
|
39
27
|
|
|
40
|
-
|
|
28
|
+
## What's Included
|
|
41
29
|
|
|
42
|
-
|
|
|
43
|
-
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
| Manual updates | `add-skill-kit update` |
|
|
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 |
|
|
48
35
|
|
|
49
36
|
---
|
|
50
37
|
|
|
51
|
-
##
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
### Using Agents
|
|
41
|
+
|
|
42
|
+
**No need to mention agents explicitly!** The system automatically detects and applies the right specialist(s):
|
|
52
43
|
|
|
53
44
|
```
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
└── GEMINI.md # Agent config
|
|
45
|
+
You: "Add JWT authentication"
|
|
46
|
+
AI: 🤖 Applying @security-auditor + @backend-specialist...
|
|
47
|
+
|
|
48
|
+
You: "Fix the dark mode button"
|
|
49
|
+
AI: 🤖 Using @frontend-specialist...
|
|
50
|
+
|
|
51
|
+
You: "Login returns 500 error"
|
|
52
|
+
AI: 🤖 Using @debugger for systematic analysis...
|
|
63
53
|
```
|
|
64
54
|
|
|
65
|
-
**
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- `vulnerability-scanner` — OWASP security
|
|
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
|
|
71
60
|
|
|
72
|
-
|
|
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
|
|
73
66
|
|
|
74
|
-
|
|
67
|
+
---
|
|
75
68
|
|
|
69
|
+
### Using Workflows
|
|
70
|
+
|
|
71
|
+
Invoke workflows with slash commands:
|
|
72
|
+
|
|
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:**
|
|
76
88
|
```
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
89
|
+
/brainstorm authentication system
|
|
90
|
+
/create landing page with hero section
|
|
91
|
+
/debug why login fails
|
|
80
92
|
```
|
|
81
93
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
### Using Skills
|
|
97
|
+
|
|
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 | |
|
|
86
109
|
|
|
87
110
|
---
|
|
88
111
|
|
|
89
|
-
## Commands
|
|
112
|
+
## CLI Commands
|
|
90
113
|
|
|
91
114
|
```bash
|
|
92
|
-
# Install from repository
|
|
115
|
+
# Install skills from repository
|
|
93
116
|
npx -y add-skill-kit <org/repo>
|
|
94
117
|
|
|
95
118
|
# Install specific skill
|
|
96
119
|
npx -y add-skill-kit <org/repo>#skill-name
|
|
97
120
|
|
|
98
|
-
# List installed
|
|
121
|
+
# List installed skills
|
|
99
122
|
npx -y add-skill-kit list
|
|
100
123
|
|
|
101
|
-
# Validate
|
|
124
|
+
# Validate skill integrity
|
|
102
125
|
npx -y add-skill-kit validate
|
|
126
|
+
|
|
127
|
+
# Check workspace health
|
|
128
|
+
npx -y add-skill-kit doctor
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## How It Works
|
|
134
|
+
|
|
135
|
+
Skills are **data, not code**. They never execute on your system.
|
|
136
|
+
|
|
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
|
+
---
|
|
157
|
+
|
|
158
|
+
## Project Structure After Install
|
|
159
|
+
|
|
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
|
|
103
173
|
```
|
|
104
174
|
|
|
105
175
|
---
|
|
@@ -111,21 +181,24 @@ npx -y add-skill-kit validate
|
|
|
111
181
|
| **Antigravity** | ✅ Ready |
|
|
112
182
|
| Claude Code | 🔜 Coming |
|
|
113
183
|
| Gemini CLI | 🔜 Coming |
|
|
184
|
+
| Codex | 🔜 Coming |
|
|
114
185
|
|
|
115
186
|
---
|
|
116
187
|
|
|
117
|
-
##
|
|
188
|
+
## Requirements
|
|
118
189
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
190
|
+
- Node.js 18+
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Documentation
|
|
195
|
+
|
|
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)
|
|
199
|
+
|
|
200
|
+
---
|
|
122
201
|
|
|
123
|
-
|
|
124
|
-
<sub>Built by <a href="https://github.com/agentskillkit">Agent Skill Kit</a></sub>
|
|
125
|
-
</p>
|
|
202
|
+
## License
|
|
126
203
|
|
|
127
|
-
|
|
128
|
-
<a href="https://github.com/agentskillkit/add-skill-kit">GitHub</a> •
|
|
129
|
-
<a href="https://www.npmjs.com/package/add-skill-kit">npm</a> •
|
|
130
|
-
<a href="https://github.com/agentskillkit/add-skill-kit/blob/main/LICENSE">MIT</a>
|
|
131
|
-
</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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
/**
|
|
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 "
|
|
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.
|
|
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>",
|