@kennethsolomon/shipkit 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/README.md +321 -0
- package/bin/shipkit.js +146 -0
- package/commands/sk/brainstorm.md +63 -0
- package/commands/sk/branch.md +35 -0
- package/commands/sk/config.md +96 -0
- package/commands/sk/execute-plan.md +85 -0
- package/commands/sk/features.md +238 -0
- package/commands/sk/finish-feature.md +154 -0
- package/commands/sk/help.md +103 -0
- package/commands/sk/hotfix.md +61 -0
- package/commands/sk/plan.md +30 -0
- package/commands/sk/release.md +72 -0
- package/commands/sk/security-check.md +188 -0
- package/commands/sk/set-profile.md +71 -0
- package/commands/sk/status.md +25 -0
- package/commands/sk/update-task.md +35 -0
- package/commands/sk/write-plan.md +72 -0
- package/package.json +23 -0
- package/skills/sk:accessibility/LICENSE.txt +177 -0
- package/skills/sk:accessibility/SKILL.md +150 -0
- package/skills/sk:api-design/LICENSE.txt +177 -0
- package/skills/sk:api-design/SKILL.md +158 -0
- package/skills/sk:brainstorming/SKILL.md +124 -0
- package/skills/sk:debug/SKILL.md +252 -0
- package/skills/sk:debug/debug_conductor.py +177 -0
- package/skills/sk:debug/lib/__init__.py +1 -0
- package/skills/sk:debug/lib/bug_gatherer.py +55 -0
- package/skills/sk:debug/lib/context_reader.py +139 -0
- package/skills/sk:debug/lib/findings_writer.py +76 -0
- package/skills/sk:debug/lib/lessons_writer.py +165 -0
- package/skills/sk:debug/lib/step_runner.py +326 -0
- package/skills/sk:features/SKILL.md +238 -0
- package/skills/sk:frontend-design/LICENSE.txt +177 -0
- package/skills/sk:frontend-design/SKILL.md +191 -0
- package/skills/sk:laravel-init/SKILL.md +37 -0
- package/skills/sk:laravel-new/SKILL.md +68 -0
- package/skills/sk:lint/SKILL.md +113 -0
- package/skills/sk:perf/LICENSE.txt +177 -0
- package/skills/sk:perf/SKILL.md +188 -0
- package/skills/sk:release/SKILL.md +113 -0
- package/skills/sk:release/references/android-checklist.md +269 -0
- package/skills/sk:release/references/ios-checklist.md +339 -0
- package/skills/sk:release/release.sh +378 -0
- package/skills/sk:review/SKILL.md +346 -0
- package/skills/sk:review/references/security-checklist.md +223 -0
- package/skills/sk:schema-migrate/SKILL.md +125 -0
- package/skills/sk:schema-migrate/orms/drizzle.md +546 -0
- package/skills/sk:schema-migrate/orms/laravel.md +367 -0
- package/skills/sk:schema-migrate/orms/prisma.md +357 -0
- package/skills/sk:schema-migrate/orms/rails.md +351 -0
- package/skills/sk:schema-migrate/orms/sqlalchemy.md +385 -0
- package/skills/sk:schema-migrate/references/detection.md +110 -0
- package/skills/sk:setup-claude/SKILL.md +365 -0
- package/skills/sk:setup-claude/references/detection.md +6 -0
- package/skills/sk:setup-claude/references/templates.md +11 -0
- package/skills/sk:setup-claude/scripts/apply_setup_claude.py +443 -0
- package/skills/sk:setup-claude/scripts/detect_arch_changes.py +437 -0
- package/skills/sk:setup-claude/templates/.claude/docs/arch-changelog-guide.md.template +6 -0
- package/skills/sk:setup-claude/templates/.claude/docs/changelog-guide.md.template +12 -0
- package/skills/sk:setup-claude/templates/CHANGELOG.md.template +21 -0
- package/skills/sk:setup-claude/templates/CLAUDE.md.template +299 -0
- package/skills/sk:setup-claude/templates/arch-changelog-guide.md.template +3 -0
- package/skills/sk:setup-claude/templates/changelog-guide.md.template +3 -0
- package/skills/sk:setup-claude/templates/commands/brainstorm.md.template +74 -0
- package/skills/sk:setup-claude/templates/commands/execute-plan.md.template +57 -0
- package/skills/sk:setup-claude/templates/commands/features.md.template +238 -0
- package/skills/sk:setup-claude/templates/commands/finish-feature.md.template +155 -0
- package/skills/sk:setup-claude/templates/commands/plan.md.template +30 -0
- package/skills/sk:setup-claude/templates/commands/re-setup.md.template +38 -0
- package/skills/sk:setup-claude/templates/commands/release.md.template +74 -0
- package/skills/sk:setup-claude/templates/commands/security-check.md.template +172 -0
- package/skills/sk:setup-claude/templates/commands/status.md.template +17 -0
- package/skills/sk:setup-claude/templates/commands/write-plan.md.template +34 -0
- package/skills/sk:setup-claude/templates/finish-feature.md.template +3 -0
- package/skills/sk:setup-claude/templates/plan.md.template +3 -0
- package/skills/sk:setup-claude/templates/status.md.template +3 -0
- package/skills/sk:setup-claude/templates/tasks/findings.md.template +19 -0
- package/skills/sk:setup-claude/templates/tasks/lessons.md.template +26 -0
- package/skills/sk:setup-claude/templates/tasks/progress.md.template +20 -0
- package/skills/sk:setup-claude/templates/tasks/security-findings.md.template +5 -0
- package/skills/sk:setup-claude/templates/tasks/todo.md.template +26 -0
- package/skills/sk:setup-claude/templates/tasks/workflow-status.md.template +31 -0
- package/skills/sk:setup-claude/templates/tasks-findings.md.template +3 -0
- package/skills/sk:setup-claude/templates/tasks-lessons.md.template +3 -0
- package/skills/sk:setup-claude/templates/tasks-progress.md.template +3 -0
- package/skills/sk:setup-claude/templates/tasks-todo.md.template +3 -0
- package/skills/sk:setup-claude/tests/test_apply_setup_claude.py +193 -0
- package/skills/sk:setup-optimizer/SKILL.md +184 -0
- package/skills/sk:setup-optimizer/lib/__init__.py +24 -0
- package/skills/sk:setup-optimizer/lib/detect.py +205 -0
- package/skills/sk:setup-optimizer/lib/discover.py +221 -0
- package/skills/sk:setup-optimizer/lib/enrich.py +163 -0
- package/skills/sk:setup-optimizer/lib/merge.py +277 -0
- package/skills/sk:setup-optimizer/lib/sidecar.py +129 -0
- package/skills/sk:setup-optimizer/optimize_claude.py +174 -0
- package/skills/sk:setup-optimizer/templates/CLAUDE.md.template +105 -0
- package/skills/sk:skill-creator/LICENSE.txt +202 -0
- package/skills/sk:skill-creator/SKILL.md +479 -0
- package/skills/sk:skill-creator/agents/analyzer.md +274 -0
- package/skills/sk:skill-creator/agents/comparator.md +202 -0
- package/skills/sk:skill-creator/agents/grader.md +223 -0
- package/skills/sk:skill-creator/assets/eval_review.html +146 -0
- package/skills/sk:skill-creator/eval-viewer/generate_review.py +471 -0
- package/skills/sk:skill-creator/eval-viewer/viewer.html +1325 -0
- package/skills/sk:skill-creator/references/schemas.md +430 -0
- package/skills/sk:skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/skills/sk:skill-creator/scripts/generate_report.py +326 -0
- package/skills/sk:skill-creator/scripts/improve_description.py +248 -0
- package/skills/sk:skill-creator/scripts/package_skill.py +136 -0
- package/skills/sk:skill-creator/scripts/quick_validate.py +103 -0
- package/skills/sk:skill-creator/scripts/run_eval.py +310 -0
- package/skills/sk:skill-creator/scripts/run_loop.py +332 -0
- package/skills/sk:skill-creator/scripts/utils.py +47 -0
- package/skills/sk:smart-commit/SKILL.md +175 -0
- package/skills/sk:test/SKILL.md +171 -0
- package/skills/sk:write-tests/SKILL.md +195 -0
- package/skills/sk:write-tests/references/patterns.md +209 -0
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sk:setup-claude
|
|
3
|
+
description: "Bootstrap/repair Claude Code project scaffolding (.claude docs/commands + tasks planning files) with an enforced workflow cadence."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /sk:setup-claude
|
|
7
|
+
|
|
8
|
+
Bootstrap or repair Claude Code infrastructure on any project in a safe, idempotent way.
|
|
9
|
+
|
|
10
|
+
## Workflow Contract (What This Enables)
|
|
11
|
+
|
|
12
|
+
After bootstrapping a project, the recommended workflow becomes:
|
|
13
|
+
|
|
14
|
+
1. `/sk:setup-claude` — ensure scaffolding exists
|
|
15
|
+
2. `/sk:brainstorm` — clarify design (no coding yet)
|
|
16
|
+
3. `/sk:write-plan` — write a decision-complete plan into `tasks/todo.md`
|
|
17
|
+
4. `/sk:execute-plan` — implement in small batches while logging progress
|
|
18
|
+
5. `/sk:security-check` — audit changed files for vulnerabilities and production quality
|
|
19
|
+
6. `/sk:review` — self-review (report-only). Loop `/sk:debug` + `/sk:smart-commit` until clean
|
|
20
|
+
7. `/sk:finish-feature` — finalize branch (changelog, arch log auto-committed, security gate, create PR)
|
|
21
|
+
|
|
22
|
+
## What Gets Bootstrapped In The Target Repo
|
|
23
|
+
|
|
24
|
+
### Planning / Memory Files (in `tasks/`)
|
|
25
|
+
- `tasks/todo.md` — plan + checkboxes + results
|
|
26
|
+
- `tasks/findings.md` — discoveries + decisions
|
|
27
|
+
- `tasks/progress.md` — chronological work log + test results
|
|
28
|
+
- `tasks/lessons.md` — durable “don’t repeat mistakes” log (**never overwrite**)
|
|
29
|
+
- `tasks/security-findings.md` — security audit results from `/sk:security-check` (**never overwrite**)
|
|
30
|
+
|
|
31
|
+
### Project Commands (in `.claude/commands/`)
|
|
32
|
+
- `brainstorm.md` — invokes the global `brainstorming` skill
|
|
33
|
+
- `re-setup.md` — re-runs the setup script for this repo (refresh generated files)
|
|
34
|
+
- `write-plan.md` — forces a decision-complete plan (writes to `tasks/todo.md`)
|
|
35
|
+
- `execute-plan.md` — executes the plan in batches; logs to `tasks/progress.md`
|
|
36
|
+
- `plan.md` — creates/refreshes planning files and starts planning
|
|
37
|
+
- `status.md` — prints a compact progress summary
|
|
38
|
+
- `finish-feature.md` — branch finalization checklist (stack-aware)
|
|
39
|
+
- `features.md` — sync `docs/sk:features/` specs with current codebase; creates the spec system from scratch if it doesn't exist
|
|
40
|
+
- `security-check.md` — audit changed files (or full project with `--all`) for security best practices, OWASP Top 10, and production-grade quality
|
|
41
|
+
|
|
42
|
+
### Project Docs (in `.claude/docs/`)
|
|
43
|
+
- `changelog-guide.md`
|
|
44
|
+
- `arch-changelog-guide.md`
|
|
45
|
+
|
|
46
|
+
### Optional Root Files
|
|
47
|
+
- `CLAUDE.md`
|
|
48
|
+
- `CHANGELOG.md` (create if missing; **never overwrite**)
|
|
49
|
+
|
|
50
|
+
## Critical Behavior Rules
|
|
51
|
+
|
|
52
|
+
### Read-before-decide
|
|
53
|
+
Before major decisions or after many tool calls, re-read `tasks/todo.md` to refresh the goal and constraints.
|
|
54
|
+
|
|
55
|
+
### Log errors with attempts (3-strike protocol)
|
|
56
|
+
When anything fails, log it immediately (error + attempt # + resolution). If the same approach fails twice, change approach. After 3 failures, stop and ask the user with what you tried.
|
|
57
|
+
|
|
58
|
+
### Always write findings/progress to disk
|
|
59
|
+
If you discover anything important (stack details, key paths, constraints, failures), write it into `tasks/findings.md` or `tasks/progress.md` before moving on.
|
|
60
|
+
|
|
61
|
+
### Lessons Capture (lessons.md)
|
|
62
|
+
|
|
63
|
+
`tasks/lessons.md` is a permanent log of corrections. Two triggers:
|
|
64
|
+
|
|
65
|
+
**Explicit** — user says any of these phrases:
|
|
66
|
+
- `lesson:` / `remember:` / `don't do this again:` / `add to lessons`
|
|
67
|
+
→ Immediately append to `tasks/lessons.md` without asking.
|
|
68
|
+
|
|
69
|
+
**Implicit** — detect correction language in user messages:
|
|
70
|
+
- Keywords: "no", "don't", "instead", "wrong", "not like that", "stop doing"
|
|
71
|
+
→ Ask: *"Should I add this to lessons.md?"* → append on confirmation only.
|
|
72
|
+
|
|
73
|
+
Entry format:
|
|
74
|
+
```markdown
|
|
75
|
+
### [YYYY-MM-DD] [Brief title]
|
|
76
|
+
**Mistake:** What went wrong (symptom)
|
|
77
|
+
**Root cause:** Why it happened
|
|
78
|
+
**Prevention:** What to do differently next time
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Never remove lessons unless the user explicitly asks to remove a specific one.
|
|
82
|
+
Never overwrite `tasks/lessons.md` — always append.
|
|
83
|
+
|
|
84
|
+
## Idempotency Rules (Non-Negotiable)
|
|
85
|
+
|
|
86
|
+
**Never overwrite:**
|
|
87
|
+
- `tasks/todo.md`
|
|
88
|
+
- `tasks/findings.md`
|
|
89
|
+
- `tasks/progress.md`
|
|
90
|
+
- `tasks/lessons.md`
|
|
91
|
+
- `tasks/security-findings.md`
|
|
92
|
+
- `CHANGELOG.md`
|
|
93
|
+
- custom `CLAUDE.md` (anything not marked `<!-- Generated by /sk:setup-claude -->`)
|
|
94
|
+
|
|
95
|
+
**Create-if-missing only:**
|
|
96
|
+
- planning files above
|
|
97
|
+
- `.claude/commands/*` (unless clearly generated by this skill; see “Signature” below)
|
|
98
|
+
- `CLAUDE.md` (skip if present unless wrong-project artifacts are detected)
|
|
99
|
+
|
|
100
|
+
**Safe to overwrite only if unmodified / matches template signature:**
|
|
101
|
+
- `.claude/docs/changelog-guide.md`
|
|
102
|
+
- `.claude/docs/arch-changelog-guide.md`
|
|
103
|
+
|
|
104
|
+
## Generation Inputs
|
|
105
|
+
|
|
106
|
+
This skill detects:
|
|
107
|
+
- language/framework (from `package.json`, `composer.json`, `go.mod`, `Cargo.toml`, etc.)
|
|
108
|
+
- DB/ORM (Drizzle/Prisma/Supabase/Eloquent/SQLAlchemy…)
|
|
109
|
+
- scripts for build/dev/sk:lint/sk:test (from `package.json` where applicable)
|
|
110
|
+
- key directories (common conventions + observed folders)
|
|
111
|
+
|
|
112
|
+
## Laravel Detection (Additional Path)
|
|
113
|
+
|
|
114
|
+
When `composer.json` contains `laravel/framework`, run these additional steps **after** the generic bootstrap. All steps are additive and idempotent — they never replace existing generic behavior.
|
|
115
|
+
|
|
116
|
+
### Stack Detection
|
|
117
|
+
|
|
118
|
+
Read `composer.json` and `package.json` (if present) to classify the stack:
|
|
119
|
+
|
|
120
|
+
| Signal | Stack |
|
|
121
|
+
|--------|-------|
|
|
122
|
+
| `inertiajs/inertia-laravel` + `react` in package.json | Inertia + React |
|
|
123
|
+
| `inertiajs/inertia-laravel` + `vue` in package.json | Inertia + Vue |
|
|
124
|
+
| `livewire/livewire` in composer.json | Livewire |
|
|
125
|
+
| Neither of the above | API-only |
|
|
126
|
+
|
|
127
|
+
Write detected stack to `tasks/findings.md` (append, never overwrite):
|
|
128
|
+
```
|
|
129
|
+
## Stack Detection (auto-generated by /sk:setup-claude)
|
|
130
|
+
- Framework: Laravel [version from composer.json]
|
|
131
|
+
- Stack: [detected stack]
|
|
132
|
+
- PHP: [version from composer.json]
|
|
133
|
+
- Testing: Pest
|
|
134
|
+
- Tools: PHPStan level 9, Rector, Pint
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Tool Installation
|
|
138
|
+
|
|
139
|
+
Check `composer.json` devDependencies. Install only what's missing — never downgrade:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# PHPStan + Larastan (if missing)
|
|
143
|
+
composer require --dev nunomaduro/larastan
|
|
144
|
+
|
|
145
|
+
# Rector (if missing)
|
|
146
|
+
composer require --dev rector/rector
|
|
147
|
+
|
|
148
|
+
# Pint (if missing, usually pre-installed)
|
|
149
|
+
composer require --dev laravel/pint
|
|
150
|
+
|
|
151
|
+
# Pest (if missing)
|
|
152
|
+
composer require --dev pestphp/pest pestphp/pest-plugin-laravel
|
|
153
|
+
./vendor/bin/pest --init
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Config Publishing (create-if-missing only)
|
|
157
|
+
|
|
158
|
+
**`phpstan.neon`:**
|
|
159
|
+
```neon
|
|
160
|
+
includes:
|
|
161
|
+
- vendor/nunomaduro/larastan/extension.neon
|
|
162
|
+
|
|
163
|
+
parameters:
|
|
164
|
+
level: 9
|
|
165
|
+
paths:
|
|
166
|
+
- app
|
|
167
|
+
- tests
|
|
168
|
+
checkMissingIterableValueType: false
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**`rector.php`:**
|
|
172
|
+
```php
|
|
173
|
+
<?php
|
|
174
|
+
|
|
175
|
+
declare(strict_types=1);
|
|
176
|
+
|
|
177
|
+
use Rector\Config\RectorConfig;
|
|
178
|
+
|
|
179
|
+
return RectorConfig::configure()
|
|
180
|
+
->withPaths([__DIR__.'/app', __DIR__.'/tests'])
|
|
181
|
+
->withPhpSets(php84: true)
|
|
182
|
+
->withPreparedSets(
|
|
183
|
+
deadCode: true,
|
|
184
|
+
codeQuality: true,
|
|
185
|
+
typeDeclarations: true,
|
|
186
|
+
privatization: true,
|
|
187
|
+
);
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**`pint.json`:**
|
|
191
|
+
```json
|
|
192
|
+
{
|
|
193
|
+
"preset": "laravel",
|
|
194
|
+
"rules": {
|
|
195
|
+
"declare_strict_types": true,
|
|
196
|
+
"final_class": true,
|
|
197
|
+
"fully_qualified_strict_types": true
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Strict Model Configuration
|
|
203
|
+
|
|
204
|
+
Add to `AppServiceProvider::boot()` if not already present:
|
|
205
|
+
|
|
206
|
+
```php
|
|
207
|
+
use Illuminate\Database\Eloquent\Model;
|
|
208
|
+
|
|
209
|
+
Model::shouldBeStrict(! app()->isProduction());
|
|
210
|
+
Model::unguard();
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Sub-Agent Patterns Section
|
|
214
|
+
|
|
215
|
+
The generated `CLAUDE.md` MUST include this section (place after Workflow, before Commands):
|
|
216
|
+
|
|
217
|
+
```markdown
|
|
218
|
+
## Sub-Agent Patterns
|
|
219
|
+
<!-- BEGIN:sub-agent-patterns -->
|
|
220
|
+
|
|
221
|
+
Use Claude Code sub-agents to parallelize independent work and speed up development.
|
|
222
|
+
|
|
223
|
+
### Codebase Exploration (before implementation)
|
|
224
|
+
|
|
225
|
+
Before implementing a feature, launch parallel Explore agents to understand the affected areas:
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
Use Agent tool with subagent_type="Explore" — launch all in a single message:
|
|
229
|
+
- Agent 1: Explore related models, migrations, and relationships
|
|
230
|
+
- Agent 2: Explore existing routes, controllers, and middleware
|
|
231
|
+
- Agent 3: Explore test patterns and existing test coverage for the area
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Parallel Quality Checks (/sk:lint)
|
|
235
|
+
|
|
236
|
+
After Pint formats files, run PHPStan and Rector in parallel (both are read-only):
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
1. Pint (sequential — modifies files)
|
|
240
|
+
2. Then in parallel:
|
|
241
|
+
- Agent 1: PHPStan analyse
|
|
242
|
+
- Agent 2: Rector --dry-run
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Code Review Parallelization
|
|
246
|
+
|
|
247
|
+
For `/sk:review` and `/sk:security-check`, split into parallel agents for faster feedback:
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
Launch in a single message:
|
|
251
|
+
- Agent 1: Security review — OWASP, injection, auth bypass
|
|
252
|
+
- Agent 2: Performance review — N+1 queries, missing indexes, cache misses
|
|
253
|
+
- Agent 3: Test coverage gaps — untested paths, missing edge cases
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Worktree Isolation for Risky Changes
|
|
257
|
+
|
|
258
|
+
For refactors or experimental approaches, use `isolation: "worktree"` to try the change on an isolated copy:
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
Agent tool with isolation: "worktree":
|
|
262
|
+
- Try the refactor in isolation
|
|
263
|
+
- If it works, apply the same changes to the main worktree
|
|
264
|
+
- If it fails, the worktree is discarded — no cleanup needed
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Background Agents for Long-Running Tasks
|
|
268
|
+
|
|
269
|
+
Use `run_in_background: true` for tasks that don't block your next step:
|
|
270
|
+
|
|
271
|
+
```
|
|
272
|
+
- Background agent: Run full test suite while you continue implementing
|
|
273
|
+
- Background agent: PHPStan analysis while you fix Rector suggestions
|
|
274
|
+
- You'll be notified when they complete
|
|
275
|
+
```
|
|
276
|
+
<!-- END:sub-agent-patterns -->
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Section Completeness Check (Required on Every Run)
|
|
280
|
+
|
|
281
|
+
When a generated CLAUDE.md exists (has `<!-- Generated by /sk:setup-claude -->` marker), perform a section completeness check before reporting "no changes needed":
|
|
282
|
+
|
|
283
|
+
1. Search for `<!-- BEGIN:sub-agent-patterns -->`. If not found, insert the full Sub-Agent Patterns section after the Workflow section and before `## Commands`.
|
|
284
|
+
2. For any future managed sections with BEGIN/END markers, repeat: search for marker, insert if missing, replace content between markers if found.
|
|
285
|
+
|
|
286
|
+
This check runs every time — even if tools are installed and tasks files exist. Never short-circuit before verifying section completeness.
|
|
287
|
+
|
|
288
|
+
### Laravel Idempotency (extends global rules)
|
|
289
|
+
|
|
290
|
+
**Never overwrite** (in addition to global list):
|
|
291
|
+
- `phpstan.neon`, `rector.php`, `pint.json` if already present
|
|
292
|
+
|
|
293
|
+
**Generated CLAUDE.md (has `<!-- Generated by /sk:setup-claude -->` marker):**
|
|
294
|
+
- Safe to edit with section-level updates using `<!-- BEGIN:section-name -->` / `<!-- END:section-name -->` markers
|
|
295
|
+
- Full regeneration only when explicitly requested by the user
|
|
296
|
+
|
|
297
|
+
**User-owned CLAUDE.md (no marker):**
|
|
298
|
+
- NEVER edit directly
|
|
299
|
+
- Create `CLAUDE-sub-agents.md` in the project root with the sub-agent patterns content
|
|
300
|
+
- Inform the user: "Created `CLAUDE-sub-agents.md` — copy the sections you want into your `CLAUDE.md`"
|
|
301
|
+
|
|
302
|
+
### Laravel Output Report (appended to generic report)
|
|
303
|
+
|
|
304
|
+
Additionally report:
|
|
305
|
+
- Detected stack
|
|
306
|
+
- Tools installed vs already present
|
|
307
|
+
- Config files created vs skipped
|
|
308
|
+
|
|
309
|
+
## Templates (Source of Truth)
|
|
310
|
+
|
|
311
|
+
All output files are rendered from templates in `templates/`:
|
|
312
|
+
- `templates/commands/*.template` → `.claude/commands/*.md`
|
|
313
|
+
- `templates/tasks/*.template` → `tasks/*.md`
|
|
314
|
+
- `templates/.claude/docs/*.template` → `.claude/docs/*.md`
|
|
315
|
+
- `templates/CLAUDE.md.template` → `CLAUDE.md`
|
|
316
|
+
- `templates/CHANGELOG.md.template` → `CHANGELOG.md` (create-if-missing)
|
|
317
|
+
|
|
318
|
+
## Quick Start (Deterministic Apply)
|
|
319
|
+
|
|
320
|
+
If you want `/sk:setup-claude` to **actually write files** (not just describe what to do), run:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
python3 "$HOME/.claude/skills/sk:setup-claude/scripts/apply_setup_claude.py" "$(pwd)"
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Preview what would change (no writes):
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
python3 "$HOME/.claude/skills/sk:setup-claude/scripts/apply_setup_claude.py" "$(pwd)" --dry-run
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Print detected values (JSON):
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
python3 "$HOME/.claude/skills/sk:setup-claude/scripts/apply_setup_claude.py" "$(pwd)" --print-detection
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Optional: update previously generated files (only ones containing the marker):
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
python3 "$HOME/.claude/skills/sk:setup-claude/scripts/apply_setup_claude.py" "$(pwd)" --update-generated
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
This will:
|
|
345
|
+
- create missing planning files in `tasks/`
|
|
346
|
+
- create/update generated `.claude/commands/*`
|
|
347
|
+
- create `CLAUDE.md` (generated) and `CHANGELOG.md` (missing-only)
|
|
348
|
+
|
|
349
|
+
## Signature for Safe Updates
|
|
350
|
+
|
|
351
|
+
Files generated by this skill should include a marker comment:
|
|
352
|
+
`<!-- Generated by /sk:setup-claude -->`
|
|
353
|
+
|
|
354
|
+
Only auto-update a file if:
|
|
355
|
+
- it contains the marker, and
|
|
356
|
+
- the user hasn’t obviously customized it (major edits / removed sections), otherwise **skip** and report.
|
|
357
|
+
|
|
358
|
+
If a repo already has a custom `CLAUDE.md` without the marker, `/sk:setup-claude` will write a sidecar draft `CLAUDE.setup-claude.md` instead (marker-guarded) so you can copy/paste sections without losing existing project guidance.
|
|
359
|
+
|
|
360
|
+
## Output Report
|
|
361
|
+
|
|
362
|
+
After bootstrapping, report:
|
|
363
|
+
- ✅ Created
|
|
364
|
+
- 🔄 Updated
|
|
365
|
+
- ⏭️ Skipped (and why)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Templates Reference (Deprecated)
|
|
2
|
+
|
|
3
|
+
This file exists for backwards compatibility.
|
|
4
|
+
|
|
5
|
+
Source of truth: `../templates/`.
|
|
6
|
+
|
|
7
|
+
Key locations:
|
|
8
|
+
- Commands: `../templates/commands/`
|
|
9
|
+
- Planning files: `../templates/tasks/`
|
|
10
|
+
- Project docs: `../templates/.claude/docs/`
|
|
11
|
+
|