@claude-code-mastery/starter-kit 1.0.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 +113 -0
- package/.claude/.starter-kit/profiles/go.md +458 -0
- package/.claude/.starter-kit/profiles/node.md +429 -0
- package/.claude/.starter-kit/profiles/python.md +475 -0
- package/.claude/.starter-kit/shared/analytics-rybbit.md +55 -0
- package/.claude/.starter-kit/shared/claude-md-base.md +93 -0
- package/.claude/.starter-kit/shared/deployment-dokploy.md +158 -0
- package/.claude/.starter-kit/shared/feature-manifest.md +43 -0
- package/.claude/.starter-kit/shared/mcp-and-pooler.md +38 -0
- package/.claude/.starter-kit/shared/mongo-setup.md +20 -0
- package/.claude/.starter-kit/shared/profile-config.md +65 -0
- package/.claude/.starter-kit/shared/seo.md +113 -0
- package/.claude/.starter-kit/shared/sql-setup.md +37 -0
- package/.claude/commands/add-feature.md +349 -0
- package/.claude/commands/add-project-setup.md +156 -0
- package/.claude/commands/architecture.md +27 -0
- package/.claude/commands/commit.md +61 -0
- package/.claude/commands/convert-project-to-starter-kit.md +508 -0
- package/.claude/commands/create-api.md +385 -0
- package/.claude/commands/create-e2e.md +230 -0
- package/.claude/commands/diagram.md +301 -0
- package/.claude/commands/help.md +120 -0
- package/.claude/commands/install-global.md +145 -0
- package/.claude/commands/new-project.md +244 -0
- package/.claude/commands/optimize-docker.md +352 -0
- package/.claude/commands/progress.md +61 -0
- package/.claude/commands/projects-created.md +79 -0
- package/.claude/commands/quickstart.md +105 -0
- package/.claude/commands/refactor.md +267 -0
- package/.claude/commands/remove-project.md +95 -0
- package/.claude/commands/review.md +59 -0
- package/.claude/commands/security-check.md +77 -0
- package/.claude/commands/set-project-profile-default.md +79 -0
- package/.claude/commands/setup.md +337 -0
- package/.claude/commands/show-user-guide.md +58 -0
- package/.claude/commands/starter-kit.md +90 -0
- package/.claude/commands/test-plan.md +118 -0
- package/.claude/commands/update-project.md +413 -0
- package/.claude/commands/what-is-my-ai-doing.md +42 -0
- package/.claude/commands/worktree.md +124 -0
- package/.claude/hooks/block-dangerous-bash.py +55 -0
- package/.claude/hooks/check-branch.sh +116 -0
- package/.claude/hooks/check-e2e.sh +71 -0
- package/.claude/hooks/check-env-sync.sh +41 -0
- package/.claude/hooks/check-file-length.py +47 -0
- package/.claude/hooks/check-ports.sh +59 -0
- package/.claude/hooks/check-rulecatch.sh +33 -0
- package/.claude/hooks/check-rybbit.sh +63 -0
- package/.claude/hooks/lint-on-save.sh +59 -0
- package/.claude/hooks/verify-no-secrets.sh +80 -0
- package/.claude/settings.json +34 -0
- package/.claude/skills/api-conventions/SKILL.md +34 -0
- package/.claude/skills/code-review/SKILL.md +87 -0
- package/.claude/skills/code-review/references/mongodb-checks.md +25 -0
- package/.claude/skills/code-review/references/project-checks.md +38 -0
- package/.claude/skills/create-service/SKILL.md +222 -0
- package/.claude/skills/debugger/SKILL.md +39 -0
- package/.claude/skills/dependency-vetting/SKILL.md +46 -0
- package/.claude/skills/design-review/SKILL.md +50 -0
- package/.claude/skills/mcp-builder/SKILL.md +57 -0
- package/.claude/skills/mongodb-rules/SKILL.md +62 -0
- package/.claude/skills/terminal-tui/SKILL.md +106 -0
- package/.claude/skills/test-writer/SKILL.md +78 -0
- package/LICENSE +21 -0
- package/README.md +2152 -0
- package/bin/cli.js +205 -0
- package/claude-mastery-project.conf +220 -0
- package/global-claude-md/CLAUDE.md +212 -0
- package/global-claude-md/settings.json +3 -0
- package/package.json +81 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Set the default profile for /new-project
|
|
3
|
+
scope: starter-kit
|
|
4
|
+
allowed-tools: Read, Edit, AskUserQuestion
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Set Project Profile Default
|
|
8
|
+
|
|
9
|
+
Set which profile `/new-project` uses by default when no profile is specified.
|
|
10
|
+
|
|
11
|
+
**Arguments:** $ARGUMENTS
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/set-project-profile-default go → sets default_profile = go
|
|
17
|
+
/set-project-profile-default clean → sets default_profile = clean
|
|
18
|
+
/set-project-profile-default default → sets default_profile = default
|
|
19
|
+
/set-project-profile-default python-api → sets default_profile = python-api
|
|
20
|
+
/set-project-profile-default mongo next tailwind docker
|
|
21
|
+
→ creates/updates [user-default] profile with those settings
|
|
22
|
+
→ sets default_profile = user-default
|
|
23
|
+
/set-project-profile-default (no args)
|
|
24
|
+
→ shows current default, asks what to change
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Steps
|
|
28
|
+
|
|
29
|
+
### 1. Read the config file
|
|
30
|
+
|
|
31
|
+
Read `claude-mastery-project.conf` from the project root. If not found, check `~/.claude/claude-mastery-project.conf`.
|
|
32
|
+
|
|
33
|
+
Extract:
|
|
34
|
+
- All `[section]` names (these are the available profiles)
|
|
35
|
+
- Current `default_profile` value from `[global]` (if set)
|
|
36
|
+
|
|
37
|
+
### 2. Parse arguments
|
|
38
|
+
|
|
39
|
+
**$ARGUMENTS** can be:
|
|
40
|
+
|
|
41
|
+
**A) No arguments** — show current state and ask:
|
|
42
|
+
- Display the current `default_profile` value (or "not set" if absent)
|
|
43
|
+
- List all available profiles with a one-line summary of each
|
|
44
|
+
- Ask via AskUserQuestion: "Which profile should be the default?"
|
|
45
|
+
- Options: list all profile section names from the conf file
|
|
46
|
+
- After selection, proceed to Step 3
|
|
47
|
+
|
|
48
|
+
**B) Single argument matching an existing `[section]` name** (e.g., `go`, `clean`, `default`, `api`, `vue`, `python-api`):
|
|
49
|
+
- Proceed to Step 3 with that profile name
|
|
50
|
+
|
|
51
|
+
**C) Multiple arguments** (e.g., `mongo next tailwind docker`):
|
|
52
|
+
- Parse as shorthand options using the same parser as `/new-project`:
|
|
53
|
+
- **Languages:** `node`, `go`, `python`
|
|
54
|
+
- **Frameworks:** `vite`, `react`, `next`, `vue`, `nuxt`, `svelte`, `sveltekit`, `angular`, `astro`, `fastify`, `express`, `hono`, `gin`, `chi`, `echo`, `fiber`, `stdlib`, `fastapi`, `django`, `flask`
|
|
55
|
+
- **Database:** `mongo`, `postgres`, `mysql`, `mssql`, `sqlite`
|
|
56
|
+
- **Hosting:** `dokploy`, `vercel`, `static`
|
|
57
|
+
- **Package managers:** `pnpm`, `npm`, `bun`, `pip`, `uv`, `poetry`
|
|
58
|
+
- **Options:** `seo`, `ssr`, `tailwind`, `prisma`, `docker`, `ci`, `multiregion`
|
|
59
|
+
- **Analytics:** `rybbit`
|
|
60
|
+
- **MCP:** `playwright`, `context7`, `rulecatch`
|
|
61
|
+
- Create or update a `[user-default]` section in the conf file with the parsed settings
|
|
62
|
+
- Set `default_profile = user-default` in `[global]`
|
|
63
|
+
- Proceed to Step 4 (confirmation)
|
|
64
|
+
|
|
65
|
+
### 3. Set default_profile in `[global]`
|
|
66
|
+
|
|
67
|
+
In the `[global]` section:
|
|
68
|
+
- If `default_profile` already exists → change its value to the chosen profile
|
|
69
|
+
- If `default_profile` does not exist → add it after the last line in `[global]` (before the next `[section]`)
|
|
70
|
+
|
|
71
|
+
### 4. Confirm
|
|
72
|
+
|
|
73
|
+
Read the file back and confirm the change was applied. Show the updated `[global]` section to the user.
|
|
74
|
+
|
|
75
|
+
Tell the user:
|
|
76
|
+
|
|
77
|
+
> Done. `/new-project PROJECTNAME` will now use the `<profile>` profile by default. You can still override with `/new-project PROJECTNAME <other-profile>` or any other profile name.
|
|
78
|
+
|
|
79
|
+
If the user used multiple shorthand arguments (option C), also show the `[user-default]` section that was created/updated.
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Interactive project setup — configure .env, GitHub, Docker, analytics, and services
|
|
3
|
+
scope: project
|
|
4
|
+
argument-hint: [--reset]
|
|
5
|
+
allowed-tools: Bash, Read, Write, Edit, AskUserQuestion
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Project Setup
|
|
9
|
+
|
|
10
|
+
Walk the user through configuring all environment variables and project settings. Creates or updates the `.env` file with real values while keeping `.env.example` as the template.
|
|
11
|
+
|
|
12
|
+
**Arguments:** $ARGUMENTS
|
|
13
|
+
|
|
14
|
+
If `--reset` is passed, start fresh (re-ask all questions even if .env already has values).
|
|
15
|
+
|
|
16
|
+
## Step 0 — Check Current State
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Does .env exist?
|
|
20
|
+
ls .env 2>/dev/null
|
|
21
|
+
|
|
22
|
+
# Does .env.example exist?
|
|
23
|
+
ls .env.example 2>/dev/null
|
|
24
|
+
|
|
25
|
+
# Is .env in .gitignore?
|
|
26
|
+
grep -q "^\.env$" .gitignore 2>/dev/null && echo ".env is gitignored" || echo "WARNING: .env NOT in .gitignore"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
If `.env` doesn't exist, create it from `.env.example`.
|
|
30
|
+
If `.env.example` doesn't exist, create a blank `.env`.
|
|
31
|
+
If `.env` is NOT in `.gitignore`, add it immediately before proceeding.
|
|
32
|
+
|
|
33
|
+
## Step 0.5 — Development Environment Check (WSL)
|
|
34
|
+
|
|
35
|
+
Detect the current environment:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Check if running on WSL
|
|
39
|
+
uname -r 2>/dev/null | grep -qi "microsoft\|wsl" && echo "WSL_DETECTED=true" || echo "WSL_DETECTED=false"
|
|
40
|
+
|
|
41
|
+
# Check if running on Windows (not WSL)
|
|
42
|
+
uname -s 2>/dev/null | grep -qi "mingw\|msys\|cygwin" && echo "WINDOWS_NATIVE=true" || echo "WINDOWS_NATIVE=false"
|
|
43
|
+
|
|
44
|
+
# Check current working directory — is the project on the Windows filesystem from WSL?
|
|
45
|
+
pwd | grep -q "^/mnt/c\|^/mnt/d" && echo "PROJECT_ON_WINDOWS_FS=true" || echo "PROJECT_ON_WINDOWS_FS=false"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### If on Windows (native, not WSL):
|
|
49
|
+
|
|
50
|
+
Tell the user:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
⚠️ You're running on Windows natively.
|
|
54
|
+
|
|
55
|
+
STRONGLY RECOMMENDED: Use WSL 2 (Windows Subsystem for Linux) instead.
|
|
56
|
+
|
|
57
|
+
Why this matters:
|
|
58
|
+
• HMR (hot module replacement) is 5-10x faster in WSL
|
|
59
|
+
• Playwright tests run significantly faster on native Linux
|
|
60
|
+
• File watching (nodemon, tsx watch, next dev) is dramatically more reliable
|
|
61
|
+
• Node.js filesystem operations avoid the NTFS translation layer
|
|
62
|
+
• Claude Code itself runs faster with native Linux tools (grep, find, git)
|
|
63
|
+
|
|
64
|
+
Setup (one time):
|
|
65
|
+
1. Open PowerShell as admin: wsl --install
|
|
66
|
+
2. Restart your computer
|
|
67
|
+
3. Install VS Code extension: "WSL" (ms-vscode-remote.remote-wsl)
|
|
68
|
+
4. Open VS Code → click green "><" bottom-left → "Connect to WSL"
|
|
69
|
+
5. Clone your projects INSIDE WSL: ~/projects/ (NOT /mnt/c/)
|
|
70
|
+
|
|
71
|
+
After setup, VS Code runs its backend inside WSL while the UI stays on Windows.
|
|
72
|
+
Everything just works — terminal, extensions, git, Node.js — all running natively in Linux.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### If on WSL but project is on the Windows filesystem (/mnt/c/ or /mnt/d/):
|
|
76
|
+
|
|
77
|
+
Tell the user:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
⚠️ You're on WSL but your project is on the Windows filesystem (/mnt/c/...).
|
|
81
|
+
|
|
82
|
+
This kills most WSL performance benefits. File operations between WSL and the
|
|
83
|
+
Windows filesystem go through a slow translation layer — you get the worst of
|
|
84
|
+
both worlds.
|
|
85
|
+
|
|
86
|
+
MOVE YOUR PROJECT to the native WSL filesystem:
|
|
87
|
+
mkdir -p ~/projects
|
|
88
|
+
cp -r /mnt/c/Users/you/projects/my-app ~/projects/my-app
|
|
89
|
+
cd ~/projects/my-app
|
|
90
|
+
|
|
91
|
+
Then open VS Code from WSL:
|
|
92
|
+
code .
|
|
93
|
+
|
|
94
|
+
This alone can make HMR 5-10x faster and fix unreliable file watching.
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### If on WSL with project on Linux filesystem:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
✓ WSL detected with project on native Linux filesystem — optimal setup.
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### If on macOS or native Linux:
|
|
104
|
+
|
|
105
|
+
Skip this check entirely — no action needed.
|
|
106
|
+
|
|
107
|
+
## Step 1 — Read .env.example for Categories
|
|
108
|
+
|
|
109
|
+
Read `.env.example` to understand what variables this project needs. Group them by category based on comments/sections.
|
|
110
|
+
|
|
111
|
+
## Step 2 — Interactive Configuration
|
|
112
|
+
|
|
113
|
+
Ask the user about each category. For each variable, show the current value (if set in .env) and ask if they want to change it. Skip variables that already have real values unless `--reset` was passed.
|
|
114
|
+
|
|
115
|
+
### Category: Application Basics
|
|
116
|
+
- `NODE_ENV` — Usually `development` (default, don't ask unless --reset)
|
|
117
|
+
- `PORT` — Which port? (show current value)
|
|
118
|
+
|
|
119
|
+
### Category: GitHub
|
|
120
|
+
- GitHub username — for git remote URLs and PR creation
|
|
121
|
+
- SSH or HTTPS — which auth method for git?
|
|
122
|
+
|
|
123
|
+
Ask: "What's your GitHub username?"
|
|
124
|
+
Ask: "Do you use SSH or HTTPS for git?"
|
|
125
|
+
|
|
126
|
+
### Category: Analytics (Rybbit)
|
|
127
|
+
Ask: "Do you use Rybbit analytics?" (yes/no)
|
|
128
|
+
If yes:
|
|
129
|
+
- `NEXT_PUBLIC_RYBBIT_SITE_ID` — "What's your Rybbit site ID for this project? (Find it at https://app.rybbit.io)"
|
|
130
|
+
- `NEXT_PUBLIC_RYBBIT_URL` — Default `https://app.rybbit.io`
|
|
131
|
+
|
|
132
|
+
### Category: Multi-Region
|
|
133
|
+
|
|
134
|
+
**Ask first:** "Single-server or multi-region? (Most projects use single-server.)"
|
|
135
|
+
|
|
136
|
+
Default: **single-server**. If the user picks single-server, skip to the Database category below.
|
|
137
|
+
|
|
138
|
+
If the user picks **multi-region**, show this complexity warning BEFORE proceeding:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
⚠️ Multi-region adds significant complexity:
|
|
142
|
+
|
|
143
|
+
• Separate VPS, database, and Dokploy instance PER region
|
|
144
|
+
• Suffixed environment variables (_US, _EU) for every service
|
|
145
|
+
• Region-tagged Docker images (:latest for US, :eu for EU)
|
|
146
|
+
• Region routing logic in your application code
|
|
147
|
+
• Every deployment must update ALL regions to stay in sync
|
|
148
|
+
|
|
149
|
+
Most projects don't need this. Single-server handles significant traffic
|
|
150
|
+
and you can always add regions later.
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**After showing the warning, ask:** "Continue with multi-region setup? (yes/no)"
|
|
154
|
+
|
|
155
|
+
If they say no, fall back to single-server. If they confirm yes, proceed with multi-region.
|
|
156
|
+
|
|
157
|
+
If **yes (confirmed)** — ask: "Which regions?" (default: US + EU). Then EVERY region-specific service gets its own suffixed variables. The `.env` file becomes the **region map** — Claude must ALWAYS check it to know which region is which.
|
|
158
|
+
|
|
159
|
+
**CRITICAL MULTI-REGION RULES (written to project CLAUDE.md):**
|
|
160
|
+
|
|
161
|
+
```markdown
|
|
162
|
+
## Multi-Region Architecture
|
|
163
|
+
|
|
164
|
+
This project deploys to multiple regions. EVERY region has isolated infrastructure.
|
|
165
|
+
|
|
166
|
+
### Region Map (from .env)
|
|
167
|
+
- `_US` suffix = US region (e.g., STRICTDB_URI_US, DOKPLOY_URL_US)
|
|
168
|
+
- `_EU` suffix = EU region (e.g., STRICTDB_URI_EU, DOKPLOY_URL_EU)
|
|
169
|
+
- No suffix = default/shared (e.g., DOCKER_IMAGE_NAME applies to all regions)
|
|
170
|
+
|
|
171
|
+
### ABSOLUTE RULES
|
|
172
|
+
- US containers NEVER connect to EU databases. EU containers NEVER connect to US databases.
|
|
173
|
+
- DEPLOY_REGION env var tells the container which region it's in at runtime.
|
|
174
|
+
- When deploying: ALWAYS deploy to ALL regions. Never leave them out of sync.
|
|
175
|
+
- When pushing Docker images: `:latest` for US, `:eu` tag for EU.
|
|
176
|
+
- Each region has its own Dokploy instance, its own VPS, its own database.
|
|
177
|
+
- If you're unsure which region a variable belongs to, READ .env and check the suffix.
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Category: Database
|
|
181
|
+
|
|
182
|
+
If single-region:
|
|
183
|
+
- Ask: "What database are you using?" (MongoDB / PostgreSQL / MySQL / SQLite / None)
|
|
184
|
+
- Ask for connection string (StrictDB auto-detects backend from URI scheme)
|
|
185
|
+
- Writes: `STRICTDB_URI=...`
|
|
186
|
+
|
|
187
|
+
If multi-region:
|
|
188
|
+
- Ask for EACH region's database separately:
|
|
189
|
+
- "What's the database connection string for **US**?" → `STRICTDB_URI_US`
|
|
190
|
+
- "What's the database connection string for **EU**?" → `STRICTDB_URI_EU`
|
|
191
|
+
- Offer to build from parts for each region (MongoDB example):
|
|
192
|
+
- US: username, password, cluster → `STRICTDB_URI_US=mongodb+srv://user:pass@us-cluster/dbname`
|
|
193
|
+
- EU: username, password, cluster → `STRICTDB_URI_EU=mongodb+srv://user:pass@eu-cluster/dbname`
|
|
194
|
+
|
|
195
|
+
**NEVER display connection strings back.** Just confirm "US database configured ✓" / "EU database configured ✓"
|
|
196
|
+
|
|
197
|
+
### Category: Docker
|
|
198
|
+
If the project has a Dockerfile or docker-compose.yml:
|
|
199
|
+
- `DOCKER_HUB_USER` — "What's your Docker Hub username?"
|
|
200
|
+
- `DOCKER_IMAGE_NAME` — Suggest `<docker-user>/<project-name>` (shared across regions)
|
|
201
|
+
|
|
202
|
+
If multi-region, explain the tagging convention:
|
|
203
|
+
```
|
|
204
|
+
US deployment: docker push $DOCKER_IMAGE_NAME:latest
|
|
205
|
+
EU deployment: docker tag $DOCKER_IMAGE_NAME:latest $DOCKER_IMAGE_NAME:eu && docker push $DOCKER_IMAGE_NAME:eu
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Category: Deployment (Dokploy / Hostinger VPS)
|
|
209
|
+
|
|
210
|
+
Ask: "Are you using Dokploy on Hostinger VPS for deployment?" (yes/no)
|
|
211
|
+
|
|
212
|
+
If single-region:
|
|
213
|
+
- `DOKPLOY_URL` — "What's your Dokploy URL? (e.g., http://your-vps-ip:3000/api)"
|
|
214
|
+
- `DOKPLOY_API_KEY` — "What's your Dokploy API key?"
|
|
215
|
+
- `DOKPLOY_APP_ID` — "What's your Dokploy application ID?"
|
|
216
|
+
- `DOKPLOY_REFRESH_TOKEN` — "What's your webhook refresh token? (for automated deploys)"
|
|
217
|
+
- `VPS_IP` — "What's your Hostinger VPS IP address?"
|
|
218
|
+
|
|
219
|
+
If multi-region — ask for EACH region separately:
|
|
220
|
+
|
|
221
|
+
**US Region:**
|
|
222
|
+
- `VPS_IP_US` — "What's your US Hostinger VPS IP?"
|
|
223
|
+
- `DOKPLOY_URL_US` — Auto-suggest `http://<VPS_IP_US>:3000/api`
|
|
224
|
+
- `DOKPLOY_API_KEY_US` — "Dokploy API key for US?"
|
|
225
|
+
- `DOKPLOY_APP_ID_US` — "Dokploy application ID for US?"
|
|
226
|
+
- `DOKPLOY_REFRESH_TOKEN_US` — "Webhook refresh token for US?"
|
|
227
|
+
|
|
228
|
+
**EU Region:**
|
|
229
|
+
- `VPS_IP_EU` — "What's your EU Hostinger VPS IP?"
|
|
230
|
+
- `DOKPLOY_URL_EU` — Auto-suggest `http://<VPS_IP_EU>:3000/api`
|
|
231
|
+
- `DOKPLOY_API_KEY_EU` — "Dokploy API key for EU?"
|
|
232
|
+
- `DOKPLOY_APP_ID_EU` — "Dokploy application ID for EU?"
|
|
233
|
+
- `DOKPLOY_REFRESH_TOKEN_EU` — "Webhook refresh token for EU?"
|
|
234
|
+
|
|
235
|
+
After collecting, explain:
|
|
236
|
+
```
|
|
237
|
+
Region routing:
|
|
238
|
+
US VPS (<VPS_IP_US>) → Dokploy US → pulls :latest → connects to STRICTDB_URI_US
|
|
239
|
+
EU VPS (<VPS_IP_EU>) → Dokploy EU → pulls :eu → connects to STRICTDB_URI_EU
|
|
240
|
+
|
|
241
|
+
Each container gets DEPLOY_REGION=us or DEPLOY_REGION=eu at runtime.
|
|
242
|
+
The app reads DEPLOY_REGION and picks the right database URI.
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Category: RuleCatch
|
|
246
|
+
Ask: "Do you use RuleCatch for AI monitoring?" (yes/no)
|
|
247
|
+
If yes:
|
|
248
|
+
- `RULECATCH_API_KEY` — "What's your RuleCatch API key? (starts with dc_)"
|
|
249
|
+
- `RULECATCH_REGION` — "Which region?" (us / eu)
|
|
250
|
+
|
|
251
|
+
### Category: Authentication
|
|
252
|
+
If `JWT_SECRET` is in .env.example:
|
|
253
|
+
- Offer to generate a random JWT secret: `node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"`
|
|
254
|
+
- Or let the user provide their own
|
|
255
|
+
|
|
256
|
+
### Category: Other Variables
|
|
257
|
+
For any remaining variables in `.env.example` that weren't covered above:
|
|
258
|
+
- Show the variable name and placeholder value
|
|
259
|
+
- Ask for the real value
|
|
260
|
+
|
|
261
|
+
## Step 3 — Write .env
|
|
262
|
+
|
|
263
|
+
Write all configured values to `.env`. Format with category comments matching `.env.example`.
|
|
264
|
+
|
|
265
|
+
**CRITICAL RULES:**
|
|
266
|
+
- NEVER display secrets back to the user after they enter them
|
|
267
|
+
- NEVER commit the .env file
|
|
268
|
+
- Confirm .env is in .gitignore after writing
|
|
269
|
+
- Show a summary of what was configured (category names only, NOT values)
|
|
270
|
+
|
|
271
|
+
## Step 4 — Update .env.example
|
|
272
|
+
|
|
273
|
+
If the user added any NEW variables that aren't in `.env.example`, add them with placeholder values so the template stays in sync.
|
|
274
|
+
|
|
275
|
+
## Step 5 — Write Multi-Region Rules to CLAUDE.md
|
|
276
|
+
|
|
277
|
+
If multi-region was selected, append the multi-region architecture rules (from the Category section above) to the project's `CLAUDE.md`. This ensures Claude ALWAYS knows the region map for this project.
|
|
278
|
+
|
|
279
|
+
Also write a region reference comment block at the top of `.env`:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
# ==========================================
|
|
283
|
+
# REGION MAP
|
|
284
|
+
# ==========================================
|
|
285
|
+
# _US suffix = US region infrastructure
|
|
286
|
+
# _EU suffix = EU region infrastructure
|
|
287
|
+
# No suffix = shared across all regions
|
|
288
|
+
#
|
|
289
|
+
# US: VPS_IP_US → DOKPLOY_URL_US → STRICTDB_URI_US
|
|
290
|
+
# EU: VPS_IP_EU → DOKPLOY_URL_EU → STRICTDB_URI_EU
|
|
291
|
+
# ==========================================
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## Step 6 — Report
|
|
295
|
+
|
|
296
|
+
**Single-region report:**
|
|
297
|
+
```
|
|
298
|
+
Project Setup Complete
|
|
299
|
+
======================
|
|
300
|
+
✓ Application basics (NODE_ENV, PORT)
|
|
301
|
+
✓ GitHub (username: <username>)
|
|
302
|
+
✓ Analytics (Rybbit configured)
|
|
303
|
+
✓ Database (connected via StrictDB)
|
|
304
|
+
✓ Docker (image: <user>/<project>)
|
|
305
|
+
✓ Deployment (Dokploy on Hostinger)
|
|
306
|
+
✓ RuleCatch (region: us)
|
|
307
|
+
✗ Multi-region (single region)
|
|
308
|
+
|
|
309
|
+
.env is gitignored: ✓
|
|
310
|
+
.env.example updated: ✓
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
**Multi-region report:**
|
|
314
|
+
```
|
|
315
|
+
Project Setup Complete
|
|
316
|
+
======================
|
|
317
|
+
✓ Application basics (NODE_ENV, PORT)
|
|
318
|
+
✓ GitHub (username: <username>)
|
|
319
|
+
✓ Analytics (Rybbit configured)
|
|
320
|
+
✓ Multi-region (US + EU)
|
|
321
|
+
✓ Database US (connected via StrictDB)
|
|
322
|
+
✓ Database EU (connected via StrictDB)
|
|
323
|
+
✓ Docker (image: <user>/<project>, tags: :latest for US, :eu for EU)
|
|
324
|
+
✓ Deployment US (Dokploy on Hostinger — <VPS_IP_US>)
|
|
325
|
+
✓ Deployment EU (Dokploy on Hostinger — <VPS_IP_EU>)
|
|
326
|
+
✓ RuleCatch (region: us)
|
|
327
|
+
|
|
328
|
+
Region routing:
|
|
329
|
+
US: <VPS_IP_US> → Dokploy US → :latest → STRICTDB_URI_US
|
|
330
|
+
EU: <VPS_IP_EU> → Dokploy EU → :eu → STRICTDB_URI_EU
|
|
331
|
+
|
|
332
|
+
.env is gitignored: ✓
|
|
333
|
+
.env.example updated: ✓
|
|
334
|
+
CLAUDE.md updated with region map: ✓
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
Show ✓ for configured categories, ✗ for skipped ones.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Open the comprehensive User Guide in your browser
|
|
3
|
+
scope: project
|
|
4
|
+
allowed-tools: Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Open the User Guide for the Claude Code Mastery Project Starter Kit.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. **Check for the HTML file** at `docs/user-guide.html` in the project root.
|
|
12
|
+
|
|
13
|
+
2. **Open in browser** — try the GitHub Pages URL first, fall back to local file:
|
|
14
|
+
|
|
15
|
+
**Primary (online):**
|
|
16
|
+
```
|
|
17
|
+
https://thedecipherist.github.io/claude-code-mastery-project-starter-kit/user-guide.html
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Fallback (local):**
|
|
21
|
+
```
|
|
22
|
+
docs/user-guide.html
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. **Detect the environment** and use the correct open command:
|
|
26
|
+
- **WSL:** `wslview <url>`
|
|
27
|
+
- **macOS:** `open <url>`
|
|
28
|
+
- **Linux:** `xdg-open <url>`
|
|
29
|
+
|
|
30
|
+
4. **Also mention** the markdown version is available at `USER_GUIDE.md` in the project root for reading directly in GitHub or a text editor.
|
|
31
|
+
|
|
32
|
+
## Detection Logic
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Detect platform and open URL
|
|
36
|
+
URL="https://thedecipherist.github.io/claude-code-mastery-project-starter-kit/user-guide.html"
|
|
37
|
+
LOCAL="docs/user-guide.html"
|
|
38
|
+
|
|
39
|
+
if grep -qi microsoft /proc/version 2>/dev/null; then
|
|
40
|
+
# WSL
|
|
41
|
+
wslview "$URL" 2>/dev/null || wslview "$LOCAL" 2>/dev/null || echo "Could not open browser. Visit: $URL"
|
|
42
|
+
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
|
43
|
+
# macOS
|
|
44
|
+
open "$URL" 2>/dev/null || open "$LOCAL" 2>/dev/null || echo "Could not open browser. Visit: $URL"
|
|
45
|
+
else
|
|
46
|
+
# Linux
|
|
47
|
+
xdg-open "$URL" 2>/dev/null || xdg-open "$LOCAL" 2>/dev/null || echo "Could not open browser. Visit: $URL"
|
|
48
|
+
fi
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Output
|
|
52
|
+
|
|
53
|
+
After opening, tell the user:
|
|
54
|
+
|
|
55
|
+
> User Guide opened in your browser.
|
|
56
|
+
> - **Online:** https://thedecipherist.github.io/claude-code-mastery-project-starter-kit/user-guide.html
|
|
57
|
+
> - **Markdown:** `USER_GUIDE.md` (project root)
|
|
58
|
+
> - **Tip:** Use `/help` to see all available commands at any time.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Manage the @claude-code-mastery/starter-kit installation — update, check status, or add to the current project."
|
|
3
|
+
scope: project
|
|
4
|
+
argument-hint: "update | status | add"
|
|
5
|
+
allowed-tools: Bash, Read, Write, Edit, AskUserQuestion
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /starter-kit
|
|
9
|
+
|
|
10
|
+
Manage the globally installed @claude-code-mastery/starter-kit.
|
|
11
|
+
|
|
12
|
+
The kit is installed in `~/.claude/starter-kit/`. Commands and skills are symlinked from there into `~/.claude/commands/` and `~/.claude/skills/`, so updating the starter-kit directory instantly updates everything without needing to re-symlink.
|
|
13
|
+
|
|
14
|
+
## Detect subcommand
|
|
15
|
+
|
|
16
|
+
Read the user's argument: **$ARGUMENTS**
|
|
17
|
+
|
|
18
|
+
- `update` → run Update flow below
|
|
19
|
+
- `status` → run Status flow below
|
|
20
|
+
- `add` → run Add flow below
|
|
21
|
+
- empty or unrecognised → show usage
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Update flow
|
|
26
|
+
|
|
27
|
+
Check whether npm is available, then run:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx @claude-code-mastery/starter-kit update
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
This overwrites `~/.claude/starter-kit/` with the latest published version, symlinks any new commands or skills that were added, and registers any new hooks in `~/.claude/settings.json`.
|
|
34
|
+
|
|
35
|
+
After the command completes, report the version that is now installed:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cat ~/.claude/starter-kit/version
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Tell the user: "✅ Starter kit updated to v<version>. New commands and hooks are active immediately."
|
|
42
|
+
|
|
43
|
+
If npm / npx is not available, tell the user to install Node.js from https://nodejs.org and then run `npx @claude-code-mastery/starter-kit update` in their terminal.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Status flow
|
|
48
|
+
|
|
49
|
+
Check the installed version and compare with the registry:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx @claude-code-mastery/starter-kit status
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Show the output to the user as-is. If the kit is not installed, tell the user to run `npx @claude-code-mastery/starter-kit init` from any terminal to install it.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Add flow
|
|
60
|
+
|
|
61
|
+
Install the starter kit into the **current project's** `.claude/` directory. This is the project-level equivalent of the global install — it gives the project its own copy of commands, hooks, and skills that Claude Code picks up automatically.
|
|
62
|
+
|
|
63
|
+
Steps:
|
|
64
|
+
1. Check whether `~/.claude/starter-kit/` exists. If not, tell the user to run the global install first: `npx @claude-code-mastery/starter-kit init`
|
|
65
|
+
2. Check whether `.claude/` already exists in the current project:
|
|
66
|
+
- If it does, ask the user: "`.claude/` already exists in this project. Merge the starter-kit files in? Existing files with matching names will NOT be overwritten." (yes / no)
|
|
67
|
+
- If no: stop.
|
|
68
|
+
3. Copy from `~/.claude/starter-kit/` into `.claude/`:
|
|
69
|
+
```bash
|
|
70
|
+
cp -rn ~/.claude/starter-kit/commands/ .claude/commands/
|
|
71
|
+
cp -rn ~/.claude/starter-kit/hooks/ .claude/hooks/
|
|
72
|
+
cp -rn ~/.claude/starter-kit/skills/ .claude/skills/
|
|
73
|
+
```
|
|
74
|
+
(`-n` = no-clobber: never overwrites existing files)
|
|
75
|
+
4. If `.claude/settings.json` does not exist in the project, copy from the starter-kit:
|
|
76
|
+
```bash
|
|
77
|
+
cp ~/.claude/starter-kit/settings.json .claude/settings.json
|
|
78
|
+
```
|
|
79
|
+
If it does exist, remind the user to manually merge the hook entries from `~/.claude/starter-kit/settings.json` if needed.
|
|
80
|
+
5. Report: "✅ Starter kit added to this project's .claude/ directory. Commands and hooks are active for this project."
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Usage (when no subcommand given)
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
/starter-kit update — update to latest version from npm
|
|
88
|
+
/starter-kit status — show installed version vs latest
|
|
89
|
+
/starter-kit add — add kit to current project's .claude/
|
|
90
|
+
```
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate a structured test plan for a feature
|
|
3
|
+
scope: project
|
|
4
|
+
argument-hint: <feature-name>
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Test Plan Generator
|
|
8
|
+
|
|
9
|
+
Create a structured test plan for: **$ARGUMENTS**
|
|
10
|
+
|
|
11
|
+
## Auto-Branch (if on main)
|
|
12
|
+
|
|
13
|
+
Before creating test plan files, check the current branch:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git branch --show-current
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Default behavior** (`auto_branch = true` in `claude-mastery-project.conf`):
|
|
20
|
+
- If on `main` or `master`: automatically create a feature branch and switch to it:
|
|
21
|
+
```bash
|
|
22
|
+
git checkout -b test/<feature-name>-plan
|
|
23
|
+
```
|
|
24
|
+
Report: "Created branch `test/<feature>-plan` — main stays untouched."
|
|
25
|
+
- If already on a feature branch: proceed
|
|
26
|
+
- If not a git repo: skip this check
|
|
27
|
+
|
|
28
|
+
**To disable:** Set `auto_branch = false` in `claude-mastery-project.conf`. When disabled, warn and ask the user before proceeding on main.
|
|
29
|
+
|
|
30
|
+
## Template
|
|
31
|
+
|
|
32
|
+
Generate the following markdown document:
|
|
33
|
+
|
|
34
|
+
```markdown
|
|
35
|
+
# [Feature] Test Plan
|
|
36
|
+
|
|
37
|
+
**Created:** [today's date]
|
|
38
|
+
**Feature:** $ARGUMENTS
|
|
39
|
+
**Status:** ⬜ Not Started
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Quick Status
|
|
44
|
+
|
|
45
|
+
Feature Area A: ⬜ NOT TESTED
|
|
46
|
+
Feature Area B: ⬜ NOT TESTED
|
|
47
|
+
Feature Area C: ⬜ NOT TESTED
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Prerequisites
|
|
52
|
+
|
|
53
|
+
- [ ] Required services running
|
|
54
|
+
- [ ] Test data created
|
|
55
|
+
- [ ] Environment variables set
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Test 1: [Happy Path]
|
|
60
|
+
|
|
61
|
+
### 1.1 [Core scenario]
|
|
62
|
+
|
|
63
|
+
**Action:** [What to do]
|
|
64
|
+
**Expected:** [What should happen — be SPECIFIC]
|
|
65
|
+
|
|
66
|
+
| Check | Expected | Actual | Status |
|
|
67
|
+
|-------|----------|--------|--------|
|
|
68
|
+
| Response code | 200 | | ⬜ |
|
|
69
|
+
| Data returned | [specific shape] | | ⬜ |
|
|
70
|
+
| UI updated | [specific change] | | ⬜ |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Test 2: [Error Cases]
|
|
75
|
+
|
|
76
|
+
### 2.1 [Invalid input]
|
|
77
|
+
|
|
78
|
+
**Action:** [What to do]
|
|
79
|
+
**Expected:** [Specific error message/behavior]
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Test 3: [Edge Cases]
|
|
84
|
+
|
|
85
|
+
### 3.1 [Empty state]
|
|
86
|
+
### 3.2 [Maximum values]
|
|
87
|
+
### 3.3 [Concurrent access]
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Pass/Fail Criteria
|
|
92
|
+
|
|
93
|
+
| Criteria | Pass | Fail |
|
|
94
|
+
|----------|------|------|
|
|
95
|
+
| All happy paths work | Yes | Any failure |
|
|
96
|
+
| Error messages shown | Yes | Silent failure |
|
|
97
|
+
| Data persists | Yes | Lost on refresh |
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Sign-Off
|
|
102
|
+
|
|
103
|
+
| Test | Tester | Date | Status |
|
|
104
|
+
|------|--------|------|--------|
|
|
105
|
+
| Test 1 | | | ⬜ |
|
|
106
|
+
| Test 2 | | | ⬜ |
|
|
107
|
+
| Test 3 | | | ⬜ |
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Save to `tests/plans/[feature-name]-test-plan.md`
|
|
111
|
+
|
|
112
|
+
## RuleCatch Report
|
|
113
|
+
|
|
114
|
+
After saving the test plan, check RuleCatch:
|
|
115
|
+
|
|
116
|
+
- If the RuleCatch MCP server is available: query for violations related to testing in the project
|
|
117
|
+
- Report any violations found (missing test coverage, untested features, etc.)
|
|
118
|
+
- If no MCP: suggest checking the RuleCatch dashboard
|