@aiconstructions/claude-kit 1.0.1 → 1.1.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 +78 -70
- package/THIRD_PARTY_NOTICES.md +32 -0
- package/package.json +51 -50
- package/src/generator.js +87 -81
- package/src/plugin-installer.js +102 -89
- package/src/prompts.js +124 -122
- package/templates/base/CLAUDE.md.ejs +236 -230
- package/templates/skills/gstack-deslop-shared-libs/SKILL.md +208 -0
- package/templates/skills/gstack-deslop-shared-libs/bin/safe-git +149 -0
- package/templates/skills/gstack-health/SKILL.md +356 -0
- package/templates/skills/gstack-test-audit/SKILL.md +171 -0
- package/templates/skills/handoff/SKILL.md +23 -0
- package/templates/skills/rodada-longa/SKILL.md +30 -0
- package/templates/skills/upstream/SKILL.md +23 -0
package/README.md
CHANGED
|
@@ -1,70 +1,78 @@
|
|
|
1
|
-
# @aiconstructions/claude-kit
|
|
2
|
-
|
|
3
|
-
Interactive CLI to scaffold a multi-agent Claude Code workspace for your project.
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npx @aiconstructions/claude-kit
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## What You Get
|
|
12
|
-
|
|
13
|
-
A fully configured Claude Code workspace with:
|
|
14
|
-
|
|
15
|
-
- **CLAUDE.md** — Master orchestration guide adapted to your stack
|
|
16
|
-
- **12 specialist agents** — manager, planner, backend, frontend, qa, security, analyzer, git, offline, cicd, asana, n8n (included based on your selections)
|
|
17
|
-
- **Shared context files** — API spec, infrastructure state, test reports
|
|
18
|
-
- **
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- Python +
|
|
35
|
-
-
|
|
36
|
-
- Node.js +
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
| [
|
|
66
|
-
| [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
1
|
+
# @aiconstructions/claude-kit
|
|
2
|
+
|
|
3
|
+
Interactive CLI to scaffold a multi-agent Claude Code workspace for your project.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @aiconstructions/claude-kit
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What You Get
|
|
12
|
+
|
|
13
|
+
A fully configured Claude Code workspace with:
|
|
14
|
+
|
|
15
|
+
- **CLAUDE.md** — Master orchestration guide adapted to your stack
|
|
16
|
+
- **12 specialist agents** — manager, planner, backend, frontend, qa, security, analyzer, git, offline, cicd, asana, n8n (included based on your selections)
|
|
17
|
+
- **Shared context files** — API spec, infrastructure state, test reports
|
|
18
|
+
- **Bundled skills** (`.claude/skills/`) — `gstack-health`, `gstack-test-audit`, `gstack-deslop-shared-libs` (adapted from [garrytan/gstack](https://github.com/garrytan/gstack), MIT) `handoff`, `rodada-longa` (autonomous multi-hour runs) and `upstream` (track upstream repos)
|
|
19
|
+
- **Plugin auto-install** — Superpowers, GSD, ui-ux-pro-max, claude-video (`/watch`)
|
|
20
|
+
|
|
21
|
+
## Supported Stacks
|
|
22
|
+
|
|
23
|
+
### Mobile
|
|
24
|
+
- Expo + React Native + NativeWind
|
|
25
|
+
- Flutter
|
|
26
|
+
|
|
27
|
+
### Web
|
|
28
|
+
- React + Vite + Tailwind CSS
|
|
29
|
+
- Next.js
|
|
30
|
+
- Nuxt.js
|
|
31
|
+
- Svelte
|
|
32
|
+
|
|
33
|
+
### Backend
|
|
34
|
+
- Python + FastAPI + SQLAlchemy
|
|
35
|
+
- Python + Django
|
|
36
|
+
- Node.js + Express
|
|
37
|
+
- Node.js + NestJS
|
|
38
|
+
|
|
39
|
+
### Integrations
|
|
40
|
+
- GitHub Actions (CI/CD)
|
|
41
|
+
- AWS (EC2, RDS, S3, CloudFront)
|
|
42
|
+
- Asana
|
|
43
|
+
- n8n
|
|
44
|
+
|
|
45
|
+
## Prerequisites
|
|
46
|
+
|
|
47
|
+
- Node.js >= 18
|
|
48
|
+
- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) (for Superpowers plugin install)
|
|
49
|
+
|
|
50
|
+
## Options
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npx @aiconstructions/claude-kit [directory] [options]
|
|
54
|
+
|
|
55
|
+
Options:
|
|
56
|
+
--no-plugins Skip plugin installation
|
|
57
|
+
-V, --version Output version number
|
|
58
|
+
-h, --help Display help
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Plugins Installed
|
|
62
|
+
|
|
63
|
+
| Plugin | Source | Method |
|
|
64
|
+
|--------|--------|--------|
|
|
65
|
+
| [Superpowers](https://github.com/obra/superpowers) | Claude Plugin Marketplace | `claude plugin install` |
|
|
66
|
+
| [GSD](https://github.com/gsd-build/get-shit-done) | npm | `npx get-shit-done-cc` |
|
|
67
|
+
| [ui-ux-pro-max](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) | GitHub | `claude plugin marketplace add` + `claude plugin install` |
|
|
68
|
+
| [claude-video](https://github.com/bradautomates/claude-video) (`/watch`) | GitHub | `claude plugin marketplace add` + `claude plugin install watch@claude-video` |
|
|
69
|
+
|
|
70
|
+
`/watch` needs `yt-dlp` and `ffmpeg` on your PATH (Windows: `winget install yt-dlp.yt-dlp Gyan.FFmpeg`; macOS: `brew install yt-dlp ffmpeg`).
|
|
71
|
+
|
|
72
|
+
## Third-party notices
|
|
73
|
+
|
|
74
|
+
See `THIRD_PARTY_NOTICES.md`.
|
|
75
|
+
|
|
76
|
+
## License
|
|
77
|
+
|
|
78
|
+
MIT
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
## garrytan/gstack
|
|
4
|
+
|
|
5
|
+
Skills under `templates/skills/gstack-*` are adapted from https://github.com/garrytan/gstack
|
|
6
|
+
(commit d8753130710de2647f7ea3bdd19ffa793f3d5c6d), MIT License, Copyright (c) 2026 Garry Tan.
|
|
7
|
+
|
|
8
|
+
| Bundled skill | Upstream path | Changes |
|
|
9
|
+
|---|---|---|
|
|
10
|
+
| `gstack-test-audit/` | `test-audit/SKILL.md` | Renamed; preamble/telemetry removed; reports written to `<repo>/.gstack-lite/`. |
|
|
11
|
+
| `gstack-deslop-shared-libs/` | `deslop-shared-libs/SKILL.md`, `bin/gstack-safe-git` | Renamed; `bin/safe-git` vendored unchanged. |
|
|
12
|
+
| `gstack-health/` | `health/SKILL.md.tmpl` | Renamed; preamble/telemetry removed; python3/node composite; history in `<repo>/.gstack-lite/`. |
|
|
13
|
+
|
|
14
|
+
MIT License text (upstream):
|
|
15
|
+
|
|
16
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
17
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
18
|
+
in the Software without restriction, including without limitation the rights
|
|
19
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
20
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
21
|
+
furnished to do so, subject to the following conditions:
|
|
22
|
+
|
|
23
|
+
The above copyright notice and this permission notice shall be included in all
|
|
24
|
+
copies or substantial portions of the Software.
|
|
25
|
+
|
|
26
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
28
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
29
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
30
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
31
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
32
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,50 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@aiconstructions/claude-kit",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "Interactive CLI to scaffold a multi-agent Claude Code workspace",
|
|
5
|
-
"bin": {
|
|
6
|
-
"claude-kit": "
|
|
7
|
-
},
|
|
8
|
-
"main": "src/index.js",
|
|
9
|
-
"type": "module",
|
|
10
|
-
"engines": {
|
|
11
|
-
"node": ">=18"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
|
|
15
|
-
"lint": "eslint src/"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"claude",
|
|
19
|
-
"claude-code",
|
|
20
|
-
"ai",
|
|
21
|
-
"agents",
|
|
22
|
-
"scaffolding",
|
|
23
|
-
"cli"
|
|
24
|
-
],
|
|
25
|
-
"author": "aiconstructions",
|
|
26
|
-
"license": "MIT",
|
|
27
|
-
"publishConfig": {
|
|
28
|
-
"access": "public",
|
|
29
|
-
"registry": "https://registry.npmjs.org/"
|
|
30
|
-
},
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"chalk": "^5.3.0",
|
|
33
|
-
"commander": "^12.1.0",
|
|
34
|
-
"ejs": "^3.1.10",
|
|
35
|
-
"fs-extra": "^11.2.0",
|
|
36
|
-
"inquirer": "^9.3.0",
|
|
37
|
-
"ora": "^8.1.0"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"jest": "^29.7.0",
|
|
41
|
-
"@jest/globals": "^29.7.0"
|
|
42
|
-
},
|
|
43
|
-
"files": [
|
|
44
|
-
"bin/",
|
|
45
|
-
"src/",
|
|
46
|
-
"templates/",
|
|
47
|
-
"README.md",
|
|
48
|
-
"LICENSE"
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@aiconstructions/claude-kit",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Interactive CLI to scaffold a multi-agent Claude Code workspace",
|
|
5
|
+
"bin": {
|
|
6
|
+
"claude-kit": "bin/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"main": "src/index.js",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=18"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
|
|
15
|
+
"lint": "eslint src/"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"claude",
|
|
19
|
+
"claude-code",
|
|
20
|
+
"ai",
|
|
21
|
+
"agents",
|
|
22
|
+
"scaffolding",
|
|
23
|
+
"cli"
|
|
24
|
+
],
|
|
25
|
+
"author": "aiconstructions",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public",
|
|
29
|
+
"registry": "https://registry.npmjs.org/"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"chalk": "^5.3.0",
|
|
33
|
+
"commander": "^12.1.0",
|
|
34
|
+
"ejs": "^3.1.10",
|
|
35
|
+
"fs-extra": "^11.2.0",
|
|
36
|
+
"inquirer": "^9.3.0",
|
|
37
|
+
"ora": "^8.1.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"jest": "^29.7.0",
|
|
41
|
+
"@jest/globals": "^29.7.0"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"bin/",
|
|
45
|
+
"src/",
|
|
46
|
+
"templates/",
|
|
47
|
+
"README.md",
|
|
48
|
+
"LICENSE",
|
|
49
|
+
"THIRD_PARTY_NOTICES.md"
|
|
50
|
+
]
|
|
51
|
+
}
|
package/src/generator.js
CHANGED
|
@@ -1,81 +1,87 @@
|
|
|
1
|
-
// src/generator.js
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import ejs from 'ejs';
|
|
5
|
-
import { fileURLToPath } from 'url';
|
|
6
|
-
|
|
7
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
const TEMPLATES_DIR = path.join(__dirname, '..', 'templates');
|
|
9
|
-
|
|
10
|
-
const AGENT_RULES = {
|
|
11
|
-
'manager.md.ejs': () => true,
|
|
12
|
-
'planner.md.ejs': () => true,
|
|
13
|
-
'analyzer.md.ejs': () => true,
|
|
14
|
-
'qa.md.ejs': () => true,
|
|
15
|
-
'security.md.ejs': () => true,
|
|
16
|
-
'git.md.ejs': () => true,
|
|
17
|
-
'backend.md.ejs': (vars) => vars.modules.backend,
|
|
18
|
-
'frontend.md.ejs': (vars) => vars.modules.mobile || vars.modules.web,
|
|
19
|
-
'offline.md.ejs': (vars) => vars.modules.mobile,
|
|
20
|
-
'cicd.md.ejs': (vars) => vars.integrations.cicd,
|
|
21
|
-
'asana.md.ejs': (vars) => vars.integrations.asana,
|
|
22
|
-
'n8n.md.ejs': (vars) => vars.integrations.n8n,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
async function renderTemplate(templatePath, vars) {
|
|
26
|
-
const template = await fs.readFile(templatePath, 'utf8');
|
|
27
|
-
return ejs.render(template, vars, { filename: templatePath });
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
async function copyStatic(src, dest) {
|
|
31
|
-
await fs.ensureDir(path.dirname(dest));
|
|
32
|
-
await fs.copyFile(src, dest);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export async function generate(targetDir, vars) {
|
|
36
|
-
await fs.ensureDir(targetDir);
|
|
37
|
-
|
|
38
|
-
// 1. Render CLAUDE.md
|
|
39
|
-
const claudeContent = await renderTemplate(
|
|
40
|
-
path.join(TEMPLATES_DIR, 'base', 'CLAUDE.md.ejs'),
|
|
41
|
-
vars
|
|
42
|
-
);
|
|
43
|
-
await fs.writeFile(path.join(targetDir, 'CLAUDE.md'), claudeContent);
|
|
44
|
-
|
|
45
|
-
// 2. Render AGENT_CONTEXT.md
|
|
46
|
-
const contextDir = path.join(targetDir, '.claude', 'context');
|
|
47
|
-
await fs.ensureDir(contextDir);
|
|
48
|
-
|
|
49
|
-
const agentCtxContent = await renderTemplate(
|
|
50
|
-
path.join(TEMPLATES_DIR, 'base', '.claude', 'context', 'AGENT_CONTEXT.md.ejs'),
|
|
51
|
-
vars
|
|
52
|
-
);
|
|
53
|
-
await fs.writeFile(path.join(contextDir, 'AGENT_CONTEXT.md'), agentCtxContent);
|
|
54
|
-
|
|
55
|
-
// 3. Copy static context files
|
|
56
|
-
const staticContextFiles = ['api-spec.md', 'infra-state.md', 'test-report.md'];
|
|
57
|
-
for (const file of staticContextFiles) {
|
|
58
|
-
await copyStatic(
|
|
59
|
-
path.join(TEMPLATES_DIR, 'base', '.claude', 'context', file),
|
|
60
|
-
path.join(contextDir, file)
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// 4. Render agent templates based on inclusion rules
|
|
65
|
-
const agentsDir = path.join(targetDir, '.claude', 'agents');
|
|
66
|
-
await fs.ensureDir(agentsDir);
|
|
67
|
-
|
|
68
|
-
for (const [templateFile, shouldInclude] of Object.entries(AGENT_RULES)) {
|
|
69
|
-
if (shouldInclude(vars)) {
|
|
70
|
-
const content = await renderTemplate(
|
|
71
|
-
path.join(TEMPLATES_DIR, 'agents', templateFile),
|
|
72
|
-
vars
|
|
73
|
-
);
|
|
74
|
-
const outputName = templateFile.replace('.ejs', '');
|
|
75
|
-
await fs.writeFile(path.join(agentsDir, outputName), content);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
1
|
+
// src/generator.js
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import ejs from 'ejs';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
|
|
7
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const TEMPLATES_DIR = path.join(__dirname, '..', 'templates');
|
|
9
|
+
|
|
10
|
+
const AGENT_RULES = {
|
|
11
|
+
'manager.md.ejs': () => true,
|
|
12
|
+
'planner.md.ejs': () => true,
|
|
13
|
+
'analyzer.md.ejs': () => true,
|
|
14
|
+
'qa.md.ejs': () => true,
|
|
15
|
+
'security.md.ejs': () => true,
|
|
16
|
+
'git.md.ejs': () => true,
|
|
17
|
+
'backend.md.ejs': (vars) => vars.modules.backend,
|
|
18
|
+
'frontend.md.ejs': (vars) => vars.modules.mobile || vars.modules.web,
|
|
19
|
+
'offline.md.ejs': (vars) => vars.modules.mobile,
|
|
20
|
+
'cicd.md.ejs': (vars) => vars.integrations.cicd,
|
|
21
|
+
'asana.md.ejs': (vars) => vars.integrations.asana,
|
|
22
|
+
'n8n.md.ejs': (vars) => vars.integrations.n8n,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
async function renderTemplate(templatePath, vars) {
|
|
26
|
+
const template = await fs.readFile(templatePath, 'utf8');
|
|
27
|
+
return ejs.render(template, vars, { filename: templatePath });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async function copyStatic(src, dest) {
|
|
31
|
+
await fs.ensureDir(path.dirname(dest));
|
|
32
|
+
await fs.copyFile(src, dest);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export async function generate(targetDir, vars) {
|
|
36
|
+
await fs.ensureDir(targetDir);
|
|
37
|
+
|
|
38
|
+
// 1. Render CLAUDE.md
|
|
39
|
+
const claudeContent = await renderTemplate(
|
|
40
|
+
path.join(TEMPLATES_DIR, 'base', 'CLAUDE.md.ejs'),
|
|
41
|
+
vars
|
|
42
|
+
);
|
|
43
|
+
await fs.writeFile(path.join(targetDir, 'CLAUDE.md'), claudeContent);
|
|
44
|
+
|
|
45
|
+
// 2. Render AGENT_CONTEXT.md
|
|
46
|
+
const contextDir = path.join(targetDir, '.claude', 'context');
|
|
47
|
+
await fs.ensureDir(contextDir);
|
|
48
|
+
|
|
49
|
+
const agentCtxContent = await renderTemplate(
|
|
50
|
+
path.join(TEMPLATES_DIR, 'base', '.claude', 'context', 'AGENT_CONTEXT.md.ejs'),
|
|
51
|
+
vars
|
|
52
|
+
);
|
|
53
|
+
await fs.writeFile(path.join(contextDir, 'AGENT_CONTEXT.md'), agentCtxContent);
|
|
54
|
+
|
|
55
|
+
// 3. Copy static context files
|
|
56
|
+
const staticContextFiles = ['api-spec.md', 'infra-state.md', 'test-report.md'];
|
|
57
|
+
for (const file of staticContextFiles) {
|
|
58
|
+
await copyStatic(
|
|
59
|
+
path.join(TEMPLATES_DIR, 'base', '.claude', 'context', file),
|
|
60
|
+
path.join(contextDir, file)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// 4. Render agent templates based on inclusion rules
|
|
65
|
+
const agentsDir = path.join(targetDir, '.claude', 'agents');
|
|
66
|
+
await fs.ensureDir(agentsDir);
|
|
67
|
+
|
|
68
|
+
for (const [templateFile, shouldInclude] of Object.entries(AGENT_RULES)) {
|
|
69
|
+
if (shouldInclude(vars)) {
|
|
70
|
+
const content = await renderTemplate(
|
|
71
|
+
path.join(TEMPLATES_DIR, 'agents', templateFile),
|
|
72
|
+
vars
|
|
73
|
+
);
|
|
74
|
+
const outputName = templateFile.replace('.ejs', '');
|
|
75
|
+
await fs.writeFile(path.join(agentsDir, outputName), content);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// 5. Copy bundled skills (always included)
|
|
80
|
+
const skillsSrc = path.join(TEMPLATES_DIR, 'skills');
|
|
81
|
+
if (await fs.pathExists(skillsSrc)) {
|
|
82
|
+
await fs.copy(skillsSrc, path.join(targetDir, '.claude', 'skills'), { overwrite: true });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Export for testing
|
|
87
|
+
export { AGENT_RULES };
|
package/src/plugin-installer.js
CHANGED
|
@@ -1,89 +1,102 @@
|
|
|
1
|
-
import { execSync } from 'child_process';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
|
|
4
|
-
export function getInstallCommands(targetDir, plugins) {
|
|
5
|
-
const commands = [];
|
|
6
|
-
|
|
7
|
-
if (plugins.superpowers) {
|
|
8
|
-
commands.push({
|
|
9
|
-
name: 'Superpowers',
|
|
10
|
-
type: 'exec',
|
|
11
|
-
command: 'claude plugin install superpowers@claude-plugins-official'
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (plugins.gsd) {
|
|
16
|
-
commands.push({
|
|
17
|
-
name: 'GSD',
|
|
18
|
-
type: 'exec',
|
|
19
|
-
command: 'npx get-shit-done-cc@latest --claude --local'
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (plugins.uiUxProMax) {
|
|
24
|
-
commands.push({
|
|
25
|
-
name: 'ui-ux-pro-max (marketplace)',
|
|
26
|
-
type: 'exec',
|
|
27
|
-
command: 'claude plugin marketplace add nextlevelbuilder/ui-ux-pro-max-skill'
|
|
28
|
-
});
|
|
29
|
-
commands.push({
|
|
30
|
-
name: 'ui-ux-pro-max (install)',
|
|
31
|
-
type: 'exec',
|
|
32
|
-
command: 'claude plugin install ui-ux-pro-max@ui-ux-pro-max-skill'
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
1
|
+
import { execSync } from 'child_process';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
export function getInstallCommands(targetDir, plugins) {
|
|
5
|
+
const commands = [];
|
|
6
|
+
|
|
7
|
+
if (plugins.superpowers) {
|
|
8
|
+
commands.push({
|
|
9
|
+
name: 'Superpowers',
|
|
10
|
+
type: 'exec',
|
|
11
|
+
command: 'claude plugin install superpowers@claude-plugins-official'
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (plugins.gsd) {
|
|
16
|
+
commands.push({
|
|
17
|
+
name: 'GSD',
|
|
18
|
+
type: 'exec',
|
|
19
|
+
command: 'npx get-shit-done-cc@latest --claude --local'
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (plugins.uiUxProMax) {
|
|
24
|
+
commands.push({
|
|
25
|
+
name: 'ui-ux-pro-max (marketplace)',
|
|
26
|
+
type: 'exec',
|
|
27
|
+
command: 'claude plugin marketplace add nextlevelbuilder/ui-ux-pro-max-skill'
|
|
28
|
+
});
|
|
29
|
+
commands.push({
|
|
30
|
+
name: 'ui-ux-pro-max (install)',
|
|
31
|
+
type: 'exec',
|
|
32
|
+
command: 'claude plugin install ui-ux-pro-max@ui-ux-pro-max-skill'
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (plugins.watch) {
|
|
37
|
+
commands.push({
|
|
38
|
+
name: 'claude-video /watch (marketplace)',
|
|
39
|
+
type: 'exec',
|
|
40
|
+
command: 'claude plugin marketplace add bradautomates/claude-video'
|
|
41
|
+
});
|
|
42
|
+
commands.push({
|
|
43
|
+
name: 'claude-video /watch (install)',
|
|
44
|
+
type: 'exec',
|
|
45
|
+
command: 'claude plugin install watch@claude-video'
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return commands;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function checkPrerequisites() {
|
|
53
|
+
const results = { node: false, claude: false };
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
const nodeVersion = execSync('node --version', { encoding: 'utf8' }).trim();
|
|
57
|
+
const major = parseInt(nodeVersion.replace('v', '').split('.')[0], 10);
|
|
58
|
+
results.node = major >= 18;
|
|
59
|
+
} catch {
|
|
60
|
+
results.node = false;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
try {
|
|
64
|
+
execSync('claude --version', { encoding: 'utf8', stdio: 'pipe' });
|
|
65
|
+
results.claude = true;
|
|
66
|
+
} catch {
|
|
67
|
+
results.claude = false;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return results;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export async function installPlugins(targetDir, plugins, { onStart, onDone, onError } = {}) {
|
|
74
|
+
const commands = getInstallCommands(targetDir, plugins);
|
|
75
|
+
const results = [];
|
|
76
|
+
|
|
77
|
+
for (const cmd of commands) {
|
|
78
|
+
onStart?.(cmd.name);
|
|
79
|
+
|
|
80
|
+
try {
|
|
81
|
+
if (cmd.type === 'exec') {
|
|
82
|
+
execSync(cmd.command, {
|
|
83
|
+
cwd: targetDir,
|
|
84
|
+
encoding: 'utf8',
|
|
85
|
+
stdio: 'pipe',
|
|
86
|
+
timeout: 120_000
|
|
87
|
+
});
|
|
88
|
+
} else if (cmd.type === 'giget') {
|
|
89
|
+
const { downloadTemplate } = await import('giget');
|
|
90
|
+
await downloadTemplate(cmd.source, { dir: cmd.dest, force: true });
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
onDone?.(cmd.name);
|
|
94
|
+
results.push({ name: cmd.name, success: true });
|
|
95
|
+
} catch (err) {
|
|
96
|
+
onError?.(cmd.name, err.message);
|
|
97
|
+
results.push({ name: cmd.name, success: false, error: err.message });
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return results;
|
|
102
|
+
}
|