@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,155 @@
|
|
|
1
|
+
<!-- Generated by /setup-claude -->
|
|
2
|
+
|
|
3
|
+
# Finish Feature Command
|
|
4
|
+
|
|
5
|
+
**Workflow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review → **Finalize** → Release
|
|
6
|
+
|
|
7
|
+
Finalize a feature/bug-fix branch: changelog, arch log, security gate, verification, and PR creation.
|
|
8
|
+
|
|
9
|
+
This is the **last step before `/release`**. It auto-commits documentation changes (changelog, arch log) so you don't need to loop back to `/commit` for docs-only work.
|
|
10
|
+
|
|
11
|
+
## Before You Start
|
|
12
|
+
|
|
13
|
+
If `tasks/lessons.md` exists, read it in full. For each active lesson, scan the
|
|
14
|
+
final diff (`git diff main..HEAD`) for the **Bug** pattern described in that lesson
|
|
15
|
+
before marking the feature done. This is the last gate before merge — catch recurring
|
|
16
|
+
mistakes here rather than in review.
|
|
17
|
+
|
|
18
|
+
If `tasks/security-findings.md` exists, read it. Check that any Critical or High
|
|
19
|
+
severity findings from the most recent `/security-check` audit have been addressed.
|
|
20
|
+
If unresolved Critical/High findings remain, warn the user before proceeding.
|
|
21
|
+
|
|
22
|
+
## Steps
|
|
23
|
+
|
|
24
|
+
1. **Check Git Branch**
|
|
25
|
+
- Verify you are not on `main`
|
|
26
|
+
- Create a branch if needed: `feature/<desc>`, `fix/<desc>`, or `chore/<desc>`
|
|
27
|
+
|
|
28
|
+
2. **Show Branch Summary**
|
|
29
|
+
- `git status --short`
|
|
30
|
+
- `git log main..HEAD --oneline`
|
|
31
|
+
|
|
32
|
+
3. **Verify `CHANGELOG.md` Updated**
|
|
33
|
+
- Ensure an entry exists under `[Unreleased]`
|
|
34
|
+
- Follow `.claude/docs/changelog-guide.md`
|
|
35
|
+
- If CHANGELOG.md needs updating, make the edit and auto-commit:
|
|
36
|
+
```bash
|
|
37
|
+
git add CHANGELOG.md
|
|
38
|
+
git commit -m "docs: update CHANGELOG.md for unreleased changes"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
4. **Check for Architectural Changes**
|
|
42
|
+
|
|
43
|
+
The auto-detector scans for architecture-relevant changes:
|
|
44
|
+
- Schema/database changes (migrations, models, databases)
|
|
45
|
+
- API/route structure changes (endpoints, controllers)
|
|
46
|
+
- Component/module organization changes
|
|
47
|
+
- Configuration changes affecting architecture
|
|
48
|
+
- New subsystems or major refactors
|
|
49
|
+
- Dependency changes
|
|
50
|
+
|
|
51
|
+
Run to see what would be detected:
|
|
52
|
+
```bash
|
|
53
|
+
python3 $HOME/.claude/skills/setup-claude/scripts/detect_arch_changes.py --dry-run
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If architectural changes detected:
|
|
57
|
+
a) **Auto-generate the draft:**
|
|
58
|
+
```bash
|
|
59
|
+
python3 $HOME/.claude/skills/setup-claude/scripts/detect_arch_changes.py
|
|
60
|
+
```
|
|
61
|
+
This creates a markdown draft in `.claude/docs/architectural_change_log/`
|
|
62
|
+
|
|
63
|
+
b) **Review and edit the draft:**
|
|
64
|
+
- Open the generated file
|
|
65
|
+
- Fill in [TODO] sections:
|
|
66
|
+
- Detailed Changes: What specifically changed?
|
|
67
|
+
- Before & After: Show the comparison
|
|
68
|
+
- Affected Components: What parts of system are impacted?
|
|
69
|
+
- Migration/Compatibility: Any breaking changes?
|
|
70
|
+
- Verify the auto-filled sections (Summary, Type, What Changed, Impact)
|
|
71
|
+
|
|
72
|
+
c) **Auto-commit the arch log** (no need to go back to `/commit`):
|
|
73
|
+
```bash
|
|
74
|
+
git add .claude/docs/architectural_change_log/
|
|
75
|
+
git commit -m "docs: add architectural changelog entry"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
If no architectural changes detected: skip to step 5.
|
|
79
|
+
|
|
80
|
+
5. **Verification** (with Test Checklist for Reviewers)
|
|
81
|
+
|
|
82
|
+
Tests should have been created during `/execute-plan`. Verify:
|
|
83
|
+
|
|
84
|
+
a) **Automated Tests**
|
|
85
|
+
- Execute: `[TEST_COMMAND]`
|
|
86
|
+
- Verify all tests pass with no failures
|
|
87
|
+
- Check test coverage (target: >80% for new code in `[LANGUAGE]` projects)
|
|
88
|
+
- No skipped tests (`test.skip`, `it.skip`, `@skip`, etc.)
|
|
89
|
+
- Run other CI checks: lint (`npm run lint` or equivalent), build (`npm run build` or equivalent)
|
|
90
|
+
|
|
91
|
+
b) **Manual Testing - [FRAMEWORK] / [TESTING]**
|
|
92
|
+
- For frontend ([FRAMEWORK]): Render the component/page in browser, verify state updates work correctly, test all user interactions (clicks, form inputs, navigation), verify conditional rendering, check edge cases and error states
|
|
93
|
+
- For backend/API ([FRAMEWORK]): Test HTTP status codes and responses, verify request/response bodies match spec, test error cases and input validation, check database transactions/state, verify authentication/authorization if applicable
|
|
94
|
+
- For CLI/desktop ([FRAMEWORK]): Test command-line arguments and flags, verify output format and readability, test error messages and help text, check file I/O operations
|
|
95
|
+
- Using [TESTING] framework: Verify test structure matches project conventions, assertions are clear and specific, setup/teardown is properly handled
|
|
96
|
+
|
|
97
|
+
c) **Regression Testing**
|
|
98
|
+
- Test related existing functionality to ensure no breakage
|
|
99
|
+
- For [FRAMEWORK] projects: check related components/endpoints/commands work correctly
|
|
100
|
+
- Verify no new console errors, warnings, or debug statements
|
|
101
|
+
- Confirm existing tests still pass
|
|
102
|
+
|
|
103
|
+
d) **Code Quality Checks**
|
|
104
|
+
- No hardcoded test data, credentials, or environment-specific values in production code
|
|
105
|
+
- Proper error handling and validation
|
|
106
|
+
- No debugging code (`console.log`, `debugger`, `pdb`, `print` statements, etc.)
|
|
107
|
+
- Comments explain *why*, not *what*
|
|
108
|
+
- Follows [LANGUAGE] conventions and style guide (see `CLAUDE.md`)
|
|
109
|
+
|
|
110
|
+
6. **Security Gate**
|
|
111
|
+
- Read `tasks/security-findings.md`. If it doesn't exist or has no audit for this branch, recommend: "Run `/security-check` before creating a PR."
|
|
112
|
+
- If the most recent audit has unresolved Critical or High findings, list them and ask the user to confirm they've been addressed before proceeding.
|
|
113
|
+
|
|
114
|
+
7. **Create Pull Request**
|
|
115
|
+
|
|
116
|
+
a) **Check remote status:**
|
|
117
|
+
```bash
|
|
118
|
+
git remote -v
|
|
119
|
+
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo "no upstream"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
b) **Push branch if needed:**
|
|
123
|
+
```bash
|
|
124
|
+
git push -u origin HEAD
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
c) **Generate PR title and body:**
|
|
128
|
+
- Title: Short, imperative, under 70 characters
|
|
129
|
+
- Body: Summary of changes, review findings (if any from `/review`), test status
|
|
130
|
+
|
|
131
|
+
d) **Create PR:**
|
|
132
|
+
```bash
|
|
133
|
+
gh pr create --title "title here" --body "$(cat <<'EOF'
|
|
134
|
+
## Summary
|
|
135
|
+
- bullet points of key changes
|
|
136
|
+
|
|
137
|
+
## Review Notes
|
|
138
|
+
- Any findings from /review (or "Clean review — no issues found")
|
|
139
|
+
|
|
140
|
+
## Security
|
|
141
|
+
- Security check status (passed / N findings addressed)
|
|
142
|
+
|
|
143
|
+
## Test Plan
|
|
144
|
+
- How to verify the changes
|
|
145
|
+
|
|
146
|
+
Generated with [Claude Code](https://claude.com/claude-code)
|
|
147
|
+
EOF
|
|
148
|
+
)"
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
e) Report the PR URL to the user.
|
|
152
|
+
|
|
153
|
+
## When Done
|
|
154
|
+
|
|
155
|
+
> "Feature finalized and PR created! Run `/release` when ready to tag and publish."
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Create/refresh tasks planning files and start planning."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Generated by /setup-claude -->
|
|
6
|
+
|
|
7
|
+
# /plan
|
|
8
|
+
|
|
9
|
+
Initialize planning files in `tasks/` (create-if-missing) and start Phase 1 planning.
|
|
10
|
+
|
|
11
|
+
## Before You Start
|
|
12
|
+
|
|
13
|
+
If `tasks/lessons.md` exists, read it in full. Apply every active lesson as a
|
|
14
|
+
constraint when filling `tasks/todo.md` — lessons represent decisions already made
|
|
15
|
+
about what not to do on this project.
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
1. Ensure `tasks/` exists.
|
|
20
|
+
2. If missing, create:
|
|
21
|
+
- `tasks/todo.md`
|
|
22
|
+
- `tasks/findings.md`
|
|
23
|
+
- `tasks/progress.md`
|
|
24
|
+
3. Read `tasks/todo.md` and ask the user:
|
|
25
|
+
- What’s the goal?
|
|
26
|
+
- What are the constraints?
|
|
27
|
+
- What does “done” look like?
|
|
28
|
+
4. Fill `tasks/todo.md` (Goal + Plan + Verification + Acceptance Criteria).
|
|
29
|
+
5. Continue with `/write-plan` if you need a more detailed plan.
|
|
30
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Re-run /setup-claude bootstrap for this repo (refresh generated files)."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Generated by /setup-claude -->
|
|
6
|
+
|
|
7
|
+
# /re-setup
|
|
8
|
+
|
|
9
|
+
Re-run the `/setup-claude` bootstrap for this repository. Use this to refresh generated files or repair scaffolding.
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. Run a dry-run preview:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
python3 "$HOME/.claude/skills/setup-claude/scripts/apply_setup_claude.py" "$(pwd)" --dry-run
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. If the preview looks correct, apply changes:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
python3 "$HOME/.claude/skills/setup-claude/scripts/apply_setup_claude.py" "$(pwd)"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
> Files marked `<!-- Generated by /setup-claude -->` are updated automatically if the template changed. Files without the marker are never touched.
|
|
26
|
+
|
|
27
|
+
3. Optional: print detection details (JSON):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
python3 "$HOME/.claude/skills/setup-claude/scripts/apply_setup_claude.py" "$(pwd)" --print-detection
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Output
|
|
34
|
+
|
|
35
|
+
After running, report:
|
|
36
|
+
- ✅ Created
|
|
37
|
+
- 🔄 Updated
|
|
38
|
+
- ⏭️ Skipped (and why)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Automate releases: bump version, update CHANGELOG, create tag, push to GitHub. Use --android and/or --ios flags for App Store / Play Store readiness audit."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Generated by /setup-claude -->
|
|
6
|
+
|
|
7
|
+
# /release
|
|
8
|
+
|
|
9
|
+
**Workflow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review → Finalize → **Release**
|
|
10
|
+
|
|
11
|
+
Automate the release process for your project. Supports optional mobile store submission review.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/release # Git release only
|
|
17
|
+
/release --android # Git release + Play Store audit
|
|
18
|
+
/release --ios # Git release + App Store audit
|
|
19
|
+
/release --android --ios # Git release + both store audits
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Hard Rules
|
|
23
|
+
|
|
24
|
+
- **DO NOT** release without reviewing CHANGELOG.md changes
|
|
25
|
+
- **DO NOT** proceed if CHANGELOG.md has no [Unreleased] section
|
|
26
|
+
- You **must** have a git remote origin (GitHub, GitLab, etc.)
|
|
27
|
+
- Version format must follow semantic versioning (e.g., v1.0.0, v0.2.0-beta)
|
|
28
|
+
- When `--android` or `--ios` flags are present, **always run the store audit after the git release**
|
|
29
|
+
|
|
30
|
+
## Steps
|
|
31
|
+
|
|
32
|
+
1. **Parse flags** — Check for `--android` and/or `--ios` in the user's invocation.
|
|
33
|
+
|
|
34
|
+
2. **Verify CHANGELOG.md** — Check that the [Unreleased] section has the changes you want to release. If not, update CHANGELOG.md first and commit.
|
|
35
|
+
|
|
36
|
+
3. **Run the release script** — This will:
|
|
37
|
+
- Auto-detect: project name, current version, GitHub URL
|
|
38
|
+
- Prompt for: new version number
|
|
39
|
+
- Suggest: release title based on changes
|
|
40
|
+
- Update: CHANGELOG.md (move [Unreleased] -> [Version])
|
|
41
|
+
- Update: version in CLAUDE.md (if it has a Version line)
|
|
42
|
+
- Create: git commit with release message
|
|
43
|
+
- Create: annotated git tag
|
|
44
|
+
- Push: tag to GitHub (with confirmation at each step)
|
|
45
|
+
|
|
46
|
+
4. **Complete the release on GitHub** — The script will show you the GitHub releases link. Go there and:
|
|
47
|
+
- Click "Create release from tag"
|
|
48
|
+
- Use the suggested title
|
|
49
|
+
- Copy the changelog section as release notes
|
|
50
|
+
- Publish the release
|
|
51
|
+
|
|
52
|
+
5. **(If --android or --ios)** **Run Store Readiness Audit** — The release skill will:
|
|
53
|
+
- Auto-detect the mobile framework (Expo, React Native, Flutter, native, Capacitor)
|
|
54
|
+
- Detect if this is a first-time submission or an update
|
|
55
|
+
- Walk through every item in the store checklist, checking config files
|
|
56
|
+
- Report status for each item: PASS / FAIL / WARN / MANUAL CHECK NEEDED
|
|
57
|
+
- Propose fixes for config issues (with your approval)
|
|
58
|
+
- Guide you through manual steps (screenshots, store listing, etc.)
|
|
59
|
+
- Present a summary report with next steps and build/submit commands
|
|
60
|
+
|
|
61
|
+
## When Done
|
|
62
|
+
|
|
63
|
+
> "Release {version} completed! Check GitHub to finalize the release."
|
|
64
|
+
|
|
65
|
+
If store flags were used:
|
|
66
|
+
> "Store readiness audit complete. See the summary report above for remaining action items."
|
|
67
|
+
|
|
68
|
+
## Notes
|
|
69
|
+
|
|
70
|
+
- Each step (commit, tag, push) requires your confirmation
|
|
71
|
+
- You can skip any step and do it manually later
|
|
72
|
+
- The script works with any project type: Node, Python, Go, Rust, etc.
|
|
73
|
+
- Requires: CHANGELOG.md file with [Unreleased] section
|
|
74
|
+
- Store audits support: Expo, React Native, Flutter, native Android/iOS, Capacitor/Ionic, .NET MAUI
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Audit changed code for security best practices, production-grade quality, and industry gold standards."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Generated by /setup-claude -->
|
|
6
|
+
|
|
7
|
+
# /security-check
|
|
8
|
+
|
|
9
|
+
**Workflow:** Read → Explore → Design → Accessibility → Plan → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → **Security** → Performance → Review → Finalize → Release
|
|
10
|
+
|
|
11
|
+
Audit code for security vulnerabilities, production-grade quality, and industry gold-standard compliance.
|
|
12
|
+
|
|
13
|
+
By default, this checks only files changed on the current branch. Use `--all` to scan the entire project.
|
|
14
|
+
|
|
15
|
+
## Hard Rules
|
|
16
|
+
|
|
17
|
+
- **DO NOT fix code.** This is an audit — report only. The user decides what to fix.
|
|
18
|
+
- **DO NOT skip checks** because the project is small or simple. Production is production.
|
|
19
|
+
- **Every finding must cite a specific file and line number.**
|
|
20
|
+
- **Every finding must reference the standard it violates** (OWASP, CWE, NIST, etc.).
|
|
21
|
+
|
|
22
|
+
## Before You Start
|
|
23
|
+
|
|
24
|
+
1. Read `CLAUDE.md` to understand the project's stack and conventions.
|
|
25
|
+
2. If `tasks/security-findings.md` exists, read it — check if prior findings have been addressed.
|
|
26
|
+
3. If `tasks/lessons.md` exists, read it — apply security-related lessons as targeted checks.
|
|
27
|
+
|
|
28
|
+
## Determine Scope
|
|
29
|
+
|
|
30
|
+
**Default (changed files only):**
|
|
31
|
+
```bash
|
|
32
|
+
git diff main..HEAD --name-only
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**If the user says `--all` or "scan everything":**
|
|
36
|
+
```bash
|
|
37
|
+
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.py" -o -name "*.go" -o -name "*.rs" -o -name "*.php" -o -name "*.rb" -o -name "*.java" \) \
|
|
38
|
+
-not -path "*/node_modules/*" -not -path "*/.git/*" -not -path "*/vendor/*" -not -path "*/dist/*" -not -path "*/build/*"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Read each file in scope before auditing.
|
|
42
|
+
|
|
43
|
+
## Security Audit Checklist
|
|
44
|
+
|
|
45
|
+
### 1. OWASP Top 10 (2021)
|
|
46
|
+
|
|
47
|
+
- **A01 Broken Access Control** — Missing auth checks, IDOR, privilege escalation, CORS misconfiguration
|
|
48
|
+
- **A02 Cryptographic Failures** — Weak hashing, plaintext secrets, missing TLS, insecure random
|
|
49
|
+
- **A03 Injection** — SQL, NoSQL, OS command, LDAP, template injection, XSS (reflected/stored/DOM)
|
|
50
|
+
- **A04 Insecure Design** — Missing rate limiting, no abuse-case thinking, trust boundary violations
|
|
51
|
+
- **A05 Security Misconfiguration** — Default credentials, verbose errors in production, unnecessary features enabled, missing security headers
|
|
52
|
+
- **A06 Vulnerable Components** — Known CVEs in dependencies, outdated packages
|
|
53
|
+
- **A07 Auth Failures** — Weak passwords allowed, missing brute-force protection, session fixation, missing MFA where needed
|
|
54
|
+
- **A08 Data Integrity Failures** — Untrusted deserialization, missing integrity checks, insecure CI/CD
|
|
55
|
+
- **A09 Logging Failures** — Missing audit logs, PII in logs, no alerting on security events
|
|
56
|
+
- **A10 SSRF** — Unvalidated URLs, internal network access, DNS rebinding
|
|
57
|
+
|
|
58
|
+
### 2. Stack-Specific Checks ([LANGUAGE] / [FRAMEWORK])
|
|
59
|
+
|
|
60
|
+
**If [FRAMEWORK] includes React/Next.js:**
|
|
61
|
+
- `dangerouslySetInnerHTML` usage without sanitization
|
|
62
|
+
- Client-side secrets (API keys in browser bundles)
|
|
63
|
+
- Missing CSP headers
|
|
64
|
+
- Server component data leaking to client
|
|
65
|
+
- `getServerSideProps`/Server Actions exposing internal data
|
|
66
|
+
|
|
67
|
+
**If [FRAMEWORK] includes Express/Node.js:**
|
|
68
|
+
- Missing helmet/security headers
|
|
69
|
+
- Unsanitized user input in `req.params`, `req.query`, `req.body`
|
|
70
|
+
- Path traversal via `req.params` in file operations
|
|
71
|
+
- Missing rate limiting on auth endpoints
|
|
72
|
+
- Prototype pollution
|
|
73
|
+
|
|
74
|
+
**If [LANGUAGE] is Python:**
|
|
75
|
+
- `eval()`, `exec()`, `pickle.loads()` with untrusted input
|
|
76
|
+
- SQL string formatting instead of parameterized queries
|
|
77
|
+
- `subprocess.shell=True` with user input
|
|
78
|
+
- Missing input validation on FastAPI/Django endpoints
|
|
79
|
+
- Jinja2 `| safe` filter misuse
|
|
80
|
+
|
|
81
|
+
**If [LANGUAGE] is Go:**
|
|
82
|
+
- Unchecked error returns on security-critical operations
|
|
83
|
+
- `html/template` vs `text/template` confusion
|
|
84
|
+
- Missing context cancellation/timeouts
|
|
85
|
+
- Race conditions on shared state
|
|
86
|
+
|
|
87
|
+
**If [LANGUAGE] is PHP:**
|
|
88
|
+
- `include`/`require` with user-controlled paths
|
|
89
|
+
- `mysqli_query` without prepared statements
|
|
90
|
+
- Missing CSRF tokens
|
|
91
|
+
- `extract()` with user input
|
|
92
|
+
|
|
93
|
+
### 3. Production Readiness
|
|
94
|
+
|
|
95
|
+
- **Error handling** — No swallowed errors, no stack traces leaked to users, graceful degradation
|
|
96
|
+
- **Input validation** — All external inputs validated at system boundaries (API, forms, file uploads)
|
|
97
|
+
- **Environment separation** — No hardcoded dev/staging URLs, secrets not committed, `.env` in `.gitignore`
|
|
98
|
+
- **Dependency hygiene** — Lock files committed, no `*` version ranges, no known vulnerabilities
|
|
99
|
+
- **Logging** — Structured logging present, no sensitive data logged, appropriate log levels
|
|
100
|
+
- **Configuration** — Secrets via env vars (not code), feature flags for risky features, timeouts on external calls
|
|
101
|
+
|
|
102
|
+
### 4. Data Protection
|
|
103
|
+
|
|
104
|
+
- **PII handling** — Personal data encrypted at rest, masked in logs, retention policy considered
|
|
105
|
+
- **Authentication tokens** — HttpOnly + Secure + SameSite cookies, short-lived JWTs, refresh token rotation
|
|
106
|
+
- **Database** — Parameterized queries everywhere, principle of least privilege on DB users, backups configured
|
|
107
|
+
- **File uploads** — Type validation (not just extension), size limits, sandboxed storage
|
|
108
|
+
|
|
109
|
+
## Generate Report
|
|
110
|
+
|
|
111
|
+
Write findings to `tasks/security-findings.md` using this format:
|
|
112
|
+
|
|
113
|
+
```markdown
|
|
114
|
+
# Security Audit — YYYY-MM-DD
|
|
115
|
+
|
|
116
|
+
**Scope:** Changed files on branch `<branch-name>` | Full project scan
|
|
117
|
+
**Stack:** [LANGUAGE] / [FRAMEWORK]
|
|
118
|
+
**Files audited:** N
|
|
119
|
+
|
|
120
|
+
## Critical (must fix before deploy)
|
|
121
|
+
|
|
122
|
+
- **[FILE:LINE]** Description of vulnerability
|
|
123
|
+
**Standard:** OWASP A03 — Injection (CWE-89)
|
|
124
|
+
**Risk:** What could happen if exploited
|
|
125
|
+
**Recommendation:** How to fix it
|
|
126
|
+
|
|
127
|
+
## High (fix before production)
|
|
128
|
+
|
|
129
|
+
- **[FILE:LINE]** Description
|
|
130
|
+
**Standard:** ...
|
|
131
|
+
**Risk:** ...
|
|
132
|
+
**Recommendation:** ...
|
|
133
|
+
|
|
134
|
+
## Medium (should fix)
|
|
135
|
+
|
|
136
|
+
- **[FILE:LINE]** Description
|
|
137
|
+
**Standard:** ...
|
|
138
|
+
**Recommendation:** ...
|
|
139
|
+
|
|
140
|
+
## Low / Informational
|
|
141
|
+
|
|
142
|
+
- **[FILE:LINE]** Description
|
|
143
|
+
**Recommendation:** ...
|
|
144
|
+
|
|
145
|
+
## Passed Checks
|
|
146
|
+
|
|
147
|
+
- List of categories that passed with no findings
|
|
148
|
+
|
|
149
|
+
## Summary
|
|
150
|
+
|
|
151
|
+
| Severity | Count |
|
|
152
|
+
|----------|-------|
|
|
153
|
+
| Critical | N |
|
|
154
|
+
| High | N |
|
|
155
|
+
| Medium | N |
|
|
156
|
+
| Low | N |
|
|
157
|
+
| **Total** | **N** |
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## When Done
|
|
161
|
+
|
|
162
|
+
Tell the user:
|
|
163
|
+
|
|
164
|
+
> "Security audit complete. Findings saved to `tasks/security-findings.md`.
|
|
165
|
+
> - **Critical:** N | **High:** N | **Medium:** N | **Low:** N
|
|
166
|
+
>
|
|
167
|
+
> Review the findings, then run `/finish-feature` when ready to finalize."
|
|
168
|
+
|
|
169
|
+
If there are Critical or High findings:
|
|
170
|
+
> "There are critical/high findings that should be addressed before merging. Fix them, then re-run `/security-check` to verify."
|
|
171
|
+
|
|
172
|
+
**Do not auto-fix.** The user decides what to address.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Show planning status at a glance from tasks/todo.md."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Generated by /setup-claude -->
|
|
6
|
+
|
|
7
|
+
# /status
|
|
8
|
+
|
|
9
|
+
Read `tasks/todo.md` and display a compact status summary.
|
|
10
|
+
|
|
11
|
+
## What to show
|
|
12
|
+
- Total plan items vs completed plan items (checkbox count)
|
|
13
|
+
- Errors count (if the file has an Errors section/table)
|
|
14
|
+
- Whether `tasks/findings.md` and `tasks/progress.md` exist
|
|
15
|
+
|
|
16
|
+
Keep it brief: answer “where am I?” and “what’s next?”.
|
|
17
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Write a decision-complete plan into tasks/todo.md (no code yet)."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Generated by /setup-claude -->
|
|
6
|
+
|
|
7
|
+
# /write-plan
|
|
8
|
+
|
|
9
|
+
**Workflow:** Read → Explore → Design → Accessibility → **Plan** → Branch → Migrate → Write Tests → Implement → Lint → Verify Tests → Security → Performance → Review → Finalize → Release
|
|
10
|
+
|
|
11
|
+
Create a decision-complete plan **before** writing code.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Ensure planning files exist:
|
|
16
|
+
- `tasks/todo.md`
|
|
17
|
+
- `tasks/findings.md`
|
|
18
|
+
- `tasks/progress.md`
|
|
19
|
+
2. Read context files:
|
|
20
|
+
- `tasks/findings.md` — requirements + discoveries; extract problem statement,
|
|
21
|
+
constraints, and open questions explicitly into the plan
|
|
22
|
+
- `tasks/lessons.md` — if it exists, apply all active lessons as constraints
|
|
23
|
+
before writing any plan steps
|
|
24
|
+
3. Update `tasks/todo.md` with:
|
|
25
|
+
- **Goal** (1–2 lines)
|
|
26
|
+
- **Plan** as checkboxes (small, verifiable steps)
|
|
27
|
+
- **Verification** commands (exact commands + expected outcomes)
|
|
28
|
+
- **Acceptance criteria** (clear "done" conditions)
|
|
29
|
+
- **Risks/unknowns** (anything still ambiguous)
|
|
30
|
+
4. Present the plan to the user and wait for approval.
|
|
31
|
+
|
|
32
|
+
## Rules
|
|
33
|
+
- No implementation until the plan is approved.
|
|
34
|
+
- If something is unclear, add a plan step to explore it first.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Findings — YYYY-MM-DD — [Topic]
|
|
2
|
+
|
|
3
|
+
## Requirements
|
|
4
|
+
- (captured from user request)
|
|
5
|
+
|
|
6
|
+
## Repo / Stack Notes
|
|
7
|
+
- (detected frameworks, key paths, scripts)
|
|
8
|
+
|
|
9
|
+
## Decisions
|
|
10
|
+
| Decision | Rationale |
|
|
11
|
+
|----------|-----------|
|
|
12
|
+
| | |
|
|
13
|
+
|
|
14
|
+
## Resources
|
|
15
|
+
- (paths, docs links)
|
|
16
|
+
|
|
17
|
+
## Visual / Browser Findings
|
|
18
|
+
- (only if applicable; write down what won’t persist)
|
|
19
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Lessons Learned
|
|
2
|
+
|
|
3
|
+
Accumulated corrections from past mistakes. Read this file at the **start of any task** and apply all active lessons before proceeding.
|
|
4
|
+
|
|
5
|
+
## How to Add a Lesson
|
|
6
|
+
|
|
7
|
+
**Explicit trigger** — say any of:
|
|
8
|
+
- `lesson:` / `remember:` / `don't do this again:` / `add to lessons`
|
|
9
|
+
→ Claude appends immediately.
|
|
10
|
+
|
|
11
|
+
**Implicit trigger** — correction language detected ("no", "don't", "instead", "wrong"):
|
|
12
|
+
→ Claude asks: *"Should I add this to lessons.md?"* → appends on confirmation.
|
|
13
|
+
|
|
14
|
+
## Entry Format
|
|
15
|
+
|
|
16
|
+
```markdown
|
|
17
|
+
### [YYYY-MM-DD] [Brief title]
|
|
18
|
+
**Mistake:** What went wrong (symptom)
|
|
19
|
+
**Root cause:** Why it happened
|
|
20
|
+
**Prevention:** What to do differently next time
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Active Lessons
|
|
24
|
+
|
|
25
|
+
<!-- Add entries here. Never remove a lesson unless the root cause is permanently fixed or the user explicitly asks to remove it. -->
|
|
26
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Progress Log
|
|
2
|
+
|
|
3
|
+
## Session: YYYY-MM-DD
|
|
4
|
+
- Started: HH:MM
|
|
5
|
+
- Summary:
|
|
6
|
+
- (what changed)
|
|
7
|
+
|
|
8
|
+
## Work Log
|
|
9
|
+
- YYYY-MM-DD HH:MM — did X (files: a, b) (verify: cmd)
|
|
10
|
+
|
|
11
|
+
## Test Results
|
|
12
|
+
| Command | Expected | Actual | Status |
|
|
13
|
+
|---------|----------|--------|--------|
|
|
14
|
+
| | | | |
|
|
15
|
+
|
|
16
|
+
## Error Log
|
|
17
|
+
| Timestamp | Error | Attempt | Resolution |
|
|
18
|
+
|-----------|-------|---------|------------|
|
|
19
|
+
| | | 1 | |
|
|
20
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# TODO — YYYY-MM-DD — [Short Title]
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
[1–2 lines]
|
|
5
|
+
|
|
6
|
+
## Plan
|
|
7
|
+
- [ ] Step 1
|
|
8
|
+
- [ ] Step 2
|
|
9
|
+
|
|
10
|
+
## Verification
|
|
11
|
+
- `command` → expected result
|
|
12
|
+
|
|
13
|
+
## Acceptance Criteria
|
|
14
|
+
- [ ] Condition 1
|
|
15
|
+
|
|
16
|
+
## Risks / Unknowns
|
|
17
|
+
- TBD
|
|
18
|
+
|
|
19
|
+
## Results
|
|
20
|
+
- (fill after execution)
|
|
21
|
+
|
|
22
|
+
## Errors
|
|
23
|
+
| Error | Attempt | Resolution |
|
|
24
|
+
|-------|---------|------------|
|
|
25
|
+
| | 1 | |
|
|
26
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Workflow Status
|
|
2
|
+
|
|
3
|
+
> Tracks progress through the development workflow. Reset this file when starting a new feature, bug fix, or task.
|
|
4
|
+
> Updated automatically after every slash command. Do not edit manually.
|
|
5
|
+
|
|
6
|
+
| # | Step | Status | Notes |
|
|
7
|
+
|---|------|--------|-------|
|
|
8
|
+
| 1 | Read Todo | >> next << | |
|
|
9
|
+
| 2 | Read Lessons | not yet | |
|
|
10
|
+
| 3 | Explore (`/brainstorm`) | not yet | |
|
|
11
|
+
| 4 | Design (`/frontend-design` or `/api-design`) | not yet | optional |
|
|
12
|
+
| 5 | Accessibility (`/accessibility`) | not yet | optional |
|
|
13
|
+
| 6 | Plan (`/write-plan`) | not yet | |
|
|
14
|
+
| 7 | Branch (`/branch`) | not yet | |
|
|
15
|
+
| 8 | Migrate (`/schema-migrate`) | not yet | optional |
|
|
16
|
+
| 9 | Write Tests (`/write-tests`) | not yet | |
|
|
17
|
+
| 10 | Implement (`/execute-plan`) | not yet | |
|
|
18
|
+
| 11 | Commit (`/smart-commit`) | not yet | |
|
|
19
|
+
| 12 | **Lint** (`/lint`) | not yet | HARD GATE — loop until clean |
|
|
20
|
+
| 13 | Commit (`/smart-commit`) | not yet | conditional |
|
|
21
|
+
| 14 | **Verify Tests** (`/test`) | not yet | HARD GATE — 100% coverage |
|
|
22
|
+
| 15 | Commit (`/smart-commit`) | not yet | conditional |
|
|
23
|
+
| 16 | **Security** (`/security-check`) | not yet | HARD GATE — 0 issues |
|
|
24
|
+
| 17 | Commit (`/smart-commit`) | not yet | conditional |
|
|
25
|
+
| 18 | Performance (`/perf`) | not yet | optional gate |
|
|
26
|
+
| 19 | Commit (`/smart-commit`) | not yet | conditional |
|
|
27
|
+
| 20 | **Review** (`/review`) | not yet | HARD GATE — 0 issues |
|
|
28
|
+
| 21 | Commit (`/smart-commit`) | not yet | conditional |
|
|
29
|
+
| 22 | Update (`/update-task`) | not yet | |
|
|
30
|
+
| 23 | Finalize (`/finish-feature`) | not yet | |
|
|
31
|
+
| 24 | Release (`/release`) | not yet | optional |
|