start-vibing 1.1.3 → 1.1.4
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/package.json +1 -1
- package/template/.claude/README.md +126 -135
- package/template/.claude/agents/orchestrator.md +37 -23
- package/template/.claude/agents/research.md +51 -3
- package/template/.claude/agents/ui-ux-reviewer.md +80 -10
- package/template/.claude/config/project-config.json +4 -7
- package/template/.claude/hooks/user-prompt-submit.py +384 -37
- package/template/.claude/settings.json +228 -39
- package/template/.claude/skills/codebase-knowledge/SKILL.md +111 -37
- package/template/.claude/skills/codebase-knowledge/domains/claude-system.md +216 -10
- package/template/.claude/skills/docs-tracker/SKILL.md +206 -30
- package/template/.claude/skills/final-check/SKILL.md +252 -40
- package/template/.claude/skills/quality-gate/SKILL.md +238 -31
- package/template/.claude/skills/research-cache/SKILL.md +162 -28
- package/template/.claude/skills/security-scan/SKILL.md +165 -34
- package/template/.claude/skills/test-coverage/SKILL.md +416 -41
- package/template/.claude/skills/ui-ux-audit/SKILL.md +222 -36
- package/template/.claude/config/domain-mapping.json +0 -55
|
@@ -1,73 +1,207 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: research-cache
|
|
3
|
-
description:
|
|
3
|
+
description: Caches research findings to avoid redundant web searches. Stores best practices by topic with sources and dates. Use before researching to check existing knowledge.
|
|
4
4
|
allowed-tools: Read, Write, Glob, Grep
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Research Cache
|
|
7
|
+
# Research Cache - Best Practices Storage
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Purpose
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
This skill caches research findings to avoid redundant web searches and maintain institutional knowledge about best practices.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
14
|
|
|
15
15
|
## Structure
|
|
16
16
|
|
|
17
17
|
```
|
|
18
|
-
.claude/skills/research-cache/
|
|
19
|
-
|
|
18
|
+
.claude/skills/research-cache/
|
|
19
|
+
├── SKILL.md # This file
|
|
20
|
+
├── TEMPLATE.md # Template for research findings
|
|
21
|
+
└── cache/ # Cached research by topic
|
|
22
|
+
├── solana-websockets.md
|
|
23
|
+
├── typescript-strict.md
|
|
24
|
+
└── [topic].md
|
|
20
25
|
```
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
---
|
|
23
28
|
|
|
24
|
-
|
|
29
|
+
## How It Works
|
|
25
30
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
### Before Research
|
|
32
|
+
|
|
33
|
+
1. **Check cache first** - Look for existing research on the topic
|
|
34
|
+
2. **Verify freshness** - Research older than 6 months may need updating
|
|
35
|
+
3. **Reuse findings** - If recent research exists, use it directly
|
|
30
36
|
|
|
31
37
|
### After Research
|
|
32
38
|
|
|
33
|
-
Create `cache/[topic].md
|
|
39
|
+
1. **Create cache file** - Document findings in `cache/[topic].md`
|
|
40
|
+
2. **Follow template** - Use consistent structure
|
|
41
|
+
3. **Include sources** - Always cite URLs and dates
|
|
42
|
+
4. **Tag relevance** - Mark which parts of stack it applies to
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Cache File Template
|
|
34
47
|
|
|
35
48
|
```markdown
|
|
36
|
-
# Research: [Topic]
|
|
49
|
+
# Research: [Topic Name]
|
|
37
50
|
|
|
38
51
|
## Metadata
|
|
39
52
|
- **Date:** YYYY-MM-DD
|
|
40
|
-
- **
|
|
53
|
+
- **Researcher:** [agent/session]
|
|
54
|
+
- **Freshness:** [fresh|stale|outdated]
|
|
55
|
+
- **Stack:** [bun|typescript|mongodb|solana|all]
|
|
56
|
+
|
|
57
|
+
## Problem Statement
|
|
58
|
+
[What problem were we trying to solve?]
|
|
59
|
+
|
|
60
|
+
## Search Queries
|
|
61
|
+
1. "[query 1]"
|
|
62
|
+
2. "[query 2]"
|
|
63
|
+
3. "[query 3]"
|
|
41
64
|
|
|
42
65
|
## Key Findings
|
|
43
66
|
|
|
44
|
-
### Finding 1
|
|
67
|
+
### Finding 1: [Title]
|
|
45
68
|
**Source:** [URL]
|
|
46
|
-
[
|
|
69
|
+
**Date:** [publication date]
|
|
70
|
+
**Relevance:** [high|medium|low]
|
|
71
|
+
|
|
72
|
+
[Summary of finding]
|
|
73
|
+
|
|
74
|
+
**Code Example:**
|
|
75
|
+
```[language]
|
|
76
|
+
[code]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Applies When:**
|
|
80
|
+
- [condition 1]
|
|
81
|
+
- [condition 2]
|
|
82
|
+
|
|
83
|
+
### Finding 2: [Title]
|
|
84
|
+
...
|
|
47
85
|
|
|
48
86
|
## Recommendations
|
|
49
87
|
|
|
50
88
|
### DO
|
|
51
|
-
|
|
89
|
+
1. [Best practice 1]
|
|
90
|
+
2. [Best practice 2]
|
|
52
91
|
|
|
53
92
|
### AVOID
|
|
54
|
-
|
|
93
|
+
1. [Anti-pattern 1]
|
|
94
|
+
2. [Anti-pattern 2]
|
|
95
|
+
|
|
96
|
+
### CONSIDER
|
|
97
|
+
1. [Alternative approach 1]
|
|
98
|
+
2. [Alternative approach 2]
|
|
99
|
+
|
|
100
|
+
## Implementation Notes
|
|
101
|
+
|
|
102
|
+
### For This Project
|
|
103
|
+
- [Specific note for solana-listeners]
|
|
104
|
+
- [Integration point]
|
|
105
|
+
|
|
106
|
+
### Gotchas
|
|
107
|
+
- [Warning 1]
|
|
108
|
+
- [Warning 2]
|
|
55
109
|
|
|
56
110
|
## Sources
|
|
57
|
-
|
|
58
|
-
|
|
111
|
+
|
|
112
|
+
| Title | URL | Date | Relevance |
|
|
113
|
+
|-------|-----|------|-----------|
|
|
114
|
+
| [Source 1] | [url] | [date] | [high/med/low] |
|
|
115
|
+
| [Source 2] | [url] | [date] | [high/med/low] |
|
|
116
|
+
|
|
117
|
+
## Related Topics
|
|
118
|
+
- [[related-topic-1]]
|
|
119
|
+
- [[related-topic-2]]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Usage Patterns
|
|
125
|
+
|
|
126
|
+
### Quick Lookup
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Check if research exists
|
|
130
|
+
ls .claude/skills/research-cache/cache/
|
|
131
|
+
|
|
132
|
+
# Read specific research
|
|
133
|
+
cat .claude/skills/research-cache/cache/[topic].md
|
|
59
134
|
```
|
|
60
135
|
|
|
136
|
+
### Search Cached Research
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Find all research mentioning a term
|
|
140
|
+
grep -r "websocket" .claude/skills/research-cache/cache/
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Check Freshness
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Find research older than 6 months
|
|
147
|
+
find .claude/skills/research-cache/cache/ -mtime +180
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Integration with Research Agent
|
|
153
|
+
|
|
154
|
+
The **research agent** uses this skill to:
|
|
155
|
+
|
|
156
|
+
1. **Check existing research** before web searching
|
|
157
|
+
2. **Store new findings** after web research
|
|
158
|
+
3. **Update stale research** when patterns change
|
|
159
|
+
4. **Cross-reference** findings across topics
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
61
163
|
## Freshness Guidelines
|
|
62
164
|
|
|
63
165
|
| Age | Status | Action |
|
|
64
166
|
|-----|--------|--------|
|
|
65
167
|
| < 3 months | Fresh | Use directly |
|
|
66
|
-
| 3-6 months |
|
|
67
|
-
|
|
|
168
|
+
| 3-6 months | Aging | Verify still valid |
|
|
169
|
+
| 6-12 months | Stale | Update recommended |
|
|
170
|
+
| > 12 months | Outdated | Full re-research needed |
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Topic Naming Convention
|
|
175
|
+
|
|
176
|
+
Use kebab-case descriptive names:
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
solana-websockets.md # Technology + feature
|
|
180
|
+
typescript-strict-mode.md # Language + specific setting
|
|
181
|
+
mongodb-indexes.md # Database + concept
|
|
182
|
+
bun-docker-deploy.md # Runtime + deployment context
|
|
183
|
+
error-handling-patterns.md # Generic pattern
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
68
187
|
|
|
69
188
|
## Rules
|
|
70
189
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
190
|
+
### MANDATORY
|
|
191
|
+
|
|
192
|
+
1. **Always check cache first** - Don't duplicate research
|
|
193
|
+
2. **Always include sources** - No unsourced recommendations
|
|
194
|
+
3. **Always date entries** - Freshness matters
|
|
195
|
+
4. **Always follow template** - Consistency helps retrieval
|
|
196
|
+
|
|
197
|
+
### FORBIDDEN
|
|
198
|
+
|
|
199
|
+
1. **Cache without sources** - All findings need citations
|
|
200
|
+
2. **Ignore freshness** - Old research may be wrong
|
|
201
|
+
3. **Duplicate topics** - One file per topic, update existing
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Version
|
|
206
|
+
|
|
207
|
+
- **v1.0.0** - Initial implementation
|
|
@@ -1,75 +1,206 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: security-scan
|
|
3
|
-
description: Audits code
|
|
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
4
|
allowed-tools: Read, Grep, Glob, Bash
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Security Scan
|
|
7
|
+
# Security Scan - Security Audit System
|
|
8
8
|
|
|
9
9
|
## VETO POWER
|
|
10
10
|
|
|
11
|
-
This skill
|
|
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
|
|
12
17
|
|
|
13
|
-
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Purpose
|
|
14
21
|
|
|
15
|
-
|
|
16
|
-
- Before committing security-sensitive changes
|
|
17
|
-
- When user mentions: password, token, authentication, permissions
|
|
22
|
+
This skill audits code security:
|
|
18
23
|
|
|
19
|
-
|
|
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
|
+
---
|
|
20
31
|
|
|
21
|
-
|
|
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`.
|
|
22
38
|
|
|
23
39
|
```typescript
|
|
24
|
-
// WRONG (VETO)
|
|
25
|
-
async function getData({ userId }: { userId: string }) {
|
|
40
|
+
// WRONG - VULNERABLE (IMMEDIATE VETO)
|
|
41
|
+
async function getData({ userId }: { userId: string }) {
|
|
42
|
+
return db.find({ userId }); // userId can be manipulated!
|
|
43
|
+
}
|
|
26
44
|
|
|
27
45
|
// CORRECT
|
|
28
46
|
async function getData({ ctx }: { ctx: Context }) {
|
|
29
|
-
|
|
47
|
+
const userId = ctx.user._id; // Always from session
|
|
48
|
+
return db.find({ userId });
|
|
30
49
|
}
|
|
31
50
|
```
|
|
32
51
|
|
|
33
|
-
### 2.
|
|
52
|
+
### 2. SENSITIVE DATA NEVER TO FRONTEND
|
|
34
53
|
|
|
35
|
-
|
|
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
|
|
36
61
|
|
|
37
62
|
```typescript
|
|
38
|
-
// WRONG (VETO)
|
|
39
|
-
return {
|
|
63
|
+
// WRONG - DATA LEAK (IMMEDIATE VETO)
|
|
64
|
+
return {
|
|
65
|
+
user: await UserModel.findById(id), // Includes passwordHash!
|
|
66
|
+
};
|
|
40
67
|
|
|
41
68
|
// CORRECT
|
|
42
|
-
return {
|
|
69
|
+
return {
|
|
70
|
+
user: user.toPublic(), // Sanitization method
|
|
71
|
+
};
|
|
43
72
|
```
|
|
44
73
|
|
|
45
|
-
### 3.
|
|
74
|
+
### 3. ZOD VALIDATION REQUIRED
|
|
75
|
+
|
|
76
|
+
> **EVERY** tRPC route MUST have `.input(z.object({...}))`.
|
|
77
|
+
> Unvalidated inputs are attack vectors.
|
|
46
78
|
|
|
47
79
|
```typescript
|
|
48
|
-
// WRONG (VETO)
|
|
49
|
-
.mutation(async ({ input }) => {
|
|
80
|
+
// WRONG - NO VALIDATION (IMMEDIATE VETO)
|
|
81
|
+
.mutation(async ({ input }) => {
|
|
82
|
+
await db.create(input); // input can have anything!
|
|
83
|
+
})
|
|
50
84
|
|
|
51
85
|
// CORRECT
|
|
52
|
-
.input(createSchema)
|
|
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"
|
|
53
136
|
```
|
|
54
137
|
|
|
55
|
-
|
|
138
|
+
### Detect Route Without Validation (VETO)
|
|
56
139
|
|
|
57
140
|
```bash
|
|
58
|
-
|
|
59
|
-
|
|
141
|
+
grep -A5 "Procedure\." server/ --include="*.ts" | grep -v ".input("
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Output Format
|
|
60
147
|
|
|
61
|
-
|
|
62
|
-
|
|
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**
|
|
63
166
|
```
|
|
64
167
|
|
|
65
|
-
|
|
168
|
+
### Vetoed
|
|
169
|
+
|
|
170
|
+
```markdown
|
|
171
|
+
## SECURITY SCAN - VETOED
|
|
66
172
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
+
---
|
|
71
203
|
|
|
72
|
-
##
|
|
204
|
+
## Version
|
|
73
205
|
|
|
74
|
-
**
|
|
75
|
-
**VETOED:** Critical vulnerability - must fix before commit
|
|
206
|
+
- **v2.0.0** - Generic template
|