start-vibing 3.0.5 → 3.0.7

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.
Files changed (24) hide show
  1. package/package.json +1 -1
  2. package/template/.claude/skills/bun-runtime/SKILL.md +1 -1
  3. package/template/.claude/skills/codebase-knowledge/SKILL.md +145 -145
  4. package/template/.claude/skills/debugging-patterns/SKILL.md +1 -1
  5. package/template/.claude/skills/docker-patterns/SKILL.md +6 -0
  6. package/template/.claude/skills/docs-tracker/SKILL.md +239 -239
  7. package/template/.claude/skills/final-check/SKILL.md +284 -284
  8. package/template/.claude/skills/git-workflow/SKILL.md +1 -1
  9. package/template/.claude/skills/hook-development/SKILL.md +6 -0
  10. package/template/.claude/skills/mongoose-patterns/SKILL.md +1 -1
  11. package/template/.claude/skills/nextjs-app-router/SKILL.md +1 -1
  12. package/template/.claude/skills/performance-patterns/SKILL.md +1 -1
  13. package/template/.claude/skills/playwright-automation/SKILL.md +1 -1
  14. package/template/.claude/skills/quality-gate/SKILL.md +294 -294
  15. package/template/.claude/skills/react-patterns/SKILL.md +1 -1
  16. package/template/.claude/skills/research-cache/SKILL.md +1 -1
  17. package/template/.claude/skills/security-scan/SKILL.md +222 -222
  18. package/template/.claude/skills/shadcn-ui/SKILL.md +1 -1
  19. package/template/.claude/skills/tailwind-patterns/SKILL.md +1 -1
  20. package/template/.claude/skills/test-coverage/SKILL.md +1 -1
  21. package/template/.claude/skills/trpc-api/SKILL.md +1 -1
  22. package/template/.claude/skills/typescript-strict/SKILL.md +1 -1
  23. package/template/.claude/skills/ui-ux-audit/SKILL.md +254 -254
  24. package/template/.claude/skills/zod-validation/SKILL.md +1 -1
@@ -1,222 +1,222 @@
1
- ---
2
- name: security-scan
3
- description: Audits code security against OWASP Top 10. Validates user ID from session, detects sensitive data leaks, verifies Zod validation. HAS VETO POWER - blocks insecure code.
4
- allowed-tools: Read, Grep, Glob, Bash
5
- ---
6
-
7
- # Security Scan - Security Audit System
8
-
9
- ## VETO POWER
10
-
11
- > **WARNING:** This skill HAS VETO POWER.
12
- > If critical vulnerability detected, MUST:
13
- >
14
- > 1. STOP implementation
15
- > 2. REPORT vulnerability
16
- > 3. REQUIRE fix before proceeding
17
-
18
- ---
19
-
20
- ## Purpose
21
-
22
- This skill audits code security:
23
-
24
- - **Validates** user ID comes from session (NEVER from request)
25
- - **Detects** sensitive data being sent to frontend
26
- - **Verifies** Zod validation on all routes
27
- - **Audits** against OWASP Top 10
28
- - **Blocks** commits with critical vulnerabilities
29
-
30
- ---
31
-
32
- ## Critical Security Rules
33
-
34
- ### 1. USER ID ALWAYS FROM SESSION
35
-
36
- > **NEVER** trust user ID from frontend.
37
- > **ALWAYS** extract from `ctx.session.userId` or `ctx.user._id`.
38
-
39
- ```typescript
40
- // WRONG - VULNERABLE (IMMEDIATE VETO)
41
- async function getData({ userId }: { userId: string }) {
42
- return db.find({ userId }); // userId can be manipulated!
43
- }
44
-
45
- // CORRECT
46
- async function getData({ ctx }: { ctx: Context }) {
47
- const userId = ctx.user._id; // Always from session
48
- return db.find({ userId });
49
- }
50
- ```
51
-
52
- ### 2. SENSITIVE DATA NEVER TO FRONTEND
53
-
54
- > **NEVER** send to frontend:
55
- >
56
- > - Passwords (even hashed)
57
- > - API tokens
58
- > - Secret keys
59
- > - Other users' data
60
- > - Stack traces in production
61
-
62
- ```typescript
63
- // WRONG - DATA LEAK (IMMEDIATE VETO)
64
- return {
65
- user: await UserModel.findById(id), // Includes passwordHash!
66
- };
67
-
68
- // CORRECT
69
- return {
70
- user: user.toPublic(), // Sanitization method
71
- };
72
- ```
73
-
74
- ### 3. ZOD VALIDATION REQUIRED
75
-
76
- > **EVERY** tRPC route MUST have `.input(z.object({...}))`.
77
- > Unvalidated inputs are attack vectors.
78
-
79
- ```typescript
80
- // WRONG - NO VALIDATION (IMMEDIATE VETO)
81
- .mutation(async ({ input }) => {
82
- await db.create(input); // input can have anything!
83
- })
84
-
85
- // CORRECT
86
- .input(createSchema) // Zod schema
87
- .mutation(async ({ input }) => {
88
- await db.create(input); // input is validated
89
- })
90
- ```
91
-
92
- ---
93
-
94
- ## OWASP Top 10 Checklist
95
-
96
- ### A01: Broken Access Control
97
-
98
- - [ ] All protected routes use `protectedProcedure`?
99
- - [ ] User ID from session, not input?
100
- - [ ] Resources filtered by user/tenant?
101
-
102
- ### A02: Cryptographic Failures
103
-
104
- - [ ] Passwords hashed with bcrypt (salt >= 10)?
105
- - [ ] Tokens generated with crypto.randomBytes?
106
- - [ ] Cookies with HttpOnly, Secure, SameSite?
107
- - [ ] No secrets in code (use env vars)?
108
-
109
- ### A03: Injection
110
-
111
- - [ ] Queries use Mongoose (prevents NoSQL injection)?
112
- - [ ] Inputs validated with Zod?
113
- - [ ] No string concatenation in queries?
114
-
115
- ### A07: Authentication Failures
116
-
117
- - [ ] Passwords with minimum requirements?
118
- - [ ] Brute force protection?
119
- - [ ] Sessions invalidated on logout?
120
- - [ ] Tokens with expiration?
121
-
122
- ---
123
-
124
- ## Detection Patterns
125
-
126
- ### Detect User ID from Input (VETO)
127
-
128
- ```bash
129
- grep -r "input\.userId\|input\.user_id\|{ userId }" server/ --include="*.ts"
130
- ```
131
-
132
- ### Detect Password Return (VETO)
133
-
134
- ```bash
135
- grep -r "passwordHash\|password:" server/ --include="*.ts"
136
- ```
137
-
138
- ### Detect Route Without Validation (VETO)
139
-
140
- ```bash
141
- grep -A5 "Procedure\." server/ --include="*.ts" | grep -v ".input("
142
- ```
143
-
144
- ---
145
-
146
- ## Output Format
147
-
148
- ### Approved
149
-
150
- ```markdown
151
- ## SECURITY SCAN - APPROVED
152
-
153
- ### Scope
154
-
155
- - **Files:** X
156
- - **Routes:** Y
157
-
158
- ### Checks
159
-
160
- - [x] User ID always from session
161
- - [x] No sensitive data in response
162
- - [x] All routes with Zod validation
163
- - [x] OWASP Top 10 OK
164
-
165
- **STATUS: APPROVED**
166
- ```
167
-
168
- ### Vetoed
169
-
170
- ```markdown
171
- ## SECURITY SCAN - VETOED
172
-
173
- ### CRITICAL VULNERABILITY
174
-
175
- **Type:** User ID from Input
176
- **File:** `server/routers/example.ts:45`
177
- **Risk:** Any user can access other users' data
178
-
179
- **Fix:** Use `ctx.user._id` instead of `input.userId`
180
-
181
- **STATUS: VETOED** - Fix before proceeding
182
- ```
183
-
184
- ---
185
-
186
- ## VETO Rules
187
-
188
- ### IMMEDIATE VETO
189
-
190
- 1. User ID from input/request body
191
- 2. Password returned in response
192
- 3. API tokens exposed
193
- 4. Protected route without `protectedProcedure`
194
- 5. Query without user/tenant filter
195
-
196
- ### VETO BEFORE MERGE
197
-
198
- 1. Route without Zod validation
199
- 2. Unsanitized sensitive data
200
- 3. bun audit (or npm audit) with critical vulnerabilities
201
-
202
- ---
203
-
204
- ## Progressive Disclosure
205
-
206
- For detailed information, see:
207
-
208
- - **[reference/owasp-top-10.md](reference/owasp-top-10.md)** - Complete OWASP Top 10 checklist with examples
209
- - **[scripts/scan.py](scripts/scan.py)** - Automated security scanner
210
-
211
- ### Quick Scan
212
-
213
- ```bash
214
- python .claude/skills/security-scan/scripts/scan.py server/
215
- ```
216
-
217
- ---
218
-
219
- ## Version
220
-
221
- - **v2.1.0** - Added progressive disclosure with reference files and scan script
222
- - **v2.0.0** - Generic template
1
+ ---
2
+ name: security-scan
3
+ description: "ALWAYS invoke before committing API, auth, or user data code. HAS VETO POWER blocks insecure code. Validates OWASP Top 10, session IDs, Zod validation. Do NOT skip security."
4
+ allowed-tools: Read, Grep, Glob, Bash
5
+ ---
6
+
7
+ # Security Scan - Security Audit System
8
+
9
+ ## VETO POWER
10
+
11
+ > **WARNING:** This skill HAS VETO POWER.
12
+ > If critical vulnerability detected, MUST:
13
+ >
14
+ > 1. STOP implementation
15
+ > 2. REPORT vulnerability
16
+ > 3. REQUIRE fix before proceeding
17
+
18
+ ---
19
+
20
+ ## Purpose
21
+
22
+ This skill audits code security:
23
+
24
+ - **Validates** user ID comes from session (NEVER from request)
25
+ - **Detects** sensitive data being sent to frontend
26
+ - **Verifies** Zod validation on all routes
27
+ - **Audits** against OWASP Top 10
28
+ - **Blocks** commits with critical vulnerabilities
29
+
30
+ ---
31
+
32
+ ## Critical Security Rules
33
+
34
+ ### 1. USER ID ALWAYS FROM SESSION
35
+
36
+ > **NEVER** trust user ID from frontend.
37
+ > **ALWAYS** extract from `ctx.session.userId` or `ctx.user._id`.
38
+
39
+ ```typescript
40
+ // WRONG - VULNERABLE (IMMEDIATE VETO)
41
+ async function getData({ userId }: { userId: string }) {
42
+ return db.find({ userId }); // userId can be manipulated!
43
+ }
44
+
45
+ // CORRECT
46
+ async function getData({ ctx }: { ctx: Context }) {
47
+ const userId = ctx.user._id; // Always from session
48
+ return db.find({ userId });
49
+ }
50
+ ```
51
+
52
+ ### 2. SENSITIVE DATA NEVER TO FRONTEND
53
+
54
+ > **NEVER** send to frontend:
55
+ >
56
+ > - Passwords (even hashed)
57
+ > - API tokens
58
+ > - Secret keys
59
+ > - Other users' data
60
+ > - Stack traces in production
61
+
62
+ ```typescript
63
+ // WRONG - DATA LEAK (IMMEDIATE VETO)
64
+ return {
65
+ user: await UserModel.findById(id), // Includes passwordHash!
66
+ };
67
+
68
+ // CORRECT
69
+ return {
70
+ user: user.toPublic(), // Sanitization method
71
+ };
72
+ ```
73
+
74
+ ### 3. ZOD VALIDATION REQUIRED
75
+
76
+ > **EVERY** tRPC route MUST have `.input(z.object({...}))`.
77
+ > Unvalidated inputs are attack vectors.
78
+
79
+ ```typescript
80
+ // WRONG - NO VALIDATION (IMMEDIATE VETO)
81
+ .mutation(async ({ input }) => {
82
+ await db.create(input); // input can have anything!
83
+ })
84
+
85
+ // CORRECT
86
+ .input(createSchema) // Zod schema
87
+ .mutation(async ({ input }) => {
88
+ await db.create(input); // input is validated
89
+ })
90
+ ```
91
+
92
+ ---
93
+
94
+ ## OWASP Top 10 Checklist
95
+
96
+ ### A01: Broken Access Control
97
+
98
+ - [ ] All protected routes use `protectedProcedure`?
99
+ - [ ] User ID from session, not input?
100
+ - [ ] Resources filtered by user/tenant?
101
+
102
+ ### A02: Cryptographic Failures
103
+
104
+ - [ ] Passwords hashed with bcrypt (salt >= 10)?
105
+ - [ ] Tokens generated with crypto.randomBytes?
106
+ - [ ] Cookies with HttpOnly, Secure, SameSite?
107
+ - [ ] No secrets in code (use env vars)?
108
+
109
+ ### A03: Injection
110
+
111
+ - [ ] Queries use Mongoose (prevents NoSQL injection)?
112
+ - [ ] Inputs validated with Zod?
113
+ - [ ] No string concatenation in queries?
114
+
115
+ ### A07: Authentication Failures
116
+
117
+ - [ ] Passwords with minimum requirements?
118
+ - [ ] Brute force protection?
119
+ - [ ] Sessions invalidated on logout?
120
+ - [ ] Tokens with expiration?
121
+
122
+ ---
123
+
124
+ ## Detection Patterns
125
+
126
+ ### Detect User ID from Input (VETO)
127
+
128
+ ```bash
129
+ grep -r "input\.userId\|input\.user_id\|{ userId }" server/ --include="*.ts"
130
+ ```
131
+
132
+ ### Detect Password Return (VETO)
133
+
134
+ ```bash
135
+ grep -r "passwordHash\|password:" server/ --include="*.ts"
136
+ ```
137
+
138
+ ### Detect Route Without Validation (VETO)
139
+
140
+ ```bash
141
+ grep -A5 "Procedure\." server/ --include="*.ts" | grep -v ".input("
142
+ ```
143
+
144
+ ---
145
+
146
+ ## Output Format
147
+
148
+ ### Approved
149
+
150
+ ```markdown
151
+ ## SECURITY SCAN - APPROVED
152
+
153
+ ### Scope
154
+
155
+ - **Files:** X
156
+ - **Routes:** Y
157
+
158
+ ### Checks
159
+
160
+ - [x] User ID always from session
161
+ - [x] No sensitive data in response
162
+ - [x] All routes with Zod validation
163
+ - [x] OWASP Top 10 OK
164
+
165
+ **STATUS: APPROVED**
166
+ ```
167
+
168
+ ### Vetoed
169
+
170
+ ```markdown
171
+ ## SECURITY SCAN - VETOED
172
+
173
+ ### CRITICAL VULNERABILITY
174
+
175
+ **Type:** User ID from Input
176
+ **File:** `server/routers/example.ts:45`
177
+ **Risk:** Any user can access other users' data
178
+
179
+ **Fix:** Use `ctx.user._id` instead of `input.userId`
180
+
181
+ **STATUS: VETOED** - Fix before proceeding
182
+ ```
183
+
184
+ ---
185
+
186
+ ## VETO Rules
187
+
188
+ ### IMMEDIATE VETO
189
+
190
+ 1. User ID from input/request body
191
+ 2. Password returned in response
192
+ 3. API tokens exposed
193
+ 4. Protected route without `protectedProcedure`
194
+ 5. Query without user/tenant filter
195
+
196
+ ### VETO BEFORE MERGE
197
+
198
+ 1. Route without Zod validation
199
+ 2. Unsanitized sensitive data
200
+ 3. bun audit (or npm audit) with critical vulnerabilities
201
+
202
+ ---
203
+
204
+ ## Progressive Disclosure
205
+
206
+ For detailed information, see:
207
+
208
+ - **[reference/owasp-top-10.md](reference/owasp-top-10.md)** - Complete OWASP Top 10 checklist with examples
209
+ - **[scripts/scan.py](scripts/scan.py)** - Automated security scanner
210
+
211
+ ### Quick Scan
212
+
213
+ ```bash
214
+ python .claude/skills/security-scan/scripts/scan.py server/
215
+ ```
216
+
217
+ ---
218
+
219
+ ## Version
220
+
221
+ - **v2.1.0** - Added progressive disclosure with reference files and scan script
222
+ - **v2.0.0** - Generic template
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: shadcn-ui
3
- description: shadcn/ui component patterns. Component installation, customization, theming, accessibility. Use when building UI with shadcn components.
3
+ description: "ALWAYS invoke when adding or modifying shadcn/ui components. Do NOT install or customize shadcn components without checking theming and accessibility patterns first."
4
4
  allowed-tools: Read, Write, Edit, Grep, Glob, Bash
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: tailwind-patterns
3
- description: Tailwind CSS patterns and utilities. Responsive design, dark mode, animations, custom components. Use when styling with Tailwind CSS.
3
+ description: "ALWAYS invoke when writing Tailwind CSS classes responsive, dark mode, animations, custom utilities. Do NOT style components without checking Tailwind patterns first."
4
4
  allowed-tools: Read, Write, Edit, Grep, Glob
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: test-coverage
3
- description: Manages test coverage with Playwright E2E and Vitest unit tests. Tracks which files need tests, provides templates with fixture-based cleanup, enforces multi-viewport testing and database validation.
3
+ description: "ALWAYS invoke AFTER implementing any feature. Creates Vitest unit + Playwright E2E tests. Do NOT skip all new code needs test coverage. Tracks files needing tests."
4
4
  allowed-tools: Read, Write, Edit, Bash, Grep, Glob
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: trpc-api
3
- description: tRPC end-to-end type-safe API patterns. Router setup, procedures, middleware, context, client configuration. Use when building type-safe APIs with tRPC.
3
+ description: "ALWAYS invoke when building type-safe API routes with tRPC — routers, procedures, middleware. Do NOT create API endpoints without checking tRPC patterns first."
4
4
  allowed-tools: Read, Write, Edit, Grep, Glob
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: typescript-strict
3
- description: TypeScript strict mode patterns and best practices. Index access, literal types, null checks, generics, type inference. Use when working with TypeScript files.
3
+ description: "ALWAYS invoke when writing or editing .ts/.tsx files. Enforces strict mode — index access, null checks, literal types, generics. Do NOT write TypeScript without checking rules."
4
4
  allowed-tools: Read, Write, Edit, Grep, Glob, Bash
5
5
  ---
6
6