@simplysm/sd-claude 13.0.68 → 13.0.70
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 +12 -601
- package/claude/agents/sd-api-reviewer.md +0 -1
- package/claude/agents/sd-code-reviewer.md +0 -1
- package/claude/agents/sd-code-simplifier.md +1 -1
- package/claude/agents/sd-security-reviewer.md +0 -1
- package/claude/refs/sd-angular.md +26 -26
- package/claude/refs/sd-orm-v12.md +17 -17
- package/claude/rules/sd-refs-linker.md +14 -14
- package/claude/sd-statusline.js +21 -21
- package/claude/skills/sd-api-name-review/SKILL.md +1 -2
- package/claude/skills/sd-brainstorm/SKILL.md +3 -4
- package/claude/skills/sd-check/SKILL.md +2 -2
- package/claude/skills/sd-commit/SKILL.md +1 -2
- package/claude/skills/sd-debug/SKILL.md +1 -2
- package/claude/skills/sd-discuss/SKILL.md +1 -3
- package/claude/skills/sd-document/SKILL.md +99 -0
- package/claude/skills/sd-document/extract_docx.py +92 -0
- package/claude/skills/sd-document/extract_pdf.py +102 -0
- package/claude/skills/sd-document/extract_pptx.py +77 -0
- package/claude/skills/sd-document/extract_xlsx.py +83 -0
- package/claude/skills/sd-email-analyze/SKILL.md +6 -6
- package/claude/skills/sd-plan/SKILL.md +1 -3
- package/claude/skills/sd-plan-dev/SKILL.md +94 -111
- package/claude/skills/sd-plan-dev/code-quality-reviewer-prompt.md +1 -1
- package/claude/skills/sd-plan-dev/final-review-prompt.md +1 -1
- package/claude/skills/sd-plan-dev/spec-reviewer-prompt.md +1 -1
- package/claude/skills/sd-readme/SKILL.md +107 -88
- package/claude/skills/sd-review/SKILL.md +14 -16
- package/claude/skills/sd-skill/SKILL.md +6 -317
- package/claude/skills/sd-skill/cso-guide.md +161 -0
- package/claude/skills/sd-skill/writing-guide.md +163 -0
- package/claude/skills/sd-tdd/SKILL.md +1 -3
- package/claude/skills/sd-use/SKILL.md +26 -26
- package/claude/skills/sd-worktree/SKILL.md +1 -2
- package/dist/commands/auth-add.d.ts +2 -0
- package/dist/commands/auth-add.d.ts.map +1 -0
- package/dist/commands/auth-add.js +32 -0
- package/dist/commands/auth-add.js.map +6 -0
- package/dist/commands/auth-list.d.ts +2 -0
- package/dist/commands/auth-list.d.ts.map +1 -0
- package/dist/commands/auth-list.js +37 -0
- package/dist/commands/auth-list.js.map +6 -0
- package/dist/commands/auth-remove.d.ts +2 -0
- package/dist/commands/auth-remove.d.ts.map +1 -0
- package/dist/commands/auth-remove.js +22 -0
- package/dist/commands/auth-remove.js.map +6 -0
- package/dist/commands/auth-use.d.ts +2 -0
- package/dist/commands/auth-use.d.ts.map +1 -0
- package/dist/commands/auth-use.js +33 -0
- package/dist/commands/auth-use.js.map +6 -0
- package/dist/commands/auth-utils.d.ts +11 -0
- package/dist/commands/auth-utils.d.ts.map +1 -0
- package/dist/commands/auth-utils.js +57 -0
- package/dist/commands/auth-utils.js.map +6 -0
- package/dist/commands/install.js +3 -3
- package/dist/commands/install.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/sd-claude.js +68 -3
- package/dist/sd-claude.js.map +1 -1
- package/package.json +3 -2
- package/scripts/sync-claude-assets.mjs +1 -1
- package/src/commands/auth-add.ts +36 -0
- package/src/commands/auth-list.ts +44 -0
- package/src/commands/auth-remove.ts +26 -0
- package/src/commands/auth-use.ts +53 -0
- package/src/commands/auth-utils.ts +65 -0
- package/src/commands/install.ts +19 -19
- package/src/index.ts +5 -0
- package/src/sd-claude.ts +81 -3
- package/tests/auth-add.spec.ts +74 -0
- package/tests/auth-list.spec.ts +175 -0
- package/tests/auth-remove.spec.ts +74 -0
- package/tests/auth-use.spec.ts +153 -0
- package/tests/auth-utils.spec.ts +173 -0
- package/claude/skills/sd-explore/SKILL.md +0 -78
package/README.md
CHANGED
|
@@ -1,612 +1,23 @@
|
|
|
1
1
|
# @simplysm/sd-claude
|
|
2
2
|
|
|
3
|
-
Simplysm Claude Code CLI — asset installer
|
|
3
|
+
Simplysm Claude Code CLI — asset installer
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
pnpm add -D @simplysm/sd-claude
|
|
9
|
-
# or
|
|
10
|
-
npm install --save-dev @simplysm/sd-claude
|
|
11
|
-
```
|
|
7
|
+
pnpm add @simplysm/sd-claude
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
## Source Index
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
### Commands
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Updates also trigger reinstallation (`pnpm up @simplysm/sd-claude`).
|
|
26
|
-
|
|
27
|
-
### Directory Structure (Published Package)
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
@simplysm/sd-claude/
|
|
31
|
-
dist/
|
|
32
|
-
sd-claude.js # CLI entry point (bin)
|
|
33
|
-
commands/
|
|
34
|
-
install.js # Asset installation logic
|
|
35
|
-
scripts/
|
|
36
|
-
postinstall.mjs # Thin wrapper — calls `sd-claude install`
|
|
37
|
-
sync-claude-assets.mjs # Syncs assets from .claude/ before publish
|
|
38
|
-
claude/
|
|
39
|
-
sd-statusline.js # Status line script
|
|
40
|
-
rules/
|
|
41
|
-
sd-refs-linker.md # Reference guide rule (reads .claude/refs/ before work)
|
|
42
|
-
sd-language.md # Language response rule
|
|
43
|
-
refs/
|
|
44
|
-
sd-code-conventions.md # Code style and naming conventions reference
|
|
45
|
-
sd-directories.md # Directory layout reference (.cache/, .tmp/playwright/)
|
|
46
|
-
sd-simplysm-docs.md # @simplysm/* package documentation lookup reference
|
|
47
|
-
sd-workflow.md # Workflow behavior and problem-solving principles
|
|
48
|
-
sd-solid.md # SolidJS / @simplysm/solid / Tailwind guidelines
|
|
49
|
-
sd-orm.md # ORM query patterns and SQL injection prevention
|
|
50
|
-
sd-service.md # Service layer guidelines
|
|
51
|
-
agents/
|
|
52
|
-
sd-code-reviewer.md # Code review agent
|
|
53
|
-
sd-code-simplifier.md # Code simplification agent
|
|
54
|
-
sd-api-reviewer.md # API/DX review agent
|
|
55
|
-
sd-security-reviewer.md # ORM SQL injection and input validation agent
|
|
56
|
-
hooks/
|
|
57
|
-
sd-notify.py # Windows toast notification hook (Stop event)
|
|
58
|
-
skills/
|
|
59
|
-
sd-brainstorm/ # Brainstorming skill
|
|
60
|
-
sd-plan/ # Plan writing skill
|
|
61
|
-
sd-plan-dev/ # Plan execution skill
|
|
62
|
-
sd-tdd/ # Test-driven development skill
|
|
63
|
-
sd-debug/ # Systematic debugging skill
|
|
64
|
-
sd-review/ # Comprehensive code review skill
|
|
65
|
-
sd-check/ # Typecheck + lint + test skill
|
|
66
|
-
sd-commit/ # Git commit skill
|
|
67
|
-
sd-readme/ # README update skill
|
|
68
|
-
sd-worktree/ # Git worktree management skill
|
|
69
|
-
sd-explore/ # Codebase analysis skill
|
|
70
|
-
sd-use/ # Auto skill/agent router
|
|
71
|
-
sd-skill/ # Skill authoring skill
|
|
72
|
-
sd-api-name-review/ # API naming review skill
|
|
73
|
-
sd-discuss/ # Standards-based technical discussion skill
|
|
74
|
-
sd-eml-analyze/ # EML email file analysis skill
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## CLI Commands
|
|
78
|
-
|
|
79
|
-
The package provides an `sd-claude` binary:
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
# Install Claude Code assets to the project's .claude/ directory
|
|
83
|
-
sd-claude install
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
`sd-claude install` is called automatically by the `postinstall` script.
|
|
87
|
-
|
|
88
|
-
## Programmatic API
|
|
89
|
-
|
|
90
|
-
```typescript
|
|
91
|
-
import { runInstall } from "@simplysm/sd-claude";
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### runInstall
|
|
95
|
-
|
|
96
|
-
```typescript
|
|
97
|
-
function runInstall(): void
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Installs Claude Code assets to the project's `.claude/` directory. Performs:
|
|
101
|
-
- Finds project root via `INIT_CWD` or `node_modules` path traversal
|
|
102
|
-
- Skips if running inside the simplysm monorepo itself
|
|
103
|
-
- Cleans existing `sd-*` entries, then copies fresh versions from the package's `claude/` directory
|
|
104
|
-
- Configures `statusLine` in `.claude/settings.json`
|
|
105
|
-
|
|
106
|
-
## Skills
|
|
107
|
-
|
|
108
|
-
Skills are invoked via `/sd-<name>` slash commands in Claude Code.
|
|
109
|
-
|
|
110
|
-
### sd-brainstorm
|
|
111
|
-
|
|
112
|
-
Collaborative design exploration before implementation. Helps turn ideas into fully formed designs through natural dialogue. Should be used before any creative work — creating features, building components, or modifying behavior.
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
/sd-brainstorm add a modal component to the UI library
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**Process:**
|
|
119
|
-
- Checks project context (files, docs, recent commits)
|
|
120
|
-
- Asks questions one at a time (multiple choice preferred)
|
|
121
|
-
- Proposes 2-3 approaches with trade-offs
|
|
122
|
-
- Presents design in 200-300 word sections with validation
|
|
123
|
-
- Saves validated design to `docs/plans/YYYY-MM-DD-<topic>-design.md`
|
|
124
|
-
- Commits the design document to git
|
|
125
|
-
- Stops after saving the design — does not auto-proceed to `/sd-plan`
|
|
126
|
-
|
|
127
|
-
### sd-plan
|
|
128
|
-
|
|
129
|
-
Creates comprehensive implementation plans with TDD, assuming the implementer has zero codebase context.
|
|
130
|
-
|
|
131
|
-
```
|
|
132
|
-
/sd-plan
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
**Process:**
|
|
136
|
-
- Reads requirements/spec
|
|
137
|
-
- Creates bite-sized tasks (2-5 minutes each)
|
|
138
|
-
- Each task includes: exact file paths, complete code, test commands with expected output
|
|
139
|
-
- Saves plan to `docs/plans/YYYY-MM-DD-<feature-name>.md`
|
|
140
|
-
- Auto-executes `sd-plan-dev` in yolo mode; otherwise waits for confirmation
|
|
141
|
-
|
|
142
|
-
**Plan document header format:**
|
|
143
|
-
```markdown
|
|
144
|
-
# [Feature Name] Implementation Plan
|
|
145
|
-
|
|
146
|
-
> **For Claude:** REQUIRED SUB-SKILL: Use sd-plan-dev to implement this plan task-by-task.
|
|
147
|
-
|
|
148
|
-
**Goal:** [One sentence describing what this builds]
|
|
149
|
-
**Architecture:** [2-3 sentences about approach]
|
|
150
|
-
**Tech Stack:** [Key technologies/libraries]
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
**Task structure:**
|
|
154
|
-
1. Write the failing test
|
|
155
|
-
2. Run it to verify it fails
|
|
156
|
-
3. Implement minimal code
|
|
157
|
-
4. Run test to verify it passes
|
|
158
|
-
5. Commit
|
|
159
|
-
|
|
160
|
-
### sd-plan-dev
|
|
161
|
-
|
|
162
|
-
Executes implementation plans via parallel Task agents with dependency-aware scheduling.
|
|
163
|
-
|
|
164
|
-
```
|
|
165
|
-
/sd-plan-dev
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
**Process:**
|
|
169
|
-
- Reads plan, extracts full task text
|
|
170
|
-
- Analyzes file dependencies to build a task graph
|
|
171
|
-
- Groups independent tasks into parallel batches
|
|
172
|
-
- Each task agent: implements, launches parallel spec + quality review sub-Tasks, fixes issues
|
|
173
|
-
- Repeats review cycle until both reviewers approve
|
|
174
|
-
- Runs batch integration check (typecheck + lint) between batches
|
|
175
|
-
- Final review Task across entire implementation
|
|
176
|
-
|
|
177
|
-
**Agents used per task:**
|
|
178
|
-
- **Task agent** (implementer) — implements the task, runs sub-Tasks for review
|
|
179
|
-
- **Spec reviewer** sub-Task (`model: opus`) — verifies spec compliance
|
|
180
|
-
- **Quality reviewer** sub-Task (`model: opus`) — reviews code quality
|
|
181
|
-
- **Final reviewer** sub-Task (`model: opus`) — cross-task integration check
|
|
182
|
-
|
|
183
|
-
**If task agent returns questions:** orchestrator answers and re-launches that agent; other parallel agents continue unaffected.
|
|
184
|
-
|
|
185
|
-
### sd-tdd
|
|
186
|
-
|
|
187
|
-
Test-driven development workflow. Enforces the Red-Green-Refactor cycle. Internally used by other skills (`user-invocable: false`); typically not invoked directly by the user.
|
|
188
|
-
|
|
189
|
-
**Iron Law:** No production code without a failing test first.
|
|
190
|
-
|
|
191
|
-
**Cycle:**
|
|
192
|
-
1. **RED** - Write one minimal failing test
|
|
193
|
-
2. **Verify RED** - Run test, confirm it fails for the right reason
|
|
194
|
-
3. **GREEN** - Write simplest code to pass
|
|
195
|
-
4. **Verify GREEN** - Run test, confirm all pass
|
|
196
|
-
5. **REFACTOR** - Clean up while keeping tests green
|
|
197
|
-
|
|
198
|
-
### sd-debug
|
|
199
|
-
|
|
200
|
-
Systematic debugging workflow. Enforces root-cause investigation before any fix attempt.
|
|
201
|
-
|
|
202
|
-
```
|
|
203
|
-
/sd-debug
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
**Iron Law:** No fixes without root-cause investigation first.
|
|
207
|
-
|
|
208
|
-
**When to use:** Any technical issue — test failures, bugs, unexpected behavior, performance problems, build failures, integration issues. Use especially under time pressure or after multiple failed fix attempts.
|
|
209
|
-
|
|
210
|
-
**Four Phases:**
|
|
211
|
-
|
|
212
|
-
1. **Root Cause Investigation** — Read error messages carefully, reproduce consistently, read source code directly (not git diff), gather evidence by adding diagnostic instrumentation at each component boundary, trace data flow backward through the call stack
|
|
213
|
-
2. **Pattern Analysis** — Find working examples in the codebase, compare against references, identify differences, understand dependencies
|
|
214
|
-
3. **Hypothesis and Testing** — Form a single specific hypothesis, make the smallest possible change to test it, verify before continuing
|
|
215
|
-
4. **Implementation** — Create a failing test case (use `sd-tdd`), implement single fix addressing the root cause, verify fix
|
|
216
|
-
|
|
217
|
-
**3+ fixes failed:** Stop and question the architecture — discuss with the user before attempting more fixes.
|
|
218
|
-
|
|
219
|
-
**Supporting techniques** (in the skill directory):
|
|
220
|
-
- `root-cause-tracing.md` — Trace bugs backward through call stack
|
|
221
|
-
- `defense-in-depth.md` — Add validation at multiple layers
|
|
222
|
-
- `condition-based-waiting.md` — Replace arbitrary timeouts with condition polling
|
|
223
|
-
|
|
224
|
-
### sd-check
|
|
225
|
-
|
|
226
|
-
Verifies code via typecheck, lint, and tests. Fixes errors automatically and re-runs until all checks pass.
|
|
227
|
-
|
|
228
|
-
```
|
|
229
|
-
/sd-check
|
|
230
|
-
/sd-check packages/core-common
|
|
231
|
-
/sd-check test
|
|
232
|
-
/sd-check packages/core-common lint
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
**Process (fix-and-retry):**
|
|
236
|
-
1. **Run** `pnpm check [path] [--type typecheck|lint|test]` (timeout: 600000ms)
|
|
237
|
-
2. **All passed?** Report with actual output numbers — done
|
|
238
|
-
3. **Errors?** Fix in priority order: typecheck → lint → test
|
|
239
|
-
- E2E test failures: use Playwright MCP to inspect page state before fixing
|
|
240
|
-
- Stuck after 2-3 attempts → recommend `/sd-debug`
|
|
241
|
-
4. **Re-run ALL checks** after any fix — never assume other checks still pass
|
|
242
|
-
|
|
243
|
-
**No path argument:** defaults to verifying the entire project.
|
|
244
|
-
|
|
245
|
-
### sd-review
|
|
246
|
-
|
|
247
|
-
Multi-perspective code review of a package or path. Analysis only, no code modifications.
|
|
248
|
-
|
|
249
|
-
```
|
|
250
|
-
/sd-review packages/solid
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
**Process:**
|
|
254
|
-
1. Runs `sd-explore` skill for deep code analysis (separate context, does not consume main context window)
|
|
255
|
-
2. Dispatches up to 4 parallel reviewer agents via Task tool (including `sd-explore` analysis in each prompt):
|
|
256
|
-
- `sd-code-reviewer` — bugs, security, logic errors, conventions (always)
|
|
257
|
-
- `sd-code-simplifier` — complexity, duplication, readability (always)
|
|
258
|
-
- `sd-api-reviewer` — DX/usability, naming, type hints (always)
|
|
259
|
-
- `sd-security-reviewer` — ORM SQL injection, input validation (conditional: only when target contains ORM queries or service endpoints)
|
|
260
|
-
3. Verifies each finding against actual code (filters invalid, handled, or misread findings)
|
|
261
|
-
4. Produces comprehensive report grouped by severity
|
|
262
|
-
|
|
263
|
-
**Report sections:**
|
|
264
|
-
|
|
265
|
-
| Section | Priority |
|
|
266
|
-
|---------|----------|
|
|
267
|
-
| Architecture Summary | — |
|
|
268
|
-
| Critical Issues | P0 |
|
|
269
|
-
| Security Issues | P0 (when sd-security-reviewer ran) |
|
|
270
|
-
| Quality Issues | P1 |
|
|
271
|
-
| DX/Usability Issues | P2 |
|
|
272
|
-
| Simplification Opportunities | P3 |
|
|
273
|
-
| Convention Issues | P4 |
|
|
274
|
-
|
|
275
|
-
### sd-commit
|
|
276
|
-
|
|
277
|
-
Creates a git commit following Conventional Commits style.
|
|
278
|
-
|
|
279
|
-
```
|
|
280
|
-
/sd-commit
|
|
281
|
-
/sd-commit all
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
- Without `all`: stages only context-relevant files individually (single commit)
|
|
285
|
-
- With `all`: may split into multiple commits grouped by intent/purpose — files across packages with the same intent go in one commit
|
|
286
|
-
- Commit message format: `type(scope): short description`
|
|
287
|
-
|
|
288
|
-
### sd-readme
|
|
289
|
-
|
|
290
|
-
Syncs package README.md with current source code by comparing exports against documentation.
|
|
291
|
-
|
|
292
|
-
```
|
|
293
|
-
/sd-readme # Update all package READMEs in parallel
|
|
294
|
-
/sd-readme packages/solid # Update a single package README
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
**Batch mode** (no argument): discovers all packages via Glob, launches parallel sonnet subagents — one for the project root README and one per package. Reports which READMEs were updated vs. already up to date.
|
|
298
|
-
|
|
299
|
-
**Single package process:**
|
|
300
|
-
1. Reads `src/index.ts` to build the export map (source of truth)
|
|
301
|
-
2. Reads existing README.md to build the documentation map
|
|
302
|
-
3. Diffs: ADDED (exported but not documented), REMOVED (documented but not exported), CHANGED (API signature differs), OK (matches)
|
|
303
|
-
4. Reports findings and waits for user confirmation
|
|
304
|
-
5. Applies updates — only touches ADDED/REMOVED/CHANGED items
|
|
305
|
-
|
|
306
|
-
### sd-worktree
|
|
307
|
-
|
|
308
|
-
Git worktree management for branch isolation during feature work. All operations use `sd-worktree.mjs` script.
|
|
309
|
-
|
|
310
|
-
```
|
|
311
|
-
/sd-worktree add modal-migration # Create worktree
|
|
312
|
-
/sd-worktree rebase # Rebase onto main
|
|
313
|
-
/sd-worktree merge # Merge into main (--no-ff)
|
|
314
|
-
/sd-worktree clean modal-migration # Remove worktree and branch
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
**Target resolution:** if no name is provided in args, auto-detects from current directory if inside `.worktrees/<name>/`; otherwise asks the user.
|
|
318
|
-
|
|
319
|
-
**Commands:**
|
|
320
|
-
|
|
321
|
-
| Command | Description |
|
|
322
|
-
|---------|-------------|
|
|
323
|
-
| `add <name>` | Derive kebab-case name from description, create worktree under `.worktrees/<name>`, cd into it |
|
|
324
|
-
| `rebase [name]` | Rebase worktree branch onto main branch; errors if uncommitted changes exist |
|
|
325
|
-
| `merge [name]` | Merge worktree branch into main with `--no-ff`; errors if uncommitted changes exist |
|
|
326
|
-
| `clean <name>` | Remove worktree directory and delete branch; must cd to project root first |
|
|
327
|
-
|
|
328
|
-
**Full workflow:**
|
|
329
|
-
```
|
|
330
|
-
/sd-worktree add modal-migration
|
|
331
|
-
# ... work in .worktrees/modal-migration ...
|
|
332
|
-
/sd-worktree rebase
|
|
333
|
-
/sd-worktree merge
|
|
334
|
-
cd <project-root>
|
|
335
|
-
/sd-worktree clean modal-migration
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
### sd-explore
|
|
339
|
-
|
|
340
|
-
Deep codebase analysis. Traces execution paths, maps architecture layers, and documents dependencies. Analysis only, no code modifications. Not user-invocable — called programmatically by `sd-review` and other agents.
|
|
341
|
-
|
|
342
|
-
**Covers:**
|
|
343
|
-
- Feature discovery (entry points, core files, boundaries)
|
|
344
|
-
- Code flow tracing (call chains, data transformations, side effects)
|
|
345
|
-
- Architecture analysis (abstraction layers, design patterns, interfaces)
|
|
346
|
-
- Implementation details (algorithms, error handling, performance)
|
|
347
|
-
|
|
348
|
-
### sd-use
|
|
349
|
-
|
|
350
|
-
Auto skill/agent router. Analyzes the user request and selects the best matching `sd-*` skill or agent, explains the selection, then executes immediately.
|
|
351
|
-
|
|
352
|
-
```
|
|
353
|
-
/sd-use review the solid package for bugs
|
|
354
|
-
# Selects sd-review and executes it
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
**Catalog includes:** `sd-brainstorm`, `sd-debug`, `sd-tdd`, `sd-plan`, `sd-plan-dev`, `sd-explore`, `sd-review`, `sd-check`, `sd-commit`, `sd-readme`, `sd-discuss`, `sd-api-name-review`, `sd-worktree`, `sd-skill` (skills), and `sd-code-reviewer`, `sd-code-simplifier`, `sd-api-reviewer` (agents).
|
|
358
|
-
|
|
359
|
-
### sd-skill
|
|
360
|
-
|
|
361
|
-
Skill authoring tool. Creates new skills using TDD methodology applied to documentation.
|
|
362
|
-
|
|
363
|
-
```
|
|
364
|
-
/sd-skill
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
**Process (Red-Green-Refactor for documentation):**
|
|
368
|
-
1. **RED** - Run pressure scenarios without skill, document baseline failures (exact rationalizations)
|
|
369
|
-
2. **GREEN** - Write minimal skill addressing those specific failures
|
|
370
|
-
3. **REFACTOR** - Close loopholes, add rationalization table and red flags list, re-test
|
|
371
|
-
|
|
372
|
-
**SKILL.md frontmatter:** only `name` and `description` fields (max 1024 characters). Description starts with "Use when..." and describes triggering conditions only — never summarizes the skill's workflow.
|
|
373
|
-
|
|
374
|
-
### sd-api-name-review
|
|
375
|
-
|
|
376
|
-
Reviews a library's public API naming for consistency and industry standard alignment. Analysis only, no code modifications.
|
|
377
|
-
|
|
378
|
-
```
|
|
379
|
-
/sd-api-name-review packages/solid
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
**Phases:**
|
|
383
|
-
1. Use an Explore agent to extract the public API surface (exported identifiers, parameter names, naming patterns)
|
|
384
|
-
2. Research industry standard naming via parallel web-search agents for comparable libraries
|
|
385
|
-
3. Comparative analysis report
|
|
386
|
-
|
|
387
|
-
| Priority | Criteria |
|
|
388
|
-
|----------|----------|
|
|
389
|
-
| **P0** | Misaligned with majority of surveyed libraries |
|
|
390
|
-
| **P1** | Internal inconsistency (same concept, different names) |
|
|
391
|
-
| **P2** | Better industry term exists (optional) |
|
|
392
|
-
| **Keep** | Already aligned with standards |
|
|
393
|
-
|
|
394
|
-
### sd-discuss
|
|
395
|
-
|
|
396
|
-
Standards-based technical discussion skill. Evaluates code design decisions against industry standards and project conventions before forming opinions.
|
|
397
|
-
|
|
398
|
-
```
|
|
399
|
-
/sd-discuss class vs functional components for this use case
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
**When to use:** Evaluating code design decisions — class vs functional, pattern choices, architecture trade-offs, technology selection.
|
|
403
|
-
|
|
404
|
-
**Process:**
|
|
405
|
-
1. Asks one question to understand the user's motivation and constraints
|
|
406
|
-
2. Researches BEFORE forming any opinion:
|
|
407
|
-
- Project research (Read/Grep): reads related source code, CLAUDE.md, existing patterns
|
|
408
|
-
- Industry research (WebSearch): community consensus, specifications, benchmarks, comparable libraries
|
|
409
|
-
3. Presents each option with equal depth, advocating FOR each
|
|
410
|
-
4. Provides a decision matrix comparing options across criteria
|
|
411
|
-
5. Asks which criteria matter most to the user — does NOT give a unilateral recommendation
|
|
412
|
-
|
|
413
|
-
**Key rules:** Research first, opinion last. Equal advocacy for each option. Evidence over intuition. No "obvious" answers.
|
|
414
|
-
|
|
415
|
-
### sd-eml-analyze
|
|
416
|
-
|
|
417
|
-
EML email file analysis skill. Parses `.eml` files and extracts content from all attachments into a structured markdown report.
|
|
418
|
-
|
|
419
|
-
```
|
|
420
|
-
/sd-eml-analyze path/to/email.eml
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
**When to use:** When a user provides a `.eml` file to analyze, summarize, or extract attachments from (PDF, XLSX, PPTX).
|
|
424
|
-
|
|
425
|
-
**Internally runs:**
|
|
426
|
-
```bash
|
|
427
|
-
python .claude/skills/sd-eml-analyze/eml-analyzer.py <eml_file_path>
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
First run auto-installs required Python packages: `pdfminer.six`, `python-pptx`, `openpyxl`.
|
|
431
|
-
|
|
432
|
-
**Output:** Markdown report with mail info table, body text, and per-attachment extracted content.
|
|
433
|
-
|
|
434
|
-
**Supported attachments:**
|
|
435
|
-
|
|
436
|
-
| Format | Method |
|
|
437
|
-
|--------|--------|
|
|
438
|
-
| PDF | pdfminer.six text extraction |
|
|
439
|
-
| XLSX/XLS | openpyxl cell data as markdown table |
|
|
440
|
-
| PPTX | python-pptx slide text + tables + notes |
|
|
441
|
-
| Text files (.txt, .csv, .json, .xml, .html, .md) | UTF-8/CP949 decode |
|
|
442
|
-
| Images | Filename and size only |
|
|
443
|
-
|
|
444
|
-
Handles Korean encodings (EUC-KR, CP949, ks_c_5601-1987) automatically.
|
|
445
|
-
|
|
446
|
-
## Agents
|
|
447
|
-
|
|
448
|
-
Agents are used by skills as subagents via the Task tool, or can be invoked directly.
|
|
449
|
-
|
|
450
|
-
### sd-code-reviewer
|
|
451
|
-
|
|
452
|
-
Reviews code for bugs, logic errors, security vulnerabilities, and convention adherence. Uses confidence-based filtering (only reports issues with confidence >= 80).
|
|
453
|
-
|
|
454
|
-
**Severity levels:** Critical, Important
|
|
455
|
-
|
|
456
|
-
**Scope:** By default reviews unstaged changes from `git diff`. Can be directed to specific files.
|
|
457
|
-
|
|
458
|
-
### sd-code-simplifier
|
|
459
|
-
|
|
460
|
-
Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code.
|
|
461
|
-
|
|
462
|
-
**Focus areas:**
|
|
463
|
-
- Reduce unnecessary complexity and nesting
|
|
464
|
-
- Eliminate redundant code and abstractions
|
|
465
|
-
- Improve readability through clear naming
|
|
466
|
-
- Avoid nested ternaries (prefer switch/if-else)
|
|
467
|
-
|
|
468
|
-
### sd-api-reviewer
|
|
469
|
-
|
|
470
|
-
Reviews a library's public API for developer experience (DX) quality. Uses confidence-based filtering (only reports issues with confidence >= 70).
|
|
471
|
-
|
|
472
|
-
**Review categories:**
|
|
473
|
-
- Naming consistency and industry standard alignment
|
|
474
|
-
- API intuitiveness and learning curve
|
|
475
|
-
- Type hints and error message quality
|
|
476
|
-
- Configuration complexity and boilerplate
|
|
477
|
-
- Usage pattern coherence
|
|
478
|
-
|
|
479
|
-
**Priority levels:** P0 (API misuse likely), P1 (significant friction), P2 (minor improvement), Keep (already aligned)
|
|
480
|
-
|
|
481
|
-
### sd-security-reviewer
|
|
482
|
-
|
|
483
|
-
Reviews ORM queries and service endpoints for SQL injection and input validation vulnerabilities specific to simplysm's string-escaping ORM. Dispatched conditionally by `sd-review` when the target contains ORM queries or service endpoints.
|
|
484
|
-
|
|
485
|
-
**Context:** simplysm ORM uses string escaping (not parameter binding), so application-level input validation is the primary defense.
|
|
486
|
-
|
|
487
|
-
**Review checklist:**
|
|
488
|
-
- Input source classification (user input vs. internal data)
|
|
489
|
-
- Validation before ORM query: allowlist/regex for strings, `Number()` + `isNaN()` for numerics, enum allowlisting
|
|
490
|
-
- Service endpoint validation: RPC handler arguments, WebSocket message payloads
|
|
491
|
-
|
|
492
|
-
**Confidence threshold:** Only reports issues with confidence >= 75.
|
|
493
|
-
|
|
494
|
-
**Severity:** CRITICAL (confidence >= 90), WARNING (confidence >= 75)
|
|
495
|
-
|
|
496
|
-
## Rules
|
|
497
|
-
|
|
498
|
-
Rules are loaded automatically by Claude Code for all conversations in the project.
|
|
499
|
-
|
|
500
|
-
### sd-refs-linker
|
|
501
|
-
|
|
502
|
-
Instructs Claude to read the relevant reference file from `.claude/refs/` before starting work. Maps task types to specific reference files:
|
|
503
|
-
|
|
504
|
-
| When | Reference file |
|
|
505
|
-
|------|----------------|
|
|
506
|
-
| Writing or modifying code | `sd-code-conventions.md` |
|
|
507
|
-
| Working with `.cache/` or Playwright screenshots | `sd-directories.md` |
|
|
508
|
-
| Using `@simplysm/*` package APIs | `sd-simplysm-docs.md` |
|
|
509
|
-
| Debugging, problem-solving, or planning | `sd-workflow.md` |
|
|
510
|
-
| SolidJS / @simplysm/solid / Tailwind work | `sd-solid.md` |
|
|
511
|
-
| Using `@simplysm/orm-*` | `sd-orm.md` |
|
|
512
|
-
| Using `@simplysm/service-*` | `sd-service.md` |
|
|
513
|
-
|
|
514
|
-
### sd-language
|
|
515
|
-
|
|
516
|
-
Instructs Claude to respond in the system's configured language setting, while keeping technical terms, code identifiers, and library names unchanged. English error messages and logs are preserved in their original form.
|
|
517
|
-
|
|
518
|
-
## Refs
|
|
519
|
-
|
|
520
|
-
Reference files in `.claude/refs/` are consumed by Claude when the `sd-refs-linker` rule directs it to read them.
|
|
521
|
-
|
|
522
|
-
### sd-code-conventions
|
|
523
|
-
|
|
524
|
-
Code style and naming conventions for the simplysm monorepo:
|
|
525
|
-
- Generic type parameter naming (`TItem`, `TData`, not plain `T`)
|
|
526
|
-
- Prototype extension methods available from `@simplysm/core-common`
|
|
527
|
-
- Function naming: no `Async` suffix (async is the default); `Sync` suffix for synchronous variants
|
|
528
|
-
- File naming: auxiliary files prefixed with the main file name
|
|
529
|
-
- JSDoc: optional, use Korean when written
|
|
530
|
-
|
|
531
|
-
### sd-directories
|
|
532
|
-
|
|
533
|
-
Directory layout reference:
|
|
534
|
-
- `.cache/` — build cache (`eslint.cache`, `typecheck-{env}.tsbuildinfo`, `dts.tsbuildinfo`). Reset by deleting `.cache/`
|
|
535
|
-
- `.tmp/playwright/` — Playwright MCP output directory; screenshots must always be saved here
|
|
536
|
-
|
|
537
|
-
### sd-simplysm-docs
|
|
538
|
-
|
|
539
|
-
Instructs Claude to read `@simplysm/*` package documentation from local `node_modules/` README.md files. Includes an embedded package list so Claude can immediately identify which package to look up.
|
|
540
|
-
|
|
541
|
-
```
|
|
542
|
-
# Claude automatically reads when needing @simplysm/* docs:
|
|
543
|
-
node_modules/@simplysm/{package-name}/README.md
|
|
544
|
-
```
|
|
545
|
-
|
|
546
|
-
### sd-workflow
|
|
547
|
-
|
|
548
|
-
Workflow behavior and problem-solving principles:
|
|
549
|
-
- No auto-proceeding after skill completion (report and stop; exception: yolo mode)
|
|
550
|
-
- Root cause first — investigate before fixing; no band-aid patches
|
|
551
|
-
- Pre-coding checklist: read similar files before creating new ones
|
|
552
|
-
- Memory policy: do not use auto memory; all persistent knowledge belongs in `.claude/rules/` or project docs
|
|
553
|
-
|
|
554
|
-
### sd-solid
|
|
555
|
-
|
|
556
|
-
SolidJS / `@simplysm/solid` / Tailwind CSS guidelines covering component model differences from React, props design rules, compound component patterns, Tailwind semantic color/z-index tokens, and application view naming conventions.
|
|
557
|
-
|
|
558
|
-
### sd-orm
|
|
559
|
-
|
|
560
|
-
ORM query patterns and SQL injection prevention for simplysm ORM, which uses string escaping rather than parameter binding. Covers table definition syntax and mandatory input validation before queries.
|
|
561
|
-
|
|
562
|
-
### sd-service
|
|
563
|
-
|
|
564
|
-
Service layer guidelines for `ServiceServer`, `ServiceClient`, and `ServiceProtocol`.
|
|
565
|
-
|
|
566
|
-
## Hooks
|
|
567
|
-
|
|
568
|
-
Hooks run automatically at Claude Code lifecycle events.
|
|
569
|
-
|
|
570
|
-
### sd-notify.py
|
|
571
|
-
|
|
572
|
-
Windows toast notification hook. Fires on the `Stop` event (when Claude Code finishes a task) and displays a Windows balloon tip notification showing the current folder name and a completion message.
|
|
573
|
-
|
|
574
|
-
Requires Python 3 and PowerShell (Windows only). Uses `System.Windows.Forms.NotifyIcon` via PowerShell.
|
|
575
|
-
|
|
576
|
-
## Status Line
|
|
577
|
-
|
|
578
|
-
`sd-statusline.js` displays a Claude Code status bar with:
|
|
579
|
-
|
|
580
|
-
- Model name
|
|
581
|
-
- Context window usage (progress bar + percentage)
|
|
582
|
-
- Daily rate limit usage with reset time (via OAuth API)
|
|
583
|
-
- Weekly rate limit usage with reset time (via OAuth API or stdin fallback)
|
|
584
|
-
- Extra usage credits (if enabled)
|
|
585
|
-
- Current folder name
|
|
586
|
-
|
|
587
|
-
The script reads Claude Code's stdin JSON for context window and model info, and optionally fetches usage data from `https://api.anthropic.com/api/oauth/usage` using the OAuth token from `~/.claude/.credentials.json`.
|
|
588
|
-
|
|
589
|
-
## Scripts
|
|
590
|
-
|
|
591
|
-
### postinstall.mjs
|
|
592
|
-
|
|
593
|
-
Thin wrapper that runs automatically on `pnpm install` / `npm install`. If `dist/` exists (i.e., the package is built), it invokes `sd-claude install` CLI command. Skips silently in monorepo development environments where `dist/` has not been built yet.
|
|
594
|
-
|
|
595
|
-
### sync-claude-assets.mjs
|
|
596
|
-
|
|
597
|
-
Runs before `npm pack` / `npm publish` (via `prepack` script). Syncs `sd-*` assets from the project root's `.claude/` directory into the package's `claude/` directory for distribution.
|
|
598
|
-
|
|
599
|
-
## Caveats
|
|
600
|
-
|
|
601
|
-
- If using `pnpm install --ignore-scripts`, the postinstall won't run
|
|
602
|
-
- If using `onlyBuiltDependencies` in `pnpm-workspace.yaml`, add `@simplysm/sd-claude` to the list
|
|
603
|
-
- Skills and agents use the `sd-` prefix to distinguish them from user-defined assets
|
|
604
|
-
- Existing `sd-*` entries are always replaced with the latest version on install
|
|
605
|
-
- `sd-notify.py` hook requires Windows and Python 3
|
|
606
|
-
|
|
607
|
-
## Dependencies
|
|
608
|
-
|
|
609
|
-
- `yargs` — CLI argument parsing
|
|
13
|
+
| Source | Exports | Description | Test |
|
|
14
|
+
|--------|---------|-------------|------|
|
|
15
|
+
| `src/commands/install.ts` | `runInstall` | Copies sd-* Claude Code assets into the project's `.claude/` directory | `-` |
|
|
16
|
+
| `src/commands/auth-utils.ts` | `validateName`, `getProfileDir`, `profileExists`, `listProfiles`, `readCurrentAuth`, `readCurrentCredentials`, `getCurrentUserID` | Shared helpers for reading and locating Claude auth profile data | `auth-utils.spec.ts` |
|
|
17
|
+
| `src/commands/auth-add.ts` | `runAuthAdd` | Saves the current Claude login session as a named auth profile | `auth-add.spec.ts` |
|
|
18
|
+
| `src/commands/auth-use.ts` | `runAuthUse` | Switches the active Claude login to a saved named profile | `auth-use.spec.ts` |
|
|
19
|
+
| `src/commands/auth-list.ts` | `runAuthList` | Lists all saved auth profiles with email and token expiry info | `auth-list.spec.ts` |
|
|
20
|
+
| `src/commands/auth-remove.ts` | `runAuthRemove` | Deletes a saved auth profile from the local profile store | `auth-remove.spec.ts` |
|
|
610
21
|
|
|
611
22
|
## License
|
|
612
23
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sd-api-reviewer
|
|
3
3
|
description: Reviews a library's public API for developer experience (DX) quality - naming consistency, industry standard alignment, intuitiveness, error messages, type hints, configuration complexity, and usage pattern coherence
|
|
4
|
-
model: opus
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
You are an expert API/DX reviewer who evaluates libraries from the **consumer's perspective**. Your goal is to identify friction points that developers encounter when using a package.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sd-code-reviewer
|
|
3
3
|
description: Reviews code for bugs, logic errors, security vulnerabilities, code quality issues, and adherence to project conventions, using confidence-based filtering to report only high-priority issues that truly matter
|
|
4
|
-
model: opus
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
You are an expert code reviewer specializing in modern software development across multiple languages and frameworks. Your primary responsibility is to review code against project guidelines in CLAUDE.md with high precision to minimize false positives.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sd-code-simplifier
|
|
3
3
|
description: Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.
|
|
4
|
-
model:
|
|
4
|
+
model: sonnet
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
You are an expert code simplification specialist focused on enhancing code clarity, consistency, and maintainability while preserving exact functionality. Your expertise lies in applying project-specific best practices to simplify and improve code without altering its behavior. You prioritize readable, explicit code over overly compact solutions. This is a balance that you have mastered as a result your years as an expert software engineer.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sd-security-reviewer
|
|
3
3
|
description: Reviews ORM queries and service endpoints for SQL injection and input validation vulnerabilities in simplysm's string-escaping ORM
|
|
4
|
-
model: opus
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
You are a security-focused code reviewer for the simplysm framework.
|