@claude-code-mastery/starter-kit 1.1.0 → 1.2.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/.claude/.starter-kit/profiles/clean.md +7 -1
- package/.claude/.starter-kit/profiles/go.md +1 -1
- package/.claude/.starter-kit/profiles/node.md +13 -4
- package/.claude/.starter-kit/profiles/python.md +1 -1
- package/package.json +1 -1
- package/scripts/scaffold-clean.sh +45 -25
- package/scripts/scaffold-default.sh +51 -36
|
@@ -74,7 +74,13 @@ project/
|
|
|
74
74
|
2. **Run the batch scaffold script** — this replaces all individual file creation with a single command:
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
|
-
|
|
77
|
+
# Resolve the kit source: npm global install takes priority over CWD
|
|
78
|
+
if [ -f ~/.claude/starter-kit-source-path ]; then
|
|
79
|
+
KIT=$(cat ~/.claude/starter-kit-source-path)
|
|
80
|
+
else
|
|
81
|
+
KIT="$(pwd)"
|
|
82
|
+
fi
|
|
83
|
+
bash "$KIT/scripts/scaffold-clean.sh" "$PROJECT_PATH" "$PROJECT_NAME" "$KIT"
|
|
78
84
|
```
|
|
79
85
|
|
|
80
86
|
The script handles ALL of the following in one execution (~100ms) with a progress indicator:
|
|
@@ -394,7 +394,7 @@ When creating a Go project, the CLAUDE.md MUST include these Go-specific rules:
|
|
|
394
394
|
8. Create `Dockerfile` (multi-stage with scratch, using template above)
|
|
395
395
|
9. Create `.golangci.yml` (using template above)
|
|
396
396
|
10. Create Go-specific `CLAUDE.md` (with Go rules above + universal security rules)
|
|
397
|
-
11. Copy `.claude/` contents from starter kit
|
|
397
|
+
11. **If NOT using npm global install** (`~/.claude/starter-kit-source-path` does not exist): Copy `.claude/` contents from starter kit - only commands with `scope: project` in frontmatter (skills, hooks, settings.json copied in full). **If npm global install is active**: skip this step - commands/skills/hooks already live in `~/.claude/` globally.
|
|
398
398
|
12. Create `project-docs/` templates (ARCHITECTURE.md, INFRASTRUCTURE.md, DECISIONS.md)
|
|
399
399
|
13. Create `.env`, `.env.example`, `.gitignore` (Go-specific), `.dockerignore`
|
|
400
400
|
14. Create `CLAUDE.local.md` template
|
|
@@ -81,13 +81,22 @@ Based on answers, scaffold the project.
|
|
|
81
81
|
**If the resolved choices exactly match the default profile** (fullstack + next + mongo + tailwind + docker + pnpm), use the batch scaffold script for maximum speed:
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
|
-
|
|
84
|
+
# Resolve the kit source: npm global install takes priority over CWD
|
|
85
|
+
if [ -f ~/.claude/starter-kit-source-path ]; then
|
|
86
|
+
KIT=$(cat ~/.claude/starter-kit-source-path)
|
|
87
|
+
else
|
|
88
|
+
KIT="$(pwd)"
|
|
89
|
+
fi
|
|
90
|
+
bash "$KIT/scripts/scaffold-default.sh" "$PROJECT_PATH" "$PROJECT_NAME" "$KIT"
|
|
85
91
|
```
|
|
86
92
|
|
|
87
93
|
The script handles ALL of the following in one execution with progress indicators:
|
|
88
|
-
- Creates all directories (src/,
|
|
89
|
-
-
|
|
90
|
-
-
|
|
94
|
+
- Creates all directories (src/, project-docs/, tests/, scripts/, .github/)
|
|
95
|
+
- For clone users: copies project-scoped commands, all skills, and all hooks into the project's .claude/
|
|
96
|
+
- For npm users: skips local .claude/ copy (commands/skills/hooks already live globally in ~/.claude/)
|
|
97
|
+
- Writes settings.json (10-hook config) for clone users only
|
|
98
|
+
- Installs StrictDB (npm package) + query system
|
|
99
|
+
- Creates Next.js app structure (layout, page, API health route, instrumentation)
|
|
91
100
|
- Installs StrictDB (npm package) + query system
|
|
92
101
|
- Creates Next.js app structure (layout, page, API health route, instrumentation)
|
|
93
102
|
- Creates TypeScript, Next.js, Tailwind, PostCSS, Vitest, Playwright configs
|
|
@@ -415,7 +415,7 @@ When creating a Python project, the CLAUDE.md MUST include these Python-specific
|
|
|
415
415
|
10. Create `Makefile` with dev, test, lint, format, run targets
|
|
416
416
|
11. Create `Dockerfile` (multi-stage with python:3.12-slim)
|
|
417
417
|
12. Create Python-specific CLAUDE.md (with Python rules + universal security rules)
|
|
418
|
-
13. Copy `.claude/` contents from starter kit
|
|
418
|
+
13. **If NOT using npm global install** (`~/.claude/starter-kit-source-path` does not exist): Copy `.claude/` contents from starter kit - only commands with `scope: project` in frontmatter (skills, hooks, settings.json copied in full). **If npm global install is active**: skip this step - commands/skills/hooks already live in `~/.claude/` globally.
|
|
419
419
|
14. Create `project-docs/` templates (ARCHITECTURE.md, INFRASTRUCTURE.md, DECISIONS.md)
|
|
420
420
|
15. Create `.env`, `.env.example`, `.gitignore` (Python-specific), `.dockerignore`
|
|
421
421
|
16. Create `CLAUDE.local.md` template
|
package/package.json
CHANGED
|
@@ -14,6 +14,18 @@ PROJECT_NAME="$2"
|
|
|
14
14
|
STARTER_KIT="$3"
|
|
15
15
|
REGISTRY="${HOME}/.claude/starter-kit-projects.json"
|
|
16
16
|
|
|
17
|
+
# ── Global install detection ───────────────────────────────────────────────────
|
|
18
|
+
# npm users: copyPackageFiles flattens .claude/* into ~/.claude/starter-kit/ directly,
|
|
19
|
+
# so commands are at $STARTER_KIT/commands/ (no extra .claude/ level).
|
|
20
|
+
# Clone users: content lives under $STARTER_KIT/.claude/.
|
|
21
|
+
if [ -f "${HOME}/.claude/starter-kit-source-path" ]; then
|
|
22
|
+
GLOBAL_INSTALLED=true
|
|
23
|
+
CLAUDE_DIR="$STARTER_KIT"
|
|
24
|
+
else
|
|
25
|
+
GLOBAL_INSTALLED=false
|
|
26
|
+
CLAUDE_DIR="$STARTER_KIT/.claude"
|
|
27
|
+
fi
|
|
28
|
+
|
|
17
29
|
# ── Validation ─────────────────────────────────────────────────────────────────
|
|
18
30
|
if [ -d "$PROJECT_PATH" ]; then
|
|
19
31
|
echo "ERROR: Directory already exists: $PROJECT_PATH"
|
|
@@ -21,7 +33,7 @@ if [ -d "$PROJECT_PATH" ]; then
|
|
|
21
33
|
exit 1
|
|
22
34
|
fi
|
|
23
35
|
|
|
24
|
-
if [ ! -d "$
|
|
36
|
+
if [ ! -d "$CLAUDE_DIR/commands" ]; then
|
|
25
37
|
echo "ERROR: Starter kit not found at: $STARTER_KIT"
|
|
26
38
|
exit 1
|
|
27
39
|
fi
|
|
@@ -75,40 +87,42 @@ echo ""
|
|
|
75
87
|
|
|
76
88
|
# ── Step 1: Create directories ─────────────────────────────────────────────────
|
|
77
89
|
progress "Creating directory structure..."
|
|
78
|
-
|
|
90
|
+
if [ "$GLOBAL_INSTALLED" = "false" ]; then
|
|
91
|
+
mkdir -p "$PROJECT_PATH"/.claude/{commands,skills,agents,hooks}
|
|
92
|
+
fi
|
|
79
93
|
mkdir -p "$PROJECT_PATH"/project-docs
|
|
80
94
|
mkdir -p "$PROJECT_PATH"/tests
|
|
81
95
|
|
|
82
|
-
# ──
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
cp -r "$
|
|
94
|
-
cp "$
|
|
95
|
-
cp "$
|
|
96
|
-
cp "$
|
|
97
|
-
cp "$
|
|
98
|
-
cp "$
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
progress "Writing settings.json..."
|
|
102
|
-
cat > "$PROJECT_PATH/.claude/settings.json" << 'SETTINGS_EOF'
|
|
96
|
+
# ── Steps 2-4: Copy Claude infrastructure (clone users only) ──────────────────
|
|
97
|
+
# npm users already have commands/skills/hooks installed globally in ~/.claude/
|
|
98
|
+
if [ "$GLOBAL_INSTALLED" = "false" ]; then
|
|
99
|
+
progress "Copying 16 project commands..."
|
|
100
|
+
for cmd in architecture commit create-api create-e2e diagram help \
|
|
101
|
+
optimize-docker progress refactor review security-check \
|
|
102
|
+
setup show-user-guide test-plan what-is-my-ai-doing worktree; do
|
|
103
|
+
cp "$CLAUDE_DIR/commands/${cmd}.md" "$PROJECT_PATH/.claude/commands/"
|
|
104
|
+
done
|
|
105
|
+
|
|
106
|
+
progress "Copying skills, agents, hooks..."
|
|
107
|
+
cp -r "$CLAUDE_DIR/skills/code-review" "$PROJECT_PATH/.claude/skills/"
|
|
108
|
+
cp -r "$CLAUDE_DIR/skills/create-service" "$PROJECT_PATH/.claude/skills/"
|
|
109
|
+
cp "$CLAUDE_DIR/agents/code-reviewer.md" "$PROJECT_PATH/.claude/agents/"
|
|
110
|
+
cp "$CLAUDE_DIR/agents/test-writer.md" "$PROJECT_PATH/.claude/agents/"
|
|
111
|
+
cp "$CLAUDE_DIR/hooks/block-dangerous-bash.py" "$PROJECT_PATH/.claude/hooks/"
|
|
112
|
+
cp "$CLAUDE_DIR/hooks/lint-on-save.sh" "$PROJECT_PATH/.claude/hooks/"
|
|
113
|
+
cp "$CLAUDE_DIR/hooks/verify-no-secrets.sh" "$PROJECT_PATH/.claude/hooks/"
|
|
114
|
+
|
|
115
|
+
progress "Writing settings.json..."
|
|
116
|
+
cat > "$PROJECT_PATH/.claude/settings.json" << 'SETTINGS_EOF'
|
|
103
117
|
{
|
|
104
118
|
"hooks": {
|
|
105
119
|
"PreToolUse": [
|
|
106
120
|
{
|
|
107
|
-
"matcher": "
|
|
121
|
+
"matcher": "Bash",
|
|
108
122
|
"hooks": [
|
|
109
123
|
{
|
|
110
124
|
"type": "command",
|
|
111
|
-
"command": "python3 .claude/hooks/block-
|
|
125
|
+
"command": "python3 .claude/hooks/block-dangerous-bash.py"
|
|
112
126
|
}
|
|
113
127
|
]
|
|
114
128
|
}
|
|
@@ -137,6 +151,12 @@ cat > "$PROJECT_PATH/.claude/settings.json" << 'SETTINGS_EOF'
|
|
|
137
151
|
}
|
|
138
152
|
}
|
|
139
153
|
SETTINGS_EOF
|
|
154
|
+
else
|
|
155
|
+
# Skip counts for npm users — 3 steps replaced by one message
|
|
156
|
+
progress "Skipping local .claude/ copy (commands/skills/hooks live globally)"
|
|
157
|
+
progress "Skipping local .claude/ copy (commands/skills/hooks live globally)"
|
|
158
|
+
progress "Skipping local .claude/ copy (commands/skills/hooks live globally)"
|
|
159
|
+
fi
|
|
140
160
|
|
|
141
161
|
# ── Step 4b: Create features.json (empty manifest for clean mode) ─────────────
|
|
142
162
|
cat > "$PROJECT_PATH/.claude/features.json" << 'FEATURES_EOF'
|
|
@@ -15,6 +15,15 @@ PROJECT_NAME="$2"
|
|
|
15
15
|
STARTER_KIT="$3"
|
|
16
16
|
REGISTRY="${HOME}/.claude/starter-kit-projects.json"
|
|
17
17
|
|
|
18
|
+
# ── Global install detection ───────────────────────────────────────────────────
|
|
19
|
+
if [ -f "${HOME}/.claude/starter-kit-source-path" ]; then
|
|
20
|
+
GLOBAL_INSTALLED=true
|
|
21
|
+
CLAUDE_DIR="$STARTER_KIT"
|
|
22
|
+
else
|
|
23
|
+
GLOBAL_INSTALLED=false
|
|
24
|
+
CLAUDE_DIR="$STARTER_KIT/.claude"
|
|
25
|
+
fi
|
|
26
|
+
|
|
18
27
|
# ── Validation ─────────────────────────────────────────────────────────────────
|
|
19
28
|
if [ -d "$PROJECT_PATH" ]; then
|
|
20
29
|
echo "ERROR: Directory already exists: $PROJECT_PATH"
|
|
@@ -22,7 +31,7 @@ if [ -d "$PROJECT_PATH" ]; then
|
|
|
22
31
|
exit 1
|
|
23
32
|
fi
|
|
24
33
|
|
|
25
|
-
if [ ! -d "$
|
|
34
|
+
if [ ! -d "$CLAUDE_DIR/commands" ]; then
|
|
26
35
|
echo "ERROR: Starter kit not found at: $STARTER_KIT"
|
|
27
36
|
exit 1
|
|
28
37
|
fi
|
|
@@ -77,7 +86,9 @@ echo ""
|
|
|
77
86
|
|
|
78
87
|
# ── Step 1: Create directory structure ─────────────────────────────────────────
|
|
79
88
|
progress "Creating directory structure..."
|
|
80
|
-
|
|
89
|
+
if [ "$GLOBAL_INSTALLED" = "false" ]; then
|
|
90
|
+
mkdir -p "$PROJECT_PATH"/.claude/{commands,skills,agents,hooks}
|
|
91
|
+
fi
|
|
81
92
|
mkdir -p "$PROJECT_PATH"/project-docs
|
|
82
93
|
mkdir -p "$PROJECT_PATH"/src/app/api/v1/health
|
|
83
94
|
mkdir -p "$PROJECT_PATH"/src/handlers
|
|
@@ -89,46 +100,41 @@ mkdir -p "$PROJECT_PATH"/content
|
|
|
89
100
|
mkdir -p "$PROJECT_PATH"/.github/workflows
|
|
90
101
|
mkdir -p "$PROJECT_PATH"/public
|
|
91
102
|
|
|
92
|
-
# ──
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
cp -r "$
|
|
104
|
-
cp "$
|
|
105
|
-
cp "$
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
chmod +x "$PROJECT_PATH/.claude/hooks/"*.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
progress "Writing settings.json (
|
|
116
|
-
cat > "$PROJECT_PATH/.claude/settings.json" << 'SETTINGS_EOF'
|
|
103
|
+
# ── Steps 2-4: Copy Claude infrastructure (clone users only) ──────────────────
|
|
104
|
+
# npm users already have commands/skills/hooks installed globally in ~/.claude/
|
|
105
|
+
if [ "$GLOBAL_INSTALLED" = "false" ]; then
|
|
106
|
+
progress "Copying 16 project commands..."
|
|
107
|
+
for cmd in architecture commit create-api create-e2e diagram help \
|
|
108
|
+
optimize-docker progress refactor review security-check \
|
|
109
|
+
setup show-user-guide test-plan what-is-my-ai-doing worktree; do
|
|
110
|
+
cp "$CLAUDE_DIR/commands/${cmd}.md" "$PROJECT_PATH/.claude/commands/"
|
|
111
|
+
done
|
|
112
|
+
|
|
113
|
+
progress "Copying skills, agents, 10 hooks..."
|
|
114
|
+
cp -r "$CLAUDE_DIR/skills/code-review" "$PROJECT_PATH/.claude/skills/"
|
|
115
|
+
cp -r "$CLAUDE_DIR/skills/create-service" "$PROJECT_PATH/.claude/skills/"
|
|
116
|
+
cp "$CLAUDE_DIR/agents/code-reviewer.md" "$PROJECT_PATH/.claude/agents/"
|
|
117
|
+
cp "$CLAUDE_DIR/agents/test-writer.md" "$PROJECT_PATH/.claude/agents/"
|
|
118
|
+
for hook in block-dangerous-bash.py check-file-length.py lint-on-save.sh \
|
|
119
|
+
verify-no-secrets.sh check-rybbit.sh check-branch.sh \
|
|
120
|
+
check-ports.sh check-e2e.sh check-rulecatch.sh check-env-sync.sh; do
|
|
121
|
+
cp "$CLAUDE_DIR/hooks/${hook}" "$PROJECT_PATH/.claude/hooks/"
|
|
122
|
+
done
|
|
123
|
+
chmod +x "$PROJECT_PATH/.claude/hooks/"*.sh 2>/dev/null
|
|
124
|
+
chmod +x "$PROJECT_PATH/.claude/hooks/"*.py 2>/dev/null
|
|
125
|
+
|
|
126
|
+
progress "Writing settings.json (10 hooks)..."
|
|
127
|
+
cat > "$PROJECT_PATH/.claude/settings.json" << 'SETTINGS_EOF'
|
|
117
128
|
{
|
|
118
129
|
"hooks": {
|
|
119
130
|
"PreToolUse": [
|
|
120
131
|
{
|
|
121
|
-
"matcher": "
|
|
132
|
+
"matcher": "Bash",
|
|
122
133
|
"hooks": [
|
|
123
134
|
{
|
|
124
135
|
"type": "command",
|
|
125
|
-
"command": "python3 .claude/hooks/block-
|
|
126
|
-
}
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"matcher": "Bash",
|
|
131
|
-
"hooks": [
|
|
136
|
+
"command": "python3 .claude/hooks/block-dangerous-bash.py"
|
|
137
|
+
},
|
|
132
138
|
{
|
|
133
139
|
"type": "command",
|
|
134
140
|
"command": "bash .claude/hooks/check-rybbit.sh"
|
|
@@ -150,8 +156,12 @@ cat > "$PROJECT_PATH/.claude/settings.json" << 'SETTINGS_EOF'
|
|
|
150
156
|
],
|
|
151
157
|
"PostToolUse": [
|
|
152
158
|
{
|
|
153
|
-
"matcher": "Write",
|
|
159
|
+
"matcher": "Write|Edit",
|
|
154
160
|
"hooks": [
|
|
161
|
+
{
|
|
162
|
+
"type": "command",
|
|
163
|
+
"command": "python3 .claude/hooks/check-file-length.py"
|
|
164
|
+
},
|
|
155
165
|
{
|
|
156
166
|
"type": "command",
|
|
157
167
|
"command": "bash .claude/hooks/lint-on-save.sh"
|
|
@@ -180,6 +190,11 @@ cat > "$PROJECT_PATH/.claude/settings.json" << 'SETTINGS_EOF'
|
|
|
180
190
|
}
|
|
181
191
|
}
|
|
182
192
|
SETTINGS_EOF
|
|
193
|
+
else
|
|
194
|
+
progress "Skipping local .claude/ copy (commands/skills/hooks live globally)"
|
|
195
|
+
progress "Skipping local .claude/ copy (commands/skills/hooks live globally)"
|
|
196
|
+
progress "Skipping local .claude/ copy (commands/skills/hooks live globally)"
|
|
197
|
+
fi
|
|
183
198
|
|
|
184
199
|
# ── Step 4b: Create features.json (populated manifest) ────────────────────────
|
|
185
200
|
CREATED_AT=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|