claude-code-starter 0.1.2 → 0.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/README.md +324 -14
- package/dist/cli.js +2458 -154
- package/package.json +14 -3
- package/templates/CLAUDE.md +0 -32
- package/templates/commands/analyze.md +0 -49
- package/templates/commands/done.md +0 -44
- package/templates/commands/status.md +0 -36
- package/templates/commands/task.md +0 -53
- package/templates/settings.json +0 -33
- package/templates/skills/pattern-discovery.md +0 -67
- package/templates/skills/systematic-debugging.md +0 -119
- package/templates/skills/testing-methodology.md +0 -112
- package/templates/state/task.md +0 -13
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Claude Code Starter
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Intelligent CLI that bootstraps Claude Code configurations tailored to your project's tech stack.
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
@@ -12,27 +12,251 @@ claude
|
|
|
12
12
|
|
|
13
13
|
## What It Does
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
1. **Analyzes your repository** - Detects languages, frameworks, tools, and patterns
|
|
16
|
+
2. **Generates tailored configurations** - Creates skills, agents, and rules for your stack
|
|
17
|
+
3. **Sets up development workflow** - Task tracking, commands, and methodology guides
|
|
18
|
+
|
|
19
|
+
## Tech Stack Detection
|
|
20
|
+
|
|
21
|
+
Automatically detects and configures for:
|
|
22
|
+
|
|
23
|
+
| Category | Detected |
|
|
24
|
+
| -------------- | ------------------------------------------------------------------- |
|
|
25
|
+
| **Languages** | TypeScript, JavaScript, Python, Go, Rust, Java, Ruby, and more |
|
|
26
|
+
| **Frameworks** | Next.js, React, Vue, Svelte, FastAPI, Django, NestJS, Express, etc. |
|
|
27
|
+
| **Tools** | npm, yarn, pnpm, bun, pip, cargo, go modules |
|
|
28
|
+
| **Testing** | Jest, Vitest, Pytest, Go test, Rust test |
|
|
29
|
+
| **Linting** | ESLint, Biome, Ruff, Pylint |
|
|
30
|
+
|
|
31
|
+
## Generated Configurations
|
|
32
|
+
|
|
33
|
+
Based on your stack, creates:
|
|
34
|
+
|
|
35
|
+
- **📚 Skills** - Framework-specific patterns (e.g., Next.js App Router, FastAPI endpoints)
|
|
36
|
+
- **🤖 Agents** - Specialized assistants (code reviewer, test writer)
|
|
37
|
+
- **📏 Rules** - Language conventions (TypeScript strict mode, Python PEP 8)
|
|
38
|
+
- **⚡ Commands** - Workflow shortcuts (`/task`, `/status`, `/done`, `/analyze`)
|
|
20
39
|
|
|
21
40
|
## Commands
|
|
22
41
|
|
|
23
|
-
| Command
|
|
24
|
-
|
|
25
|
-
| `/task <desc>`
|
|
26
|
-
| `/status`
|
|
27
|
-
| `/done`
|
|
42
|
+
| Command | Description |
|
|
43
|
+
| ----------------- | ------------------- |
|
|
44
|
+
| `/task <desc>` | Start a new task |
|
|
45
|
+
| `/status` | Show current task |
|
|
46
|
+
| `/done` | Mark task complete |
|
|
28
47
|
| `/analyze <area>` | Deep dive into code |
|
|
29
48
|
|
|
30
|
-
## Options
|
|
49
|
+
## CLI Options
|
|
31
50
|
|
|
32
51
|
```bash
|
|
33
|
-
npx claude-code-starter
|
|
34
|
-
npx claude-code-starter
|
|
52
|
+
npx claude-code-starter # Interactive mode
|
|
53
|
+
npx claude-code-starter -y # Non-interactive (use defaults)
|
|
54
|
+
npx claude-code-starter -f # Force overwrite existing files
|
|
55
|
+
npx claude-code-starter -V # Verbose output
|
|
56
|
+
npx claude-code-starter --help # Show help
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Example Output
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
╔═══════════════════════════════════╗
|
|
63
|
+
║ Claude Code Starter ║
|
|
64
|
+
║ AI-Assisted Development Setup ║
|
|
65
|
+
╚═══════════════════════════════════╝
|
|
66
|
+
|
|
67
|
+
🔍 Analyzing repository...
|
|
68
|
+
|
|
69
|
+
📊 Tech Stack Analysis
|
|
70
|
+
Language: TypeScript
|
|
71
|
+
Framework: Next.js
|
|
72
|
+
Package Manager: bun
|
|
73
|
+
Testing: vitest
|
|
74
|
+
|
|
75
|
+
✅ Configuration complete! (14 files)
|
|
76
|
+
|
|
77
|
+
Generated for your stack:
|
|
78
|
+
📚 4 skills (pattern-discovery, testing-methodology, nextjs-patterns, ...)
|
|
79
|
+
🤖 2 agents (code-reviewer, test-writer)
|
|
80
|
+
📏 2 rules
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Project Structure
|
|
84
|
+
|
|
85
|
+
After running, your project will have:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
.claude/
|
|
89
|
+
├── CLAUDE.md # Project-specific instructions
|
|
90
|
+
├── settings.json # Permissions configuration
|
|
91
|
+
├── agents/ # Specialized AI agents
|
|
92
|
+
│ ├── code-reviewer.md
|
|
93
|
+
│ └── test-writer.md
|
|
94
|
+
├── commands/ # Slash commands
|
|
95
|
+
│ ├── task.md
|
|
96
|
+
│ ├── status.md
|
|
97
|
+
│ ├── done.md
|
|
98
|
+
│ └── analyze.md
|
|
99
|
+
├── rules/ # Code style rules
|
|
100
|
+
│ ├── typescript.md # (or python.md, etc.)
|
|
101
|
+
│ └── code-style.md
|
|
102
|
+
├── skills/ # Framework-specific patterns
|
|
103
|
+
│ ├── pattern-discovery.md
|
|
104
|
+
│ ├── systematic-debugging.md
|
|
105
|
+
│ ├── testing-methodology.md
|
|
106
|
+
│ └── nextjs-patterns.md # (or fastapi-patterns.md, etc.)
|
|
107
|
+
└── state/
|
|
108
|
+
└── task.md # Current task tracking
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## How It Works
|
|
112
|
+
|
|
113
|
+
### Architecture
|
|
114
|
+
|
|
115
|
+
```mermaid
|
|
116
|
+
flowchart LR
|
|
117
|
+
A[CLI] --> B[Analyzer]
|
|
118
|
+
B --> C[Generator]
|
|
119
|
+
C --> D[.claude/]
|
|
120
|
+
|
|
121
|
+
B -->|reads| E[package.json]
|
|
122
|
+
B -->|reads| F[config files]
|
|
123
|
+
B -->|reads| G[lock files]
|
|
124
|
+
|
|
125
|
+
C -->|creates| H[skills/]
|
|
126
|
+
C -->|creates| I[agents/]
|
|
127
|
+
C -->|creates| J[rules/]
|
|
128
|
+
C -->|creates| K[commands/]
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Artifact Generation
|
|
132
|
+
|
|
133
|
+
All artifacts are **generated dynamically** based on your detected tech stack. There are no static templates - content is created specifically for your project.
|
|
134
|
+
|
|
135
|
+
| Artifact Type | Generation Logic |
|
|
136
|
+
|---------------|------------------|
|
|
137
|
+
| **CLAUDE.md** | Generated with project name, description, and detected stack |
|
|
138
|
+
| **settings.json** | Generated with safe default permissions |
|
|
139
|
+
| **Skills** | Core skills + framework-specific patterns (if detected) |
|
|
140
|
+
| **Agents** | Code reviewer and test writer agents |
|
|
141
|
+
| **Rules** | Language-specific conventions + general code style |
|
|
142
|
+
| **Commands** | Task workflow commands (/task, /status, /done, /analyze) |
|
|
143
|
+
|
|
144
|
+
### Conflict Resolution
|
|
145
|
+
|
|
146
|
+
When running on an existing project with `.claude/` configuration:
|
|
147
|
+
|
|
148
|
+
| Scenario | Behavior |
|
|
149
|
+
|----------|----------|
|
|
150
|
+
| **New file** | Created |
|
|
151
|
+
| **Existing file** | Skipped (preserved) |
|
|
152
|
+
| **With `-f` flag** | Overwritten |
|
|
153
|
+
| **state/task.md** | Always preserved |
|
|
154
|
+
|
|
155
|
+
### Detection Sources
|
|
156
|
+
|
|
157
|
+
The CLI examines these files to detect your stack:
|
|
158
|
+
|
|
159
|
+
| Source | Detects |
|
|
160
|
+
|--------|---------|
|
|
161
|
+
| `package.json` | JS/TS frameworks, testing, linting |
|
|
162
|
+
| `pyproject.toml` / `requirements.txt` | Python frameworks, tools |
|
|
163
|
+
| `go.mod` | Go and its web frameworks |
|
|
164
|
+
| `Cargo.toml` | Rust and its frameworks |
|
|
165
|
+
| `*.lockfile` | Package manager (bun.lockb, yarn.lock, etc.) |
|
|
166
|
+
| `.github/workflows/` | CI/CD platform |
|
|
167
|
+
| Config files | Linters, formatters, bundlers |
|
|
168
|
+
|
|
169
|
+
### Framework-Specific Patterns
|
|
170
|
+
|
|
171
|
+
When a framework is detected, additional skills are generated:
|
|
172
|
+
|
|
173
|
+
| Framework | Generated Skill |
|
|
174
|
+
|-----------|-----------------|
|
|
175
|
+
| Next.js | `nextjs-patterns.md` - App Router, Server Components |
|
|
176
|
+
| React | `react-components.md` - Hooks, component patterns |
|
|
177
|
+
| FastAPI | `fastapi-patterns.md` - Async endpoints, Pydantic |
|
|
178
|
+
| NestJS | `nestjs-patterns.md` - Modules, decorators, DI |
|
|
179
|
+
|
|
180
|
+
### Artifact Examples
|
|
181
|
+
|
|
182
|
+
<details>
|
|
183
|
+
<summary><b>📚 Skill Example</b> (pattern-discovery.md)</summary>
|
|
184
|
+
|
|
185
|
+
```markdown
|
|
186
|
+
---
|
|
187
|
+
description: "Systematic approach to discovering patterns in unfamiliar codebases"
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
# Pattern Discovery
|
|
191
|
+
|
|
192
|
+
## When to Use
|
|
193
|
+
- Starting work on unfamiliar code
|
|
194
|
+
- Investigating "how does X work here?"
|
|
195
|
+
- Before making changes to existing systems
|
|
196
|
+
|
|
197
|
+
## Approach
|
|
198
|
+
1. Find entry points (main, index, app)
|
|
199
|
+
2. Trace data flow through the system
|
|
200
|
+
3. Identify naming conventions
|
|
201
|
+
4. Map directory structure to responsibilities
|
|
202
|
+
```
|
|
203
|
+
</details>
|
|
204
|
+
|
|
205
|
+
<details>
|
|
206
|
+
<summary><b>🤖 Agent Example</b> (code-reviewer.md)</summary>
|
|
207
|
+
|
|
208
|
+
```markdown
|
|
209
|
+
---
|
|
210
|
+
name: "Code Reviewer"
|
|
211
|
+
description: "Reviews code for quality, patterns, and potential issues"
|
|
212
|
+
model: "sonnet"
|
|
213
|
+
tools: ["Read", "Glob", "Grep"]
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
# Code Reviewer Agent
|
|
217
|
+
|
|
218
|
+
You are a code reviewer focused on:
|
|
219
|
+
- Code quality and readability
|
|
220
|
+
- Potential bugs and edge cases
|
|
221
|
+
- Performance considerations
|
|
222
|
+
- Security vulnerabilities
|
|
223
|
+
```
|
|
224
|
+
</details>
|
|
225
|
+
|
|
226
|
+
<details>
|
|
227
|
+
<summary><b>📏 Rule Example</b> (typescript.md)</summary>
|
|
228
|
+
|
|
229
|
+
```markdown
|
|
230
|
+
---
|
|
231
|
+
paths: ["**/*.ts", "**/*.tsx"]
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
# TypeScript Conventions
|
|
235
|
+
|
|
236
|
+
- Use strict mode (`"strict": true`)
|
|
237
|
+
- Prefer `interface` over `type` for object shapes
|
|
238
|
+
- Use explicit return types on exported functions
|
|
239
|
+
- Avoid `any`, prefer `unknown` for truly unknown types
|
|
35
240
|
```
|
|
241
|
+
</details>
|
|
242
|
+
|
|
243
|
+
<details>
|
|
244
|
+
<summary><b>⚡ Command Example</b> (task.md)</summary>
|
|
245
|
+
|
|
246
|
+
```markdown
|
|
247
|
+
---
|
|
248
|
+
description: "Start or switch to a new task"
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
# /task
|
|
252
|
+
|
|
253
|
+
Update `.claude/state/task.md` with:
|
|
254
|
+
- Task description from user input
|
|
255
|
+
- Status: In Progress
|
|
256
|
+
- Empty decisions/notes sections
|
|
257
|
+
- Clear next steps
|
|
258
|
+
```
|
|
259
|
+
</details>
|
|
36
260
|
|
|
37
261
|
## Tip
|
|
38
262
|
|
|
@@ -43,6 +267,92 @@ echo ".claude/" >> ~/.gitignore
|
|
|
43
267
|
git config --global core.excludesfile ~/.gitignore
|
|
44
268
|
```
|
|
45
269
|
|
|
270
|
+
## CI/CD
|
|
271
|
+
|
|
272
|
+
This project uses GitHub Actions for continuous integration and automated releases.
|
|
273
|
+
|
|
274
|
+
### PR Checks (`.github/workflows/pr-check.yml`)
|
|
275
|
+
|
|
276
|
+
Every pull request targeting `main` runs:
|
|
277
|
+
|
|
278
|
+
| Check | Description |
|
|
279
|
+
|-------|-------------|
|
|
280
|
+
| **Lint** | Biome lint and format validation |
|
|
281
|
+
| **Type Check** | TypeScript compilation check |
|
|
282
|
+
| **Unit Tests** | Full test suite with Bun |
|
|
283
|
+
| **Code Quality** | Checks for console.log, `any` types, skipped tests |
|
|
284
|
+
| **Build** | Verifies package builds successfully |
|
|
285
|
+
| **Package Size** | Reports bundle size (warns if > 500KB) |
|
|
286
|
+
|
|
287
|
+
### Automated Releases (`.github/workflows/release.yml`)
|
|
288
|
+
|
|
289
|
+
When code is merged to `main`, semantic-release automatically:
|
|
290
|
+
|
|
291
|
+
1. Analyzes commit messages (conventional commits)
|
|
292
|
+
2. Determines version bump (major/minor/patch)
|
|
293
|
+
3. Updates `package.json` version
|
|
294
|
+
4. Generates `CHANGELOG.md`
|
|
295
|
+
5. Creates GitHub release with notes
|
|
296
|
+
6. Publishes to npm registry
|
|
297
|
+
|
|
298
|
+
### Conventional Commits
|
|
299
|
+
|
|
300
|
+
Use these prefixes for automatic versioning:
|
|
301
|
+
|
|
302
|
+
| Prefix | Version Bump | Example |
|
|
303
|
+
|--------|--------------|---------|
|
|
304
|
+
| `feat:` | Minor | `feat: add dark mode support` |
|
|
305
|
+
| `fix:` | Patch | `fix: resolve memory leak` |
|
|
306
|
+
| `perf:` | Patch | `perf: optimize image loading` |
|
|
307
|
+
| `BREAKING CHANGE:` | Major | `feat!: redesign API` |
|
|
308
|
+
| `docs:`, `chore:`, `ci:` | No release | `docs: update README` |
|
|
309
|
+
|
|
310
|
+
### Required Secrets
|
|
311
|
+
|
|
312
|
+
Configure these in your GitHub repository settings:
|
|
313
|
+
|
|
314
|
+
| Secret | Description | Required For |
|
|
315
|
+
|--------|-------------|--------------|
|
|
316
|
+
| `NPM_TOKEN` | npm authentication token | Publishing to npm |
|
|
317
|
+
| `GITHUB_TOKEN` | Auto-provided by GitHub | Creating releases |
|
|
318
|
+
|
|
319
|
+
To create an npm token:
|
|
320
|
+
1. Go to [npmjs.com](https://npmjs.com) → Access Tokens
|
|
321
|
+
2. Generate a new "Automation" token
|
|
322
|
+
3. Add it as `NPM_TOKEN` in GitHub repo → Settings → Secrets
|
|
323
|
+
|
|
324
|
+
### Branch Protection (Recommended)
|
|
325
|
+
|
|
326
|
+
Configure these settings for the `main` branch:
|
|
327
|
+
|
|
328
|
+
- ✅ Require a pull request before merging
|
|
329
|
+
- ✅ Require status checks to pass before merging
|
|
330
|
+
- Required checks: `lint`, `typecheck`, `test`, `build`, `pr-check-complete`
|
|
331
|
+
- ✅ Require branches to be up to date before merging
|
|
332
|
+
- ✅ Do not allow bypassing the above settings
|
|
333
|
+
|
|
334
|
+
## Development
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
# Install dependencies
|
|
338
|
+
bun install
|
|
339
|
+
|
|
340
|
+
# Run in development mode
|
|
341
|
+
bun run dev
|
|
342
|
+
|
|
343
|
+
# Run tests
|
|
344
|
+
bun test
|
|
345
|
+
|
|
346
|
+
# Build
|
|
347
|
+
bun run build
|
|
348
|
+
|
|
349
|
+
# Lint
|
|
350
|
+
bun run lint
|
|
351
|
+
|
|
352
|
+
# Type check
|
|
353
|
+
bun run typecheck
|
|
354
|
+
```
|
|
355
|
+
|
|
46
356
|
## License
|
|
47
357
|
|
|
48
358
|
MIT
|