@simplysm/claude 13.0.0-beta.50 → 13.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/claude/skills/sd-brainstorm/SKILL.md +6 -4
- package/claude/skills/sd-plan/SKILL.md +1 -1
- package/package.json +1 -1
- package/claude/agents/sd-security-reviewer.md +0 -82
- package/claude/rules/sd-language.md +0 -7
- package/claude/rules/sd-naming-conventions.md +0 -13
- package/claude/rules/sd-simplysm-docs.md +0 -47
- package/claude/rules/sd-workflow-rules.md +0 -3
|
@@ -52,15 +52,17 @@ Design complete! Here's how to proceed:
|
|
|
52
52
|
1. /sd-worktree add <name> — Create a worktree branch
|
|
53
53
|
2. /sd-plan — Break into detailed tasks
|
|
54
54
|
3. /sd-plan-dev — Execute tasks in parallel (includes TDD + review)
|
|
55
|
-
4. /sd-
|
|
56
|
-
5. /sd-
|
|
57
|
-
6. /sd-worktree
|
|
55
|
+
4. /sd-check — Verify All (typecheck + lint + tests)
|
|
56
|
+
5. /sd-commit — Commit
|
|
57
|
+
6. /sd-worktree merge — Merge back to main
|
|
58
|
+
7. /sd-worktree clean — Remove worktree
|
|
58
59
|
|
|
59
60
|
--- Path B: Direct on current branch (quick fixes/small changes) ---
|
|
60
61
|
|
|
61
62
|
1. /sd-plan — Break into detailed tasks
|
|
62
63
|
2. /sd-plan-dev — Execute tasks in parallel (includes TDD + review)
|
|
63
|
-
3. /sd-
|
|
64
|
+
3. /sd-check — Verify All (typecheck + lint + tests)
|
|
65
|
+
4. /sd-commit — Commit
|
|
64
66
|
|
|
65
67
|
You can start from any step or skip steps as needed.
|
|
66
68
|
```
|
|
@@ -96,7 +96,7 @@ git commit -m "feat: add specific feature"
|
|
|
96
96
|
|
|
97
97
|
## Execution Handoff
|
|
98
98
|
|
|
99
|
-
After saving the plan:
|
|
99
|
+
After saving the plan, display this message **in the system's configured language** (detect from the language setting and translate accordingly):
|
|
100
100
|
|
|
101
101
|
**"Plan complete and saved to `docs/plans/<filename>.md`. Ready to execute with sd-plan-dev?"**
|
|
102
102
|
|
package/package.json
CHANGED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sd-security-reviewer
|
|
3
|
-
description: Reviews ORM queries and service endpoints for SQL injection and input validation vulnerabilities in simplysm's string-escaping ORM
|
|
4
|
-
model: inherit
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You are a security-focused code reviewer for the simplysm framework.
|
|
8
|
-
|
|
9
|
-
## Critical Context
|
|
10
|
-
|
|
11
|
-
simplysm ORM uses **string escaping** (NOT parameter binding) for SQL generation.
|
|
12
|
-
This means application-level input validation is the PRIMARY defense against SQL injection.
|
|
13
|
-
|
|
14
|
-
### Escaping mechanisms in place:
|
|
15
|
-
- MySQL: Backslashes, quotes, NULL bytes, control characters escaped
|
|
16
|
-
- Forces utf8mb4 charset (defends against multi-byte attacks)
|
|
17
|
-
- These are necessary but NOT sufficient without input validation
|
|
18
|
-
|
|
19
|
-
## Review Scope
|
|
20
|
-
|
|
21
|
-
By default, review unstaged changes from `git diff` that touch ORM queries or service endpoints. The user may specify different files or scope.
|
|
22
|
-
|
|
23
|
-
## Review Checklist
|
|
24
|
-
|
|
25
|
-
For every ORM query in the diff, verify:
|
|
26
|
-
|
|
27
|
-
### 1. Input Source Classification
|
|
28
|
-
- [ ] Identify where each query parameter originates (user input, internal data, config)
|
|
29
|
-
- [ ] User input = anything from HTTP request, WebSocket message, file upload
|
|
30
|
-
|
|
31
|
-
### 2. Validation Before Query
|
|
32
|
-
- [ ] User-sourced strings: validated with allowlist or regex before use
|
|
33
|
-
- [ ] Numeric values: `Number()` conversion + `Number.isNaN()` check
|
|
34
|
-
- [ ] Enum values: checked against valid set before use
|
|
35
|
-
- [ ] No raw `req.query`, `req.params`, `req.body` values passed to ORM
|
|
36
|
-
|
|
37
|
-
### 3. Service Endpoint Review
|
|
38
|
-
- [ ] All ServiceServer RPC handlers validate incoming arguments
|
|
39
|
-
- WebSocket message payloads validated before ORM usage
|
|
40
|
-
- [ ] Type coercion applied at service boundary
|
|
41
|
-
|
|
42
|
-
### 4. Dangerous Patterns (flag these)
|
|
43
|
-
|
|
44
|
-
```typescript
|
|
45
|
-
// DANGEROUS: Direct user input in query
|
|
46
|
-
const name = req.query.name;
|
|
47
|
-
db.user().where((u) => [expr.eq(u.name, name)]).result();
|
|
48
|
-
|
|
49
|
-
// SAFE: Validated first
|
|
50
|
-
const name = validateString(req.query.name, { maxLength: 100 });
|
|
51
|
-
db.user().where((u) => [expr.eq(u.name, name)]).result();
|
|
52
|
-
|
|
53
|
-
// SAFE: Type coercion with check
|
|
54
|
-
const id = Number(req.query.id);
|
|
55
|
-
if (Number.isNaN(id)) throw new Error("Invalid ID");
|
|
56
|
-
db.user().where((u) => [expr.eq(u.id, id)]).result();
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Confidence Scoring
|
|
60
|
-
|
|
61
|
-
Rate each potential issue on a scale from 0-100:
|
|
62
|
-
|
|
63
|
-
- **0**: Not an issue. Value comes from trusted internal source.
|
|
64
|
-
- **25**: Unlikely risk. Input is indirectly user-sourced but passes through type coercion.
|
|
65
|
-
- **50**: Moderate risk. User input reaches query but some validation exists.
|
|
66
|
-
- **75**: High risk. User input reaches query with insufficient validation.
|
|
67
|
-
- **100**: Critical. Raw user input directly in query with no validation.
|
|
68
|
-
|
|
69
|
-
**Only report issues with confidence >= 75.**
|
|
70
|
-
|
|
71
|
-
## Output Format
|
|
72
|
-
|
|
73
|
-
Start by stating what files/endpoints you reviewed.
|
|
74
|
-
|
|
75
|
-
For each finding, provide:
|
|
76
|
-
- Severity: **CRITICAL** (confidence >= 90) / **WARNING** (confidence >= 75)
|
|
77
|
-
- File path and line number
|
|
78
|
-
- Input source (where the unvalidated data comes from)
|
|
79
|
-
- Attack vector (specific SQL injection scenario)
|
|
80
|
-
- Concrete fix with code example
|
|
81
|
-
|
|
82
|
-
If no issues found, confirm with a brief summary of what was checked.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Language
|
|
2
|
-
|
|
3
|
-
Respond in the **system's configured language** (set via Claude Code's language setting).
|
|
4
|
-
|
|
5
|
-
- Technical terms, code identifiers (variable names, function names, etc.), and library names should remain as-is
|
|
6
|
-
- Show English error messages and logs in their original form, but provide explanations in the system language
|
|
7
|
-
- Files in `.claude/` folder and each package's `README.md` are written in English for consistent documentation
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Function Naming Conventions
|
|
2
|
-
|
|
3
|
-
- Do not use `Async` suffix on function names — Async is the default
|
|
4
|
-
- When both sync and async versions exist, use `Sync` suffix on the sync function
|
|
5
|
-
|
|
6
|
-
```typescript
|
|
7
|
-
// Good
|
|
8
|
-
async function readFile() { ... } // Async (default)
|
|
9
|
-
function readFileSync() { ... } // Sync version
|
|
10
|
-
|
|
11
|
-
// Bad
|
|
12
|
-
async function readFileAsync() { ... } // Async suffix prohibited
|
|
13
|
-
```
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# @simplysm Package Documentation
|
|
2
|
-
|
|
3
|
-
When you need API details, usage examples, or component props for `@simplysm/*` packages,
|
|
4
|
-
read the package's README.md from node_modules.
|
|
5
|
-
|
|
6
|
-
## How to use
|
|
7
|
-
|
|
8
|
-
Read the package README directly:
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
node_modules/@simplysm/{package-name}/README.md
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
If not found (pnpm hoisting), try:
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
packages/*/node_modules/@simplysm/{package-name}/README.md
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## When to use
|
|
21
|
-
|
|
22
|
-
- Before writing code that uses an unfamiliar `@simplysm/*` API
|
|
23
|
-
- When unsure about component props, method signatures, or configuration
|
|
24
|
-
- When looking for usage patterns or code examples
|
|
25
|
-
|
|
26
|
-
## Available Packages
|
|
27
|
-
|
|
28
|
-
| Package | Description |
|
|
29
|
-
|---------|-------------|
|
|
30
|
-
| `core-common` | Common utilities, custom types (DateTime, DateOnly, Time, Uuid) |
|
|
31
|
-
| `core-browser` | Browser-specific extensions |
|
|
32
|
-
| `core-node` | Node.js utilities (filesystem, workers) |
|
|
33
|
-
| `orm-common` | ORM query builder, table schema definitions |
|
|
34
|
-
| `orm-node` | DB connectors (MySQL, MSSQL, PostgreSQL) |
|
|
35
|
-
| `service-common` | Service protocol, type definitions |
|
|
36
|
-
| `service-client` | WebSocket client |
|
|
37
|
-
| `service-server` | Fastify-based HTTP/WebSocket server |
|
|
38
|
-
| `solid` | SolidJS UI components + Tailwind CSS |
|
|
39
|
-
| `excel` | Excel (.xlsx) read/write |
|
|
40
|
-
| `storage` | FTP/SFTP client |
|
|
41
|
-
| `sd-cli` | Build, lint, typecheck CLI tool |
|
|
42
|
-
| `claude` | Claude Code skills/agents (auto-installs via postinstall) |
|
|
43
|
-
| `eslint-plugin` | Custom ESLint rules |
|
|
44
|
-
| `capacitor-plugin-auto-update` | Auto update |
|
|
45
|
-
| `capacitor-plugin-broadcast` | Broadcast |
|
|
46
|
-
| `capacitor-plugin-file-system` | File system |
|
|
47
|
-
| `capacitor-plugin-usb-storage` | USB storage |
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# Workflow Rules
|
|
2
|
-
|
|
3
|
-
- **No auto-proceeding after skill completion**: When the user explicitly invokes a skill, report the result and **stop** once the skill finishes. Do not guess the next step and proceed arbitrarily. Wait for explicit user instructions if further work is needed.
|