rawknee-69 commited on
Commit
c2cde81
·
1 Parent(s): d4b35cb

Prune local .cursor scaffolding and update README submission checklist.

Browse files

This records the current workspace state by removing the previously committed .cursor toolkit files and keeping the README checklist aligned with current submission artifacts.

Made-with: Cursor

This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .cursor/.agents/plugins/marketplace.json +0 -20
  2. .cursor/.agents/skills/api-design/SKILL.md +0 -523
  3. .cursor/.agents/skills/api-design/agents/openai.yaml +0 -7
  4. .cursor/.agents/skills/article-writing/SKILL.md +0 -85
  5. .cursor/.agents/skills/article-writing/agents/openai.yaml +0 -7
  6. .cursor/.agents/skills/backend-patterns/SKILL.md +0 -598
  7. .cursor/.agents/skills/backend-patterns/agents/openai.yaml +0 -7
  8. .cursor/.agents/skills/bun-runtime/SKILL.md +0 -84
  9. .cursor/.agents/skills/bun-runtime/agents/openai.yaml +0 -7
  10. .cursor/.agents/skills/claude-api/SKILL.md +0 -337
  11. .cursor/.agents/skills/claude-api/agents/openai.yaml +0 -7
  12. .cursor/.agents/skills/coding-standards/SKILL.md +0 -530
  13. .cursor/.agents/skills/coding-standards/agents/openai.yaml +0 -7
  14. .cursor/.agents/skills/content-engine/SKILL.md +0 -88
  15. .cursor/.agents/skills/content-engine/agents/openai.yaml +0 -7
  16. .cursor/.agents/skills/crosspost/SKILL.md +0 -188
  17. .cursor/.agents/skills/crosspost/agents/openai.yaml +0 -7
  18. .cursor/.agents/skills/deep-research/SKILL.md +0 -155
  19. .cursor/.agents/skills/deep-research/agents/openai.yaml +0 -7
  20. .cursor/.agents/skills/dmux-workflows/SKILL.md +0 -144
  21. .cursor/.agents/skills/dmux-workflows/agents/openai.yaml +0 -7
  22. .cursor/.agents/skills/documentation-lookup/SKILL.md +0 -90
  23. .cursor/.agents/skills/documentation-lookup/agents/openai.yaml +0 -7
  24. .cursor/.agents/skills/e2e-testing/SKILL.md +0 -326
  25. .cursor/.agents/skills/e2e-testing/agents/openai.yaml +0 -7
  26. .cursor/.agents/skills/eval-harness/SKILL.md +0 -236
  27. .cursor/.agents/skills/eval-harness/agents/openai.yaml +0 -7
  28. .cursor/.agents/skills/everything-claude-code/SKILL.md +0 -442
  29. .cursor/.agents/skills/everything-claude-code/agents/openai.yaml +0 -6
  30. .cursor/.agents/skills/exa-search/SKILL.md +0 -170
  31. .cursor/.agents/skills/exa-search/agents/openai.yaml +0 -7
  32. .cursor/.agents/skills/fal-ai-media/SKILL.md +0 -277
  33. .cursor/.agents/skills/fal-ai-media/agents/openai.yaml +0 -7
  34. .cursor/.agents/skills/frontend-patterns/SKILL.md +0 -642
  35. .cursor/.agents/skills/frontend-patterns/agents/openai.yaml +0 -7
  36. .cursor/.agents/skills/frontend-slides/SKILL.md +0 -184
  37. .cursor/.agents/skills/frontend-slides/STYLE_PRESETS.md +0 -330
  38. .cursor/.agents/skills/frontend-slides/agents/openai.yaml +0 -7
  39. .cursor/.agents/skills/investor-materials/SKILL.md +0 -96
  40. .cursor/.agents/skills/investor-materials/agents/openai.yaml +0 -7
  41. .cursor/.agents/skills/investor-outreach/SKILL.md +0 -76
  42. .cursor/.agents/skills/investor-outreach/agents/openai.yaml +0 -7
  43. .cursor/.agents/skills/market-research/SKILL.md +0 -75
  44. .cursor/.agents/skills/market-research/agents/openai.yaml +0 -7
  45. .cursor/.agents/skills/mcp-server-patterns/SKILL.md +0 -67
  46. .cursor/.agents/skills/nextjs-turbopack/SKILL.md +0 -44
  47. .cursor/.agents/skills/nextjs-turbopack/agents/openai.yaml +0 -7
  48. .cursor/.agents/skills/security-review/SKILL.md +0 -495
  49. .cursor/.agents/skills/security-review/agents/openai.yaml +0 -7
  50. .cursor/.agents/skills/strategic-compact/SKILL.md +0 -103
.cursor/.agents/plugins/marketplace.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "name": "everything-claude-code",
3
- "interface": {
4
- "displayName": "Everything Claude Code"
5
- },
6
- "plugins": [
7
- {
8
- "name": "everything-claude-code",
9
- "source": {
10
- "source": "local",
11
- "path": "../.."
12
- },
13
- "policy": {
14
- "installation": "AVAILABLE",
15
- "authentication": "ON_INSTALL"
16
- },
17
- "category": "Productivity"
18
- }
19
- ]
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/api-design/SKILL.md DELETED
@@ -1,523 +0,0 @@
1
- ---
2
- name: api-design
3
- description: REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs.
4
- origin: ECC
5
- ---
6
-
7
- # API Design Patterns
8
-
9
- Conventions and best practices for designing consistent, developer-friendly REST APIs.
10
-
11
- ## When to Activate
12
-
13
- - Designing new API endpoints
14
- - Reviewing existing API contracts
15
- - Adding pagination, filtering, or sorting
16
- - Implementing error handling for APIs
17
- - Planning API versioning strategy
18
- - Building public or partner-facing APIs
19
-
20
- ## Resource Design
21
-
22
- ### URL Structure
23
-
24
- ```
25
- # Resources are nouns, plural, lowercase, kebab-case
26
- GET /api/v1/users
27
- GET /api/v1/users/:id
28
- POST /api/v1/users
29
- PUT /api/v1/users/:id
30
- PATCH /api/v1/users/:id
31
- DELETE /api/v1/users/:id
32
-
33
- # Sub-resources for relationships
34
- GET /api/v1/users/:id/orders
35
- POST /api/v1/users/:id/orders
36
-
37
- # Actions that don't map to CRUD (use verbs sparingly)
38
- POST /api/v1/orders/:id/cancel
39
- POST /api/v1/auth/login
40
- POST /api/v1/auth/refresh
41
- ```
42
-
43
- ### Naming Rules
44
-
45
- ```
46
- # GOOD
47
- /api/v1/team-members # kebab-case for multi-word resources
48
- /api/v1/orders?status=active # query params for filtering
49
- /api/v1/users/123/orders # nested resources for ownership
50
-
51
- # BAD
52
- /api/v1/getUsers # verb in URL
53
- /api/v1/user # singular (use plural)
54
- /api/v1/team_members # snake_case in URLs
55
- /api/v1/users/123/getOrders # verb in nested resource
56
- ```
57
-
58
- ## HTTP Methods and Status Codes
59
-
60
- ### Method Semantics
61
-
62
- | Method | Idempotent | Safe | Use For |
63
- |--------|-----------|------|---------|
64
- | GET | Yes | Yes | Retrieve resources |
65
- | POST | No | No | Create resources, trigger actions |
66
- | PUT | Yes | No | Full replacement of a resource |
67
- | PATCH | No* | No | Partial update of a resource |
68
- | DELETE | Yes | No | Remove a resource |
69
-
70
- *PATCH can be made idempotent with proper implementation
71
-
72
- ### Status Code Reference
73
-
74
- ```
75
- # Success
76
- 200 OK — GET, PUT, PATCH (with response body)
77
- 201 Created — POST (include Location header)
78
- 204 No Content — DELETE, PUT (no response body)
79
-
80
- # Client Errors
81
- 400 Bad Request — Validation failure, malformed JSON
82
- 401 Unauthorized — Missing or invalid authentication
83
- 403 Forbidden — Authenticated but not authorized
84
- 404 Not Found — Resource doesn't exist
85
- 409 Conflict — Duplicate entry, state conflict
86
- 422 Unprocessable Entity — Semantically invalid (valid JSON, bad data)
87
- 429 Too Many Requests — Rate limit exceeded
88
-
89
- # Server Errors
90
- 500 Internal Server Error — Unexpected failure (never expose details)
91
- 502 Bad Gateway — Upstream service failed
92
- 503 Service Unavailable — Temporary overload, include Retry-After
93
- ```
94
-
95
- ### Common Mistakes
96
-
97
- ```
98
- # BAD: 200 for everything
99
- { "status": 200, "success": false, "error": "Not found" }
100
-
101
- # GOOD: Use HTTP status codes semantically
102
- HTTP/1.1 404 Not Found
103
- { "error": { "code": "not_found", "message": "User not found" } }
104
-
105
- # BAD: 500 for validation errors
106
- # GOOD: 400 or 422 with field-level details
107
-
108
- # BAD: 200 for created resources
109
- # GOOD: 201 with Location header
110
- HTTP/1.1 201 Created
111
- Location: /api/v1/users/abc-123
112
- ```
113
-
114
- ## Response Format
115
-
116
- ### Success Response
117
-
118
- ```json
119
- {
120
- "data": {
121
- "id": "abc-123",
122
- "email": "alice@example.com",
123
- "name": "Alice",
124
- "created_at": "2025-01-15T10:30:00Z"
125
- }
126
- }
127
- ```
128
-
129
- ### Collection Response (with Pagination)
130
-
131
- ```json
132
- {
133
- "data": [
134
- { "id": "abc-123", "name": "Alice" },
135
- { "id": "def-456", "name": "Bob" }
136
- ],
137
- "meta": {
138
- "total": 142,
139
- "page": 1,
140
- "per_page": 20,
141
- "total_pages": 8
142
- },
143
- "links": {
144
- "self": "/api/v1/users?page=1&per_page=20",
145
- "next": "/api/v1/users?page=2&per_page=20",
146
- "last": "/api/v1/users?page=8&per_page=20"
147
- }
148
- }
149
- ```
150
-
151
- ### Error Response
152
-
153
- ```json
154
- {
155
- "error": {
156
- "code": "validation_error",
157
- "message": "Request validation failed",
158
- "details": [
159
- {
160
- "field": "email",
161
- "message": "Must be a valid email address",
162
- "code": "invalid_format"
163
- },
164
- {
165
- "field": "age",
166
- "message": "Must be between 0 and 150",
167
- "code": "out_of_range"
168
- }
169
- ]
170
- }
171
- }
172
- ```
173
-
174
- ### Response Envelope Variants
175
-
176
- ```typescript
177
- // Option A: Envelope with data wrapper (recommended for public APIs)
178
- interface ApiResponse<T> {
179
- data: T;
180
- meta?: PaginationMeta;
181
- links?: PaginationLinks;
182
- }
183
-
184
- interface ApiError {
185
- error: {
186
- code: string;
187
- message: string;
188
- details?: FieldError[];
189
- };
190
- }
191
-
192
- // Option B: Flat response (simpler, common for internal APIs)
193
- // Success: just return the resource directly
194
- // Error: return error object
195
- // Distinguish by HTTP status code
196
- ```
197
-
198
- ## Pagination
199
-
200
- ### Offset-Based (Simple)
201
-
202
- ```
203
- GET /api/v1/users?page=2&per_page=20
204
-
205
- # Implementation
206
- SELECT * FROM users
207
- ORDER BY created_at DESC
208
- LIMIT 20 OFFSET 20;
209
- ```
210
-
211
- **Pros:** Easy to implement, supports "jump to page N"
212
- **Cons:** Slow on large offsets (OFFSET 100000), inconsistent with concurrent inserts
213
-
214
- ### Cursor-Based (Scalable)
215
-
216
- ```
217
- GET /api/v1/users?cursor=eyJpZCI6MTIzfQ&limit=20
218
-
219
- # Implementation
220
- SELECT * FROM users
221
- WHERE id > :cursor_id
222
- ORDER BY id ASC
223
- LIMIT 21; -- fetch one extra to determine has_next
224
- ```
225
-
226
- ```json
227
- {
228
- "data": [...],
229
- "meta": {
230
- "has_next": true,
231
- "next_cursor": "eyJpZCI6MTQzfQ"
232
- }
233
- }
234
- ```
235
-
236
- **Pros:** Consistent performance regardless of position, stable with concurrent inserts
237
- **Cons:** Cannot jump to arbitrary page, cursor is opaque
238
-
239
- ### When to Use Which
240
-
241
- | Use Case | Pagination Type |
242
- |----------|----------------|
243
- | Admin dashboards, small datasets (<10K) | Offset |
244
- | Infinite scroll, feeds, large datasets | Cursor |
245
- | Public APIs | Cursor (default) with offset (optional) |
246
- | Search results | Offset (users expect page numbers) |
247
-
248
- ## Filtering, Sorting, and Search
249
-
250
- ### Filtering
251
-
252
- ```
253
- # Simple equality
254
- GET /api/v1/orders?status=active&customer_id=abc-123
255
-
256
- # Comparison operators (use bracket notation)
257
- GET /api/v1/products?price[gte]=10&price[lte]=100
258
- GET /api/v1/orders?created_at[after]=2025-01-01
259
-
260
- # Multiple values (comma-separated)
261
- GET /api/v1/products?category=electronics,clothing
262
-
263
- # Nested fields (dot notation)
264
- GET /api/v1/orders?customer.country=US
265
- ```
266
-
267
- ### Sorting
268
-
269
- ```
270
- # Single field (prefix - for descending)
271
- GET /api/v1/products?sort=-created_at
272
-
273
- # Multiple fields (comma-separated)
274
- GET /api/v1/products?sort=-featured,price,-created_at
275
- ```
276
-
277
- ### Full-Text Search
278
-
279
- ```
280
- # Search query parameter
281
- GET /api/v1/products?q=wireless+headphones
282
-
283
- # Field-specific search
284
- GET /api/v1/users?email=alice
285
- ```
286
-
287
- ### Sparse Fieldsets
288
-
289
- ```
290
- # Return only specified fields (reduces payload)
291
- GET /api/v1/users?fields=id,name,email
292
- GET /api/v1/orders?fields=id,total,status&include=customer.name
293
- ```
294
-
295
- ## Authentication and Authorization
296
-
297
- ### Token-Based Auth
298
-
299
- ```
300
- # Bearer token in Authorization header
301
- GET /api/v1/users
302
- Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
303
-
304
- # API key (for server-to-server)
305
- GET /api/v1/data
306
- X-API-Key: sk_live_abc123
307
- ```
308
-
309
- ### Authorization Patterns
310
-
311
- ```typescript
312
- // Resource-level: check ownership
313
- app.get("/api/v1/orders/:id", async (req, res) => {
314
- const order = await Order.findById(req.params.id);
315
- if (!order) return res.status(404).json({ error: { code: "not_found" } });
316
- if (order.userId !== req.user.id) return res.status(403).json({ error: { code: "forbidden" } });
317
- return res.json({ data: order });
318
- });
319
-
320
- // Role-based: check permissions
321
- app.delete("/api/v1/users/:id", requireRole("admin"), async (req, res) => {
322
- await User.delete(req.params.id);
323
- return res.status(204).send();
324
- });
325
- ```
326
-
327
- ## Rate Limiting
328
-
329
- ### Headers
330
-
331
- ```
332
- HTTP/1.1 200 OK
333
- X-RateLimit-Limit: 100
334
- X-RateLimit-Remaining: 95
335
- X-RateLimit-Reset: 1640000000
336
-
337
- # When exceeded
338
- HTTP/1.1 429 Too Many Requests
339
- Retry-After: 60
340
- {
341
- "error": {
342
- "code": "rate_limit_exceeded",
343
- "message": "Rate limit exceeded. Try again in 60 seconds."
344
- }
345
- }
346
- ```
347
-
348
- ### Rate Limit Tiers
349
-
350
- | Tier | Limit | Window | Use Case |
351
- |------|-------|--------|----------|
352
- | Anonymous | 30/min | Per IP | Public endpoints |
353
- | Authenticated | 100/min | Per user | Standard API access |
354
- | Premium | 1000/min | Per API key | Paid API plans |
355
- | Internal | 10000/min | Per service | Service-to-service |
356
-
357
- ## Versioning
358
-
359
- ### URL Path Versioning (Recommended)
360
-
361
- ```
362
- /api/v1/users
363
- /api/v2/users
364
- ```
365
-
366
- **Pros:** Explicit, easy to route, cacheable
367
- **Cons:** URL changes between versions
368
-
369
- ### Header Versioning
370
-
371
- ```
372
- GET /api/users
373
- Accept: application/vnd.myapp.v2+json
374
- ```
375
-
376
- **Pros:** Clean URLs
377
- **Cons:** Harder to test, easy to forget
378
-
379
- ### Versioning Strategy
380
-
381
- ```
382
- 1. Start with /api/v1/ — don't version until you need to
383
- 2. Maintain at most 2 active versions (current + previous)
384
- 3. Deprecation timeline:
385
- - Announce deprecation (6 months notice for public APIs)
386
- - Add Sunset header: Sunset: Sat, 01 Jan 2026 00:00:00 GMT
387
- - Return 410 Gone after sunset date
388
- 4. Non-breaking changes don't need a new version:
389
- - Adding new fields to responses
390
- - Adding new optional query parameters
391
- - Adding new endpoints
392
- 5. Breaking changes require a new version:
393
- - Removing or renaming fields
394
- - Changing field types
395
- - Changing URL structure
396
- - Changing authentication method
397
- ```
398
-
399
- ## Implementation Patterns
400
-
401
- ### TypeScript (Next.js API Route)
402
-
403
- ```typescript
404
- import { z } from "zod";
405
- import { NextRequest, NextResponse } from "next/server";
406
-
407
- const createUserSchema = z.object({
408
- email: z.string().email(),
409
- name: z.string().min(1).max(100),
410
- });
411
-
412
- export async function POST(req: NextRequest) {
413
- const body = await req.json();
414
- const parsed = createUserSchema.safeParse(body);
415
-
416
- if (!parsed.success) {
417
- return NextResponse.json({
418
- error: {
419
- code: "validation_error",
420
- message: "Request validation failed",
421
- details: parsed.error.issues.map(i => ({
422
- field: i.path.join("."),
423
- message: i.message,
424
- code: i.code,
425
- })),
426
- },
427
- }, { status: 422 });
428
- }
429
-
430
- const user = await createUser(parsed.data);
431
-
432
- return NextResponse.json(
433
- { data: user },
434
- {
435
- status: 201,
436
- headers: { Location: `/api/v1/users/${user.id}` },
437
- },
438
- );
439
- }
440
- ```
441
-
442
- ### Python (Django REST Framework)
443
-
444
- ```python
445
- from rest_framework import serializers, viewsets, status
446
- from rest_framework.response import Response
447
-
448
- class CreateUserSerializer(serializers.Serializer):
449
- email = serializers.EmailField()
450
- name = serializers.CharField(max_length=100)
451
-
452
- class UserSerializer(serializers.ModelSerializer):
453
- class Meta:
454
- model = User
455
- fields = ["id", "email", "name", "created_at"]
456
-
457
- class UserViewSet(viewsets.ModelViewSet):
458
- serializer_class = UserSerializer
459
- permission_classes = [IsAuthenticated]
460
-
461
- def get_serializer_class(self):
462
- if self.action == "create":
463
- return CreateUserSerializer
464
- return UserSerializer
465
-
466
- def create(self, request):
467
- serializer = CreateUserSerializer(data=request.data)
468
- serializer.is_valid(raise_exception=True)
469
- user = UserService.create(**serializer.validated_data)
470
- return Response(
471
- {"data": UserSerializer(user).data},
472
- status=status.HTTP_201_CREATED,
473
- headers={"Location": f"/api/v1/users/{user.id}"},
474
- )
475
- ```
476
-
477
- ### Go (net/http)
478
-
479
- ```go
480
- func (h *UserHandler) CreateUser(w http.ResponseWriter, r *http.Request) {
481
- var req CreateUserRequest
482
- if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
483
- writeError(w, http.StatusBadRequest, "invalid_json", "Invalid request body")
484
- return
485
- }
486
-
487
- if err := req.Validate(); err != nil {
488
- writeError(w, http.StatusUnprocessableEntity, "validation_error", err.Error())
489
- return
490
- }
491
-
492
- user, err := h.service.Create(r.Context(), req)
493
- if err != nil {
494
- switch {
495
- case errors.Is(err, domain.ErrEmailTaken):
496
- writeError(w, http.StatusConflict, "email_taken", "Email already registered")
497
- default:
498
- writeError(w, http.StatusInternalServerError, "internal_error", "Internal error")
499
- }
500
- return
501
- }
502
-
503
- w.Header().Set("Location", fmt.Sprintf("/api/v1/users/%s", user.ID))
504
- writeJSON(w, http.StatusCreated, map[string]any{"data": user})
505
- }
506
- ```
507
-
508
- ## API Design Checklist
509
-
510
- Before shipping a new endpoint:
511
-
512
- - [ ] Resource URL follows naming conventions (plural, kebab-case, no verbs)
513
- - [ ] Correct HTTP method used (GET for reads, POST for creates, etc.)
514
- - [ ] Appropriate status codes returned (not 200 for everything)
515
- - [ ] Input validated with schema (Zod, Pydantic, Bean Validation)
516
- - [ ] Error responses follow standard format with codes and messages
517
- - [ ] Pagination implemented for list endpoints (cursor or offset)
518
- - [ ] Authentication required (or explicitly marked as public)
519
- - [ ] Authorization checked (user can only access their own resources)
520
- - [ ] Rate limiting configured
521
- - [ ] Response does not leak internal details (stack traces, SQL errors)
522
- - [ ] Consistent naming with existing endpoints (camelCase vs snake_case)
523
- - [ ] Documented (OpenAPI/Swagger spec updated)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/api-design/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "API Design"
3
- short_description: "REST API design patterns and best practices"
4
- brand_color: "#F97316"
5
- default_prompt: "Design REST API: resources, status codes, pagination"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/article-writing/SKILL.md DELETED
@@ -1,85 +0,0 @@
1
- ---
2
- name: article-writing
3
- description: Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, especially when voice consistency, structure, and credibility matter.
4
- origin: ECC
5
- ---
6
-
7
- # Article Writing
8
-
9
- Write long-form content that sounds like a real person or brand, not generic AI output.
10
-
11
- ## When to Activate
12
-
13
- - drafting blog posts, essays, launch posts, guides, tutorials, or newsletter issues
14
- - turning notes, transcripts, or research into polished articles
15
- - matching an existing founder, operator, or brand voice from examples
16
- - tightening structure, pacing, and evidence in already-written long-form copy
17
-
18
- ## Core Rules
19
-
20
- 1. Lead with the concrete thing: example, output, anecdote, number, screenshot description, or code block.
21
- 2. Explain after the example, not before.
22
- 3. Prefer short, direct sentences over padded ones.
23
- 4. Use specific numbers when available and sourced.
24
- 5. Never invent biographical facts, company metrics, or customer evidence.
25
-
26
- ## Voice Capture Workflow
27
-
28
- If the user wants a specific voice, collect one or more of:
29
- - published articles
30
- - newsletters
31
- - X / LinkedIn posts
32
- - docs or memos
33
- - a short style guide
34
-
35
- Then extract:
36
- - sentence length and rhythm
37
- - whether the voice is formal, conversational, or sharp
38
- - favored rhetorical devices such as parentheses, lists, fragments, or questions
39
- - tolerance for humor, opinion, and contrarian framing
40
- - formatting habits such as headers, bullets, code blocks, and pull quotes
41
-
42
- If no voice references are given, default to a direct, operator-style voice: concrete, practical, and low on hype.
43
-
44
- ## Banned Patterns
45
-
46
- Delete and rewrite any of these:
47
- - generic openings like "In today's rapidly evolving landscape"
48
- - filler transitions such as "Moreover" and "Furthermore"
49
- - hype phrases like "game-changer", "cutting-edge", or "revolutionary"
50
- - vague claims without evidence
51
- - biography or credibility claims not backed by provided context
52
-
53
- ## Writing Process
54
-
55
- 1. Clarify the audience and purpose.
56
- 2. Build a skeletal outline with one purpose per section.
57
- 3. Start each section with evidence, example, or scene.
58
- 4. Expand only where the next sentence earns its place.
59
- 5. Remove anything that sounds templated or self-congratulatory.
60
-
61
- ## Structure Guidance
62
-
63
- ### Technical Guides
64
- - open with what the reader gets
65
- - use code or terminal examples in every major section
66
- - end with concrete takeaways, not a soft summary
67
-
68
- ### Essays / Opinion Pieces
69
- - start with tension, contradiction, or a sharp observation
70
- - keep one argument thread per section
71
- - use examples that earn the opinion
72
-
73
- ### Newsletters
74
- - keep the first screen strong
75
- - mix insight with updates, not diary filler
76
- - use clear section labels and easy skim structure
77
-
78
- ## Quality Gate
79
-
80
- Before delivering:
81
- - verify factual claims against provided sources
82
- - remove filler and corporate language
83
- - confirm the voice matches the supplied examples
84
- - ensure every section adds new information
85
- - check formatting for the intended platform
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/article-writing/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Article Writing"
3
- short_description: "Write long-form content in a supplied voice without sounding templated"
4
- brand_color: "#B45309"
5
- default_prompt: "Draft a sharp long-form article from these notes and examples"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/backend-patterns/SKILL.md DELETED
@@ -1,598 +0,0 @@
1
- ---
2
- name: backend-patterns
3
- description: Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.
4
- origin: ECC
5
- ---
6
-
7
- # Backend Development Patterns
8
-
9
- Backend architecture patterns and best practices for scalable server-side applications.
10
-
11
- ## When to Activate
12
-
13
- - Designing REST or GraphQL API endpoints
14
- - Implementing repository, service, or controller layers
15
- - Optimizing database queries (N+1, indexing, connection pooling)
16
- - Adding caching (Redis, in-memory, HTTP cache headers)
17
- - Setting up background jobs or async processing
18
- - Structuring error handling and validation for APIs
19
- - Building middleware (auth, logging, rate limiting)
20
-
21
- ## API Design Patterns
22
-
23
- ### RESTful API Structure
24
-
25
- ```typescript
26
- // PASS: Resource-based URLs
27
- GET /api/markets # List resources
28
- GET /api/markets/:id # Get single resource
29
- POST /api/markets # Create resource
30
- PUT /api/markets/:id # Replace resource
31
- PATCH /api/markets/:id # Update resource
32
- DELETE /api/markets/:id # Delete resource
33
-
34
- // PASS: Query parameters for filtering, sorting, pagination
35
- GET /api/markets?status=active&sort=volume&limit=20&offset=0
36
- ```
37
-
38
- ### Repository Pattern
39
-
40
- ```typescript
41
- // Abstract data access logic
42
- interface MarketRepository {
43
- findAll(filters?: MarketFilters): Promise<Market[]>
44
- findById(id: string): Promise<Market | null>
45
- create(data: CreateMarketDto): Promise<Market>
46
- update(id: string, data: UpdateMarketDto): Promise<Market>
47
- delete(id: string): Promise<void>
48
- }
49
-
50
- class SupabaseMarketRepository implements MarketRepository {
51
- async findAll(filters?: MarketFilters): Promise<Market[]> {
52
- let query = supabase.from('markets').select('*')
53
-
54
- if (filters?.status) {
55
- query = query.eq('status', filters.status)
56
- }
57
-
58
- if (filters?.limit) {
59
- query = query.limit(filters.limit)
60
- }
61
-
62
- const { data, error } = await query
63
-
64
- if (error) throw new Error(error.message)
65
- return data
66
- }
67
-
68
- // Other methods...
69
- }
70
- ```
71
-
72
- ### Service Layer Pattern
73
-
74
- ```typescript
75
- // Business logic separated from data access
76
- class MarketService {
77
- constructor(private marketRepo: MarketRepository) {}
78
-
79
- async searchMarkets(query: string, limit: number = 10): Promise<Market[]> {
80
- // Business logic
81
- const embedding = await generateEmbedding(query)
82
- const results = await this.vectorSearch(embedding, limit)
83
-
84
- // Fetch full data
85
- const markets = await this.marketRepo.findByIds(results.map(r => r.id))
86
-
87
- // Sort by similarity
88
- return markets.sort((a, b) => {
89
- const scoreA = results.find(r => r.id === a.id)?.score || 0
90
- const scoreB = results.find(r => r.id === b.id)?.score || 0
91
- return scoreA - scoreB
92
- })
93
- }
94
-
95
- private async vectorSearch(embedding: number[], limit: number) {
96
- // Vector search implementation
97
- }
98
- }
99
- ```
100
-
101
- ### Middleware Pattern
102
-
103
- ```typescript
104
- // Request/response processing pipeline
105
- export function withAuth(handler: NextApiHandler): NextApiHandler {
106
- return async (req, res) => {
107
- const token = req.headers.authorization?.replace('Bearer ', '')
108
-
109
- if (!token) {
110
- return res.status(401).json({ error: 'Unauthorized' })
111
- }
112
-
113
- try {
114
- const user = await verifyToken(token)
115
- req.user = user
116
- return handler(req, res)
117
- } catch (error) {
118
- return res.status(401).json({ error: 'Invalid token' })
119
- }
120
- }
121
- }
122
-
123
- // Usage
124
- export default withAuth(async (req, res) => {
125
- // Handler has access to req.user
126
- })
127
- ```
128
-
129
- ## Database Patterns
130
-
131
- ### Query Optimization
132
-
133
- ```typescript
134
- // PASS: GOOD: Select only needed columns
135
- const { data } = await supabase
136
- .from('markets')
137
- .select('id, name, status, volume')
138
- .eq('status', 'active')
139
- .order('volume', { ascending: false })
140
- .limit(10)
141
-
142
- // FAIL: BAD: Select everything
143
- const { data } = await supabase
144
- .from('markets')
145
- .select('*')
146
- ```
147
-
148
- ### N+1 Query Prevention
149
-
150
- ```typescript
151
- // FAIL: BAD: N+1 query problem
152
- const markets = await getMarkets()
153
- for (const market of markets) {
154
- market.creator = await getUser(market.creator_id) // N queries
155
- }
156
-
157
- // PASS: GOOD: Batch fetch
158
- const markets = await getMarkets()
159
- const creatorIds = markets.map(m => m.creator_id)
160
- const creators = await getUsers(creatorIds) // 1 query
161
- const creatorMap = new Map(creators.map(c => [c.id, c]))
162
-
163
- markets.forEach(market => {
164
- market.creator = creatorMap.get(market.creator_id)
165
- })
166
- ```
167
-
168
- ### Transaction Pattern
169
-
170
- ```typescript
171
- async function createMarketWithPosition(
172
- marketData: CreateMarketDto,
173
- positionData: CreatePositionDto
174
- ) {
175
- // Use Supabase transaction
176
- const { data, error } = await supabase.rpc('create_market_with_position', {
177
- market_data: marketData,
178
- position_data: positionData
179
- })
180
-
181
- if (error) throw new Error('Transaction failed')
182
- return data
183
- }
184
-
185
- // SQL function in Supabase
186
- CREATE OR REPLACE FUNCTION create_market_with_position(
187
- market_data jsonb,
188
- position_data jsonb
189
- )
190
- RETURNS jsonb
191
- LANGUAGE plpgsql
192
- AS $$
193
- BEGIN
194
- -- Start transaction automatically
195
- INSERT INTO markets VALUES (market_data);
196
- INSERT INTO positions VALUES (position_data);
197
- RETURN jsonb_build_object('success', true);
198
- EXCEPTION
199
- WHEN OTHERS THEN
200
- -- Rollback happens automatically
201
- RETURN jsonb_build_object('success', false, 'error', SQLERRM);
202
- END;
203
- $$;
204
- ```
205
-
206
- ## Caching Strategies
207
-
208
- ### Redis Caching Layer
209
-
210
- ```typescript
211
- class CachedMarketRepository implements MarketRepository {
212
- constructor(
213
- private baseRepo: MarketRepository,
214
- private redis: RedisClient
215
- ) {}
216
-
217
- async findById(id: string): Promise<Market | null> {
218
- // Check cache first
219
- const cached = await this.redis.get(`market:${id}`)
220
-
221
- if (cached) {
222
- return JSON.parse(cached)
223
- }
224
-
225
- // Cache miss - fetch from database
226
- const market = await this.baseRepo.findById(id)
227
-
228
- if (market) {
229
- // Cache for 5 minutes
230
- await this.redis.setex(`market:${id}`, 300, JSON.stringify(market))
231
- }
232
-
233
- return market
234
- }
235
-
236
- async invalidateCache(id: string): Promise<void> {
237
- await this.redis.del(`market:${id}`)
238
- }
239
- }
240
- ```
241
-
242
- ### Cache-Aside Pattern
243
-
244
- ```typescript
245
- async function getMarketWithCache(id: string): Promise<Market> {
246
- const cacheKey = `market:${id}`
247
-
248
- // Try cache
249
- const cached = await redis.get(cacheKey)
250
- if (cached) return JSON.parse(cached)
251
-
252
- // Cache miss - fetch from DB
253
- const market = await db.markets.findUnique({ where: { id } })
254
-
255
- if (!market) throw new Error('Market not found')
256
-
257
- // Update cache
258
- await redis.setex(cacheKey, 300, JSON.stringify(market))
259
-
260
- return market
261
- }
262
- ```
263
-
264
- ## Error Handling Patterns
265
-
266
- ### Centralized Error Handler
267
-
268
- ```typescript
269
- class ApiError extends Error {
270
- constructor(
271
- public statusCode: number,
272
- public message: string,
273
- public isOperational = true
274
- ) {
275
- super(message)
276
- Object.setPrototypeOf(this, ApiError.prototype)
277
- }
278
- }
279
-
280
- export function errorHandler(error: unknown, req: Request): Response {
281
- if (error instanceof ApiError) {
282
- return NextResponse.json({
283
- success: false,
284
- error: error.message
285
- }, { status: error.statusCode })
286
- }
287
-
288
- if (error instanceof z.ZodError) {
289
- return NextResponse.json({
290
- success: false,
291
- error: 'Validation failed',
292
- details: error.errors
293
- }, { status: 400 })
294
- }
295
-
296
- // Log unexpected errors
297
- console.error('Unexpected error:', error)
298
-
299
- return NextResponse.json({
300
- success: false,
301
- error: 'Internal server error'
302
- }, { status: 500 })
303
- }
304
-
305
- // Usage
306
- export async function GET(request: Request) {
307
- try {
308
- const data = await fetchData()
309
- return NextResponse.json({ success: true, data })
310
- } catch (error) {
311
- return errorHandler(error, request)
312
- }
313
- }
314
- ```
315
-
316
- ### Retry with Exponential Backoff
317
-
318
- ```typescript
319
- async function fetchWithRetry<T>(
320
- fn: () => Promise<T>,
321
- maxRetries = 3
322
- ): Promise<T> {
323
- let lastError: Error
324
-
325
- for (let i = 0; i < maxRetries; i++) {
326
- try {
327
- return await fn()
328
- } catch (error) {
329
- lastError = error as Error
330
-
331
- if (i < maxRetries - 1) {
332
- // Exponential backoff: 1s, 2s, 4s
333
- const delay = Math.pow(2, i) * 1000
334
- await new Promise(resolve => setTimeout(resolve, delay))
335
- }
336
- }
337
- }
338
-
339
- throw lastError!
340
- }
341
-
342
- // Usage
343
- const data = await fetchWithRetry(() => fetchFromAPI())
344
- ```
345
-
346
- ## Authentication & Authorization
347
-
348
- ### JWT Token Validation
349
-
350
- ```typescript
351
- import jwt from 'jsonwebtoken'
352
-
353
- interface JWTPayload {
354
- userId: string
355
- email: string
356
- role: 'admin' | 'user'
357
- }
358
-
359
- export function verifyToken(token: string): JWTPayload {
360
- try {
361
- const payload = jwt.verify(token, process.env.JWT_SECRET!) as JWTPayload
362
- return payload
363
- } catch (error) {
364
- throw new ApiError(401, 'Invalid token')
365
- }
366
- }
367
-
368
- export async function requireAuth(request: Request) {
369
- const token = request.headers.get('authorization')?.replace('Bearer ', '')
370
-
371
- if (!token) {
372
- throw new ApiError(401, 'Missing authorization token')
373
- }
374
-
375
- return verifyToken(token)
376
- }
377
-
378
- // Usage in API route
379
- export async function GET(request: Request) {
380
- const user = await requireAuth(request)
381
-
382
- const data = await getDataForUser(user.userId)
383
-
384
- return NextResponse.json({ success: true, data })
385
- }
386
- ```
387
-
388
- ### Role-Based Access Control
389
-
390
- ```typescript
391
- type Permission = 'read' | 'write' | 'delete' | 'admin'
392
-
393
- interface User {
394
- id: string
395
- role: 'admin' | 'moderator' | 'user'
396
- }
397
-
398
- const rolePermissions: Record<User['role'], Permission[]> = {
399
- admin: ['read', 'write', 'delete', 'admin'],
400
- moderator: ['read', 'write', 'delete'],
401
- user: ['read', 'write']
402
- }
403
-
404
- export function hasPermission(user: User, permission: Permission): boolean {
405
- return rolePermissions[user.role].includes(permission)
406
- }
407
-
408
- export function requirePermission(permission: Permission) {
409
- return (handler: (request: Request, user: User) => Promise<Response>) => {
410
- return async (request: Request) => {
411
- const user = await requireAuth(request)
412
-
413
- if (!hasPermission(user, permission)) {
414
- throw new ApiError(403, 'Insufficient permissions')
415
- }
416
-
417
- return handler(request, user)
418
- }
419
- }
420
- }
421
-
422
- // Usage - HOF wraps the handler
423
- export const DELETE = requirePermission('delete')(
424
- async (request: Request, user: User) => {
425
- // Handler receives authenticated user with verified permission
426
- return new Response('Deleted', { status: 200 })
427
- }
428
- )
429
- ```
430
-
431
- ## Rate Limiting
432
-
433
- ### Simple In-Memory Rate Limiter
434
-
435
- ```typescript
436
- class RateLimiter {
437
- private requests = new Map<string, number[]>()
438
-
439
- async checkLimit(
440
- identifier: string,
441
- maxRequests: number,
442
- windowMs: number
443
- ): Promise<boolean> {
444
- const now = Date.now()
445
- const requests = this.requests.get(identifier) || []
446
-
447
- // Remove old requests outside window
448
- const recentRequests = requests.filter(time => now - time < windowMs)
449
-
450
- if (recentRequests.length >= maxRequests) {
451
- return false // Rate limit exceeded
452
- }
453
-
454
- // Add current request
455
- recentRequests.push(now)
456
- this.requests.set(identifier, recentRequests)
457
-
458
- return true
459
- }
460
- }
461
-
462
- const limiter = new RateLimiter()
463
-
464
- export async function GET(request: Request) {
465
- const ip = request.headers.get('x-forwarded-for') || 'unknown'
466
-
467
- const allowed = await limiter.checkLimit(ip, 100, 60000) // 100 req/min
468
-
469
- if (!allowed) {
470
- return NextResponse.json({
471
- error: 'Rate limit exceeded'
472
- }, { status: 429 })
473
- }
474
-
475
- // Continue with request
476
- }
477
- ```
478
-
479
- ## Background Jobs & Queues
480
-
481
- ### Simple Queue Pattern
482
-
483
- ```typescript
484
- class JobQueue<T> {
485
- private queue: T[] = []
486
- private processing = false
487
-
488
- async add(job: T): Promise<void> {
489
- this.queue.push(job)
490
-
491
- if (!this.processing) {
492
- this.process()
493
- }
494
- }
495
-
496
- private async process(): Promise<void> {
497
- this.processing = true
498
-
499
- while (this.queue.length > 0) {
500
- const job = this.queue.shift()!
501
-
502
- try {
503
- await this.execute(job)
504
- } catch (error) {
505
- console.error('Job failed:', error)
506
- }
507
- }
508
-
509
- this.processing = false
510
- }
511
-
512
- private async execute(job: T): Promise<void> {
513
- // Job execution logic
514
- }
515
- }
516
-
517
- // Usage for indexing markets
518
- interface IndexJob {
519
- marketId: string
520
- }
521
-
522
- const indexQueue = new JobQueue<IndexJob>()
523
-
524
- export async function POST(request: Request) {
525
- const { marketId } = await request.json()
526
-
527
- // Add to queue instead of blocking
528
- await indexQueue.add({ marketId })
529
-
530
- return NextResponse.json({ success: true, message: 'Job queued' })
531
- }
532
- ```
533
-
534
- ## Logging & Monitoring
535
-
536
- ### Structured Logging
537
-
538
- ```typescript
539
- interface LogContext {
540
- userId?: string
541
- requestId?: string
542
- method?: string
543
- path?: string
544
- [key: string]: unknown
545
- }
546
-
547
- class Logger {
548
- log(level: 'info' | 'warn' | 'error', message: string, context?: LogContext) {
549
- const entry = {
550
- timestamp: new Date().toISOString(),
551
- level,
552
- message,
553
- ...context
554
- }
555
-
556
- console.log(JSON.stringify(entry))
557
- }
558
-
559
- info(message: string, context?: LogContext) {
560
- this.log('info', message, context)
561
- }
562
-
563
- warn(message: string, context?: LogContext) {
564
- this.log('warn', message, context)
565
- }
566
-
567
- error(message: string, error: Error, context?: LogContext) {
568
- this.log('error', message, {
569
- ...context,
570
- error: error.message,
571
- stack: error.stack
572
- })
573
- }
574
- }
575
-
576
- const logger = new Logger()
577
-
578
- // Usage
579
- export async function GET(request: Request) {
580
- const requestId = crypto.randomUUID()
581
-
582
- logger.info('Fetching markets', {
583
- requestId,
584
- method: 'GET',
585
- path: '/api/markets'
586
- })
587
-
588
- try {
589
- const markets = await fetchMarkets()
590
- return NextResponse.json({ success: true, data: markets })
591
- } catch (error) {
592
- logger.error('Failed to fetch markets', error as Error, { requestId })
593
- return NextResponse.json({ error: 'Internal error' }, { status: 500 })
594
- }
595
- }
596
- ```
597
-
598
- **Remember**: Backend patterns enable scalable, maintainable server-side applications. Choose patterns that fit your complexity level.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/backend-patterns/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Backend Patterns"
3
- short_description: "API design, database, and server-side patterns"
4
- brand_color: "#F59E0B"
5
- default_prompt: "Apply backend patterns: API design, repository, caching"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/bun-runtime/SKILL.md DELETED
@@ -1,84 +0,0 @@
1
- ---
2
- name: bun-runtime
3
- description: Bun as runtime, package manager, bundler, and test runner. When to choose Bun vs Node, migration notes, and Vercel support.
4
- origin: ECC
5
- ---
6
-
7
- # Bun Runtime
8
-
9
- Bun is a fast all-in-one JavaScript runtime and toolkit: runtime, package manager, bundler, and test runner.
10
-
11
- ## When to Use
12
-
13
- - **Prefer Bun** for: new JS/TS projects, scripts where install/run speed matters, Vercel deployments with Bun runtime, and when you want a single toolchain (run + install + test + build).
14
- - **Prefer Node** for: maximum ecosystem compatibility, legacy tooling that assumes Node, or when a dependency has known Bun issues.
15
-
16
- Use when: adopting Bun, migrating from Node, writing or debugging Bun scripts/tests, or configuring Bun on Vercel or other platforms.
17
-
18
- ## How It Works
19
-
20
- - **Runtime**: Drop-in Node-compatible runtime (built on JavaScriptCore, implemented in Zig).
21
- - **Package manager**: `bun install` is significantly faster than npm/yarn. Lockfile is `bun.lock` (text) by default in current Bun; older versions used `bun.lockb` (binary).
22
- - **Bundler**: Built-in bundler and transpiler for apps and libraries.
23
- - **Test runner**: Built-in `bun test` with Jest-like API.
24
-
25
- **Migration from Node**: Replace `node script.js` with `bun run script.js` or `bun script.js`. Run `bun install` in place of `npm install`; most packages work. Use `bun run` for npm scripts; `bun x` for npx-style one-off runs. Node built-ins are supported; prefer Bun APIs where they exist for better performance.
26
-
27
- **Vercel**: Set runtime to Bun in project settings. Build: `bun run build` or `bun build ./src/index.ts --outdir=dist`. Install: `bun install --frozen-lockfile` for reproducible deploys.
28
-
29
- ## Examples
30
-
31
- ### Run and install
32
-
33
- ```bash
34
- # Install dependencies (creates/updates bun.lock or bun.lockb)
35
- bun install
36
-
37
- # Run a script or file
38
- bun run dev
39
- bun run src/index.ts
40
- bun src/index.ts
41
- ```
42
-
43
- ### Scripts and env
44
-
45
- ```bash
46
- bun run --env-file=.env dev
47
- FOO=bar bun run script.ts
48
- ```
49
-
50
- ### Testing
51
-
52
- ```bash
53
- bun test
54
- bun test --watch
55
- ```
56
-
57
- ```typescript
58
- // test/example.test.ts
59
- import { expect, test } from "bun:test";
60
-
61
- test("add", () => {
62
- expect(1 + 2).toBe(3);
63
- });
64
- ```
65
-
66
- ### Runtime API
67
-
68
- ```typescript
69
- const file = Bun.file("package.json");
70
- const json = await file.json();
71
-
72
- Bun.serve({
73
- port: 3000,
74
- fetch(req) {
75
- return new Response("Hello");
76
- },
77
- });
78
- ```
79
-
80
- ## Best Practices
81
-
82
- - Commit the lockfile (`bun.lock` or `bun.lockb`) for reproducible installs.
83
- - Prefer `bun run` for scripts. For TypeScript, Bun runs `.ts` natively.
84
- - Keep dependencies up to date; Bun and the ecosystem evolve quickly.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/bun-runtime/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Bun Runtime"
3
- short_description: "Bun as runtime, package manager, bundler, and test runner"
4
- brand_color: "#FBF0DF"
5
- default_prompt: "Use Bun for scripts, install, or run"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/claude-api/SKILL.md DELETED
@@ -1,337 +0,0 @@
1
- ---
2
- name: claude-api
3
- description: Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.
4
- origin: ECC
5
- ---
6
-
7
- # Claude API
8
-
9
- Build applications with the Anthropic Claude API and SDKs.
10
-
11
- ## When to Activate
12
-
13
- - Building applications that call the Claude API
14
- - Code imports `anthropic` (Python) or `@anthropic-ai/sdk` (TypeScript)
15
- - User asks about Claude API patterns, tool use, streaming, or vision
16
- - Implementing agent workflows with Claude Agent SDK
17
- - Optimizing API costs, token usage, or latency
18
-
19
- ## Model Selection
20
-
21
- | Model | ID | Best For |
22
- |-------|-----|----------|
23
- | Opus 4.6 | `claude-opus-4-6` | Complex reasoning, architecture, research |
24
- | Sonnet 4.6 | `claude-sonnet-4-6` | Balanced coding, most development tasks |
25
- | Haiku 4.5 | `claude-haiku-4-5-20251001` | Fast responses, high-volume, cost-sensitive |
26
-
27
- Default to Sonnet 4.6 unless the task requires deep reasoning (Opus) or speed/cost optimization (Haiku).
28
-
29
- ## Python SDK
30
-
31
- ### Installation
32
-
33
- ```bash
34
- pip install anthropic
35
- ```
36
-
37
- ### Basic Message
38
-
39
- ```python
40
- import anthropic
41
-
42
- client = anthropic.Anthropic() # reads ANTHROPIC_API_KEY from env
43
-
44
- message = client.messages.create(
45
- model="claude-sonnet-4-6",
46
- max_tokens=1024,
47
- messages=[
48
- {"role": "user", "content": "Explain async/await in Python"}
49
- ]
50
- )
51
- print(message.content[0].text)
52
- ```
53
-
54
- ### Streaming
55
-
56
- ```python
57
- with client.messages.stream(
58
- model="claude-sonnet-4-6",
59
- max_tokens=1024,
60
- messages=[{"role": "user", "content": "Write a haiku about coding"}]
61
- ) as stream:
62
- for text in stream.text_stream:
63
- print(text, end="", flush=True)
64
- ```
65
-
66
- ### System Prompt
67
-
68
- ```python
69
- message = client.messages.create(
70
- model="claude-sonnet-4-6",
71
- max_tokens=1024,
72
- system="You are a senior Python developer. Be concise.",
73
- messages=[{"role": "user", "content": "Review this function"}]
74
- )
75
- ```
76
-
77
- ## TypeScript SDK
78
-
79
- ### Installation
80
-
81
- ```bash
82
- npm install @anthropic-ai/sdk
83
- ```
84
-
85
- ### Basic Message
86
-
87
- ```typescript
88
- import Anthropic from "@anthropic-ai/sdk";
89
-
90
- const client = new Anthropic(); // reads ANTHROPIC_API_KEY from env
91
-
92
- const message = await client.messages.create({
93
- model: "claude-sonnet-4-6",
94
- max_tokens: 1024,
95
- messages: [
96
- { role: "user", content: "Explain async/await in TypeScript" }
97
- ],
98
- });
99
- console.log(message.content[0].text);
100
- ```
101
-
102
- ### Streaming
103
-
104
- ```typescript
105
- const stream = client.messages.stream({
106
- model: "claude-sonnet-4-6",
107
- max_tokens: 1024,
108
- messages: [{ role: "user", content: "Write a haiku" }],
109
- });
110
-
111
- for await (const event of stream) {
112
- if (event.type === "content_block_delta" && event.delta.type === "text_delta") {
113
- process.stdout.write(event.delta.text);
114
- }
115
- }
116
- ```
117
-
118
- ## Tool Use
119
-
120
- Define tools and let Claude call them:
121
-
122
- ```python
123
- tools = [
124
- {
125
- "name": "get_weather",
126
- "description": "Get current weather for a location",
127
- "input_schema": {
128
- "type": "object",
129
- "properties": {
130
- "location": {"type": "string", "description": "City name"},
131
- "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}
132
- },
133
- "required": ["location"]
134
- }
135
- }
136
- ]
137
-
138
- message = client.messages.create(
139
- model="claude-sonnet-4-6",
140
- max_tokens=1024,
141
- tools=tools,
142
- messages=[{"role": "user", "content": "What's the weather in SF?"}]
143
- )
144
-
145
- # Handle tool use response
146
- for block in message.content:
147
- if block.type == "tool_use":
148
- # Execute the tool with block.input
149
- result = get_weather(**block.input)
150
- # Send result back
151
- follow_up = client.messages.create(
152
- model="claude-sonnet-4-6",
153
- max_tokens=1024,
154
- tools=tools,
155
- messages=[
156
- {"role": "user", "content": "What's the weather in SF?"},
157
- {"role": "assistant", "content": message.content},
158
- {"role": "user", "content": [
159
- {"type": "tool_result", "tool_use_id": block.id, "content": str(result)}
160
- ]}
161
- ]
162
- )
163
- ```
164
-
165
- ## Vision
166
-
167
- Send images for analysis:
168
-
169
- ```python
170
- import base64
171
-
172
- with open("diagram.png", "rb") as f:
173
- image_data = base64.standard_b64encode(f.read()).decode("utf-8")
174
-
175
- message = client.messages.create(
176
- model="claude-sonnet-4-6",
177
- max_tokens=1024,
178
- messages=[{
179
- "role": "user",
180
- "content": [
181
- {"type": "image", "source": {"type": "base64", "media_type": "image/png", "data": image_data}},
182
- {"type": "text", "text": "Describe this diagram"}
183
- ]
184
- }]
185
- )
186
- ```
187
-
188
- ## Extended Thinking
189
-
190
- For complex reasoning tasks:
191
-
192
- ```python
193
- message = client.messages.create(
194
- model="claude-sonnet-4-6",
195
- max_tokens=16000,
196
- thinking={
197
- "type": "enabled",
198
- "budget_tokens": 10000
199
- },
200
- messages=[{"role": "user", "content": "Solve this math problem step by step..."}]
201
- )
202
-
203
- for block in message.content:
204
- if block.type == "thinking":
205
- print(f"Thinking: {block.thinking}")
206
- elif block.type == "text":
207
- print(f"Answer: {block.text}")
208
- ```
209
-
210
- ## Prompt Caching
211
-
212
- Cache large system prompts or context to reduce costs:
213
-
214
- ```python
215
- message = client.messages.create(
216
- model="claude-sonnet-4-6",
217
- max_tokens=1024,
218
- system=[
219
- {"type": "text", "text": large_system_prompt, "cache_control": {"type": "ephemeral"}}
220
- ],
221
- messages=[{"role": "user", "content": "Question about the cached context"}]
222
- )
223
- # Check cache usage
224
- print(f"Cache read: {message.usage.cache_read_input_tokens}")
225
- print(f"Cache creation: {message.usage.cache_creation_input_tokens}")
226
- ```
227
-
228
- ## Batches API
229
-
230
- Process large volumes asynchronously at 50% cost reduction:
231
-
232
- ```python
233
- import time
234
-
235
- batch = client.messages.batches.create(
236
- requests=[
237
- {
238
- "custom_id": f"request-{i}",
239
- "params": {
240
- "model": "claude-sonnet-4-6",
241
- "max_tokens": 1024,
242
- "messages": [{"role": "user", "content": prompt}]
243
- }
244
- }
245
- for i, prompt in enumerate(prompts)
246
- ]
247
- )
248
-
249
- # Poll for completion
250
- while True:
251
- status = client.messages.batches.retrieve(batch.id)
252
- if status.processing_status == "ended":
253
- break
254
- time.sleep(30)
255
-
256
- # Get results
257
- for result in client.messages.batches.results(batch.id):
258
- print(result.result.message.content[0].text)
259
- ```
260
-
261
- ## Claude Agent SDK
262
-
263
- Build multi-step agents:
264
-
265
- ```python
266
- # Note: Agent SDK API surface may change — check official docs
267
- import anthropic
268
-
269
- # Define tools as functions
270
- tools = [{
271
- "name": "search_codebase",
272
- "description": "Search the codebase for relevant code",
273
- "input_schema": {
274
- "type": "object",
275
- "properties": {"query": {"type": "string"}},
276
- "required": ["query"]
277
- }
278
- }]
279
-
280
- # Run an agentic loop with tool use
281
- client = anthropic.Anthropic()
282
- messages = [{"role": "user", "content": "Review the auth module for security issues"}]
283
-
284
- while True:
285
- response = client.messages.create(
286
- model="claude-sonnet-4-6",
287
- max_tokens=4096,
288
- tools=tools,
289
- messages=messages,
290
- )
291
- if response.stop_reason == "end_turn":
292
- break
293
- # Handle tool calls and continue the loop
294
- messages.append({"role": "assistant", "content": response.content})
295
- # ... execute tools and append tool_result messages
296
- ```
297
-
298
- ## Cost Optimization
299
-
300
- | Strategy | Savings | When to Use |
301
- |----------|---------|-------------|
302
- | Prompt caching | Up to 90% on cached tokens | Repeated system prompts or context |
303
- | Batches API | 50% | Non-time-sensitive bulk processing |
304
- | Haiku instead of Sonnet | ~75% | Simple tasks, classification, extraction |
305
- | Shorter max_tokens | Variable | When you know output will be short |
306
- | Streaming | None (same cost) | Better UX, same price |
307
-
308
- ## Error Handling
309
-
310
- ```python
311
- import time
312
-
313
- from anthropic import APIError, RateLimitError, APIConnectionError
314
-
315
- try:
316
- message = client.messages.create(...)
317
- except RateLimitError:
318
- # Back off and retry
319
- time.sleep(60)
320
- except APIConnectionError:
321
- # Network issue, retry with backoff
322
- pass
323
- except APIError as e:
324
- print(f"API error {e.status_code}: {e.message}")
325
- ```
326
-
327
- ## Environment Setup
328
-
329
- ```bash
330
- # Required
331
- export ANTHROPIC_API_KEY="your-api-key-here"
332
-
333
- # Optional: set default model
334
- export ANTHROPIC_MODEL="claude-sonnet-4-6"
335
- ```
336
-
337
- Never hardcode API keys. Always use environment variables.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/claude-api/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Claude API"
3
- short_description: "Anthropic Claude API patterns and SDKs"
4
- brand_color: "#D97706"
5
- default_prompt: "Build applications with the Claude API using Messages, tool use, streaming, and Agent SDK"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/coding-standards/SKILL.md DELETED
@@ -1,530 +0,0 @@
1
- ---
2
- name: coding-standards
3
- description: Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
4
- origin: ECC
5
- ---
6
-
7
- # Coding Standards & Best Practices
8
-
9
- Universal coding standards applicable across all projects.
10
-
11
- ## When to Activate
12
-
13
- - Starting a new project or module
14
- - Reviewing code for quality and maintainability
15
- - Refactoring existing code to follow conventions
16
- - Enforcing naming, formatting, or structural consistency
17
- - Setting up linting, formatting, or type-checking rules
18
- - Onboarding new contributors to coding conventions
19
-
20
- ## Code Quality Principles
21
-
22
- ### 1. Readability First
23
- - Code is read more than written
24
- - Clear variable and function names
25
- - Self-documenting code preferred over comments
26
- - Consistent formatting
27
-
28
- ### 2. KISS (Keep It Simple, Stupid)
29
- - Simplest solution that works
30
- - Avoid over-engineering
31
- - No premature optimization
32
- - Easy to understand > clever code
33
-
34
- ### 3. DRY (Don't Repeat Yourself)
35
- - Extract common logic into functions
36
- - Create reusable components
37
- - Share utilities across modules
38
- - Avoid copy-paste programming
39
-
40
- ### 4. YAGNI (You Aren't Gonna Need It)
41
- - Don't build features before they're needed
42
- - Avoid speculative generality
43
- - Add complexity only when required
44
- - Start simple, refactor when needed
45
-
46
- ## TypeScript/JavaScript Standards
47
-
48
- ### Variable Naming
49
-
50
- ```typescript
51
- // PASS: GOOD: Descriptive names
52
- const marketSearchQuery = 'election'
53
- const isUserAuthenticated = true
54
- const totalRevenue = 1000
55
-
56
- // FAIL: BAD: Unclear names
57
- const q = 'election'
58
- const flag = true
59
- const x = 1000
60
- ```
61
-
62
- ### Function Naming
63
-
64
- ```typescript
65
- // PASS: GOOD: Verb-noun pattern
66
- async function fetchMarketData(marketId: string) { }
67
- function calculateSimilarity(a: number[], b: number[]) { }
68
- function isValidEmail(email: string): boolean { }
69
-
70
- // FAIL: BAD: Unclear or noun-only
71
- async function market(id: string) { }
72
- function similarity(a, b) { }
73
- function email(e) { }
74
- ```
75
-
76
- ### Immutability Pattern (CRITICAL)
77
-
78
- ```typescript
79
- // PASS: ALWAYS use spread operator
80
- const updatedUser = {
81
- ...user,
82
- name: 'New Name'
83
- }
84
-
85
- const updatedArray = [...items, newItem]
86
-
87
- // FAIL: NEVER mutate directly
88
- user.name = 'New Name' // BAD
89
- items.push(newItem) // BAD
90
- ```
91
-
92
- ### Error Handling
93
-
94
- ```typescript
95
- // PASS: GOOD: Comprehensive error handling
96
- async function fetchData(url: string) {
97
- try {
98
- const response = await fetch(url)
99
-
100
- if (!response.ok) {
101
- throw new Error(`HTTP ${response.status}: ${response.statusText}`)
102
- }
103
-
104
- return await response.json()
105
- } catch (error) {
106
- console.error('Fetch failed:', error)
107
- throw new Error('Failed to fetch data')
108
- }
109
- }
110
-
111
- // FAIL: BAD: No error handling
112
- async function fetchData(url) {
113
- const response = await fetch(url)
114
- return response.json()
115
- }
116
- ```
117
-
118
- ### Async/Await Best Practices
119
-
120
- ```typescript
121
- // PASS: GOOD: Parallel execution when possible
122
- const [users, markets, stats] = await Promise.all([
123
- fetchUsers(),
124
- fetchMarkets(),
125
- fetchStats()
126
- ])
127
-
128
- // FAIL: BAD: Sequential when unnecessary
129
- const users = await fetchUsers()
130
- const markets = await fetchMarkets()
131
- const stats = await fetchStats()
132
- ```
133
-
134
- ### Type Safety
135
-
136
- ```typescript
137
- // PASS: GOOD: Proper types
138
- interface Market {
139
- id: string
140
- name: string
141
- status: 'active' | 'resolved' | 'closed'
142
- created_at: Date
143
- }
144
-
145
- function getMarket(id: string): Promise<Market> {
146
- // Implementation
147
- }
148
-
149
- // FAIL: BAD: Using 'any'
150
- function getMarket(id: any): Promise<any> {
151
- // Implementation
152
- }
153
- ```
154
-
155
- ## React Best Practices
156
-
157
- ### Component Structure
158
-
159
- ```typescript
160
- // PASS: GOOD: Functional component with types
161
- interface ButtonProps {
162
- children: React.ReactNode
163
- onClick: () => void
164
- disabled?: boolean
165
- variant?: 'primary' | 'secondary'
166
- }
167
-
168
- export function Button({
169
- children,
170
- onClick,
171
- disabled = false,
172
- variant = 'primary'
173
- }: ButtonProps) {
174
- return (
175
- <button
176
- onClick={onClick}
177
- disabled={disabled}
178
- className={`btn btn-${variant}`}
179
- >
180
- {children}
181
- </button>
182
- )
183
- }
184
-
185
- // FAIL: BAD: No types, unclear structure
186
- export function Button(props) {
187
- return <button onClick={props.onClick}>{props.children}</button>
188
- }
189
- ```
190
-
191
- ### Custom Hooks
192
-
193
- ```typescript
194
- // PASS: GOOD: Reusable custom hook
195
- export function useDebounce<T>(value: T, delay: number): T {
196
- const [debouncedValue, setDebouncedValue] = useState<T>(value)
197
-
198
- useEffect(() => {
199
- const handler = setTimeout(() => {
200
- setDebouncedValue(value)
201
- }, delay)
202
-
203
- return () => clearTimeout(handler)
204
- }, [value, delay])
205
-
206
- return debouncedValue
207
- }
208
-
209
- // Usage
210
- const debouncedQuery = useDebounce(searchQuery, 500)
211
- ```
212
-
213
- ### State Management
214
-
215
- ```typescript
216
- // PASS: GOOD: Proper state updates
217
- const [count, setCount] = useState(0)
218
-
219
- // Functional update for state based on previous state
220
- setCount(prev => prev + 1)
221
-
222
- // FAIL: BAD: Direct state reference
223
- setCount(count + 1) // Can be stale in async scenarios
224
- ```
225
-
226
- ### Conditional Rendering
227
-
228
- ```typescript
229
- // PASS: GOOD: Clear conditional rendering
230
- {isLoading && <Spinner />}
231
- {error && <ErrorMessage error={error} />}
232
- {data && <DataDisplay data={data} />}
233
-
234
- // FAIL: BAD: Ternary hell
235
- {isLoading ? <Spinner /> : error ? <ErrorMessage error={error} /> : data ? <DataDisplay data={data} /> : null}
236
- ```
237
-
238
- ## API Design Standards
239
-
240
- ### REST API Conventions
241
-
242
- ```
243
- GET /api/markets # List all markets
244
- GET /api/markets/:id # Get specific market
245
- POST /api/markets # Create new market
246
- PUT /api/markets/:id # Update market (full)
247
- PATCH /api/markets/:id # Update market (partial)
248
- DELETE /api/markets/:id # Delete market
249
-
250
- # Query parameters for filtering
251
- GET /api/markets?status=active&limit=10&offset=0
252
- ```
253
-
254
- ### Response Format
255
-
256
- ```typescript
257
- // PASS: GOOD: Consistent response structure
258
- interface ApiResponse<T> {
259
- success: boolean
260
- data?: T
261
- error?: string
262
- meta?: {
263
- total: number
264
- page: number
265
- limit: number
266
- }
267
- }
268
-
269
- // Success response
270
- return NextResponse.json({
271
- success: true,
272
- data: markets,
273
- meta: { total: 100, page: 1, limit: 10 }
274
- })
275
-
276
- // Error response
277
- return NextResponse.json({
278
- success: false,
279
- error: 'Invalid request'
280
- }, { status: 400 })
281
- ```
282
-
283
- ### Input Validation
284
-
285
- ```typescript
286
- import { z } from 'zod'
287
-
288
- // PASS: GOOD: Schema validation
289
- const CreateMarketSchema = z.object({
290
- name: z.string().min(1).max(200),
291
- description: z.string().min(1).max(2000),
292
- endDate: z.string().datetime(),
293
- categories: z.array(z.string()).min(1)
294
- })
295
-
296
- export async function POST(request: Request) {
297
- const body = await request.json()
298
-
299
- try {
300
- const validated = CreateMarketSchema.parse(body)
301
- // Proceed with validated data
302
- } catch (error) {
303
- if (error instanceof z.ZodError) {
304
- return NextResponse.json({
305
- success: false,
306
- error: 'Validation failed',
307
- details: error.errors
308
- }, { status: 400 })
309
- }
310
- }
311
- }
312
- ```
313
-
314
- ## File Organization
315
-
316
- ### Project Structure
317
-
318
- ```
319
- src/
320
- ├── app/ # Next.js App Router
321
- │ ├── api/ # API routes
322
- │ ├── markets/ # Market pages
323
- │ └── (auth)/ # Auth pages (route groups)
324
- ├── components/ # React components
325
- │ ├── ui/ # Generic UI components
326
- │ ├── forms/ # Form components
327
- │ └── layouts/ # Layout components
328
- ├── hooks/ # Custom React hooks
329
- ├── lib/ # Utilities and configs
330
- │ ├── api/ # API clients
331
- │ ├── utils/ # Helper functions
332
- │ └── constants/ # Constants
333
- ├── types/ # TypeScript types
334
- └── styles/ # Global styles
335
- ```
336
-
337
- ### File Naming
338
-
339
- ```
340
- components/Button.tsx # PascalCase for components
341
- hooks/useAuth.ts # camelCase with 'use' prefix
342
- lib/formatDate.ts # camelCase for utilities
343
- types/market.types.ts # camelCase with .types suffix
344
- ```
345
-
346
- ## Comments & Documentation
347
-
348
- ### When to Comment
349
-
350
- ```typescript
351
- // PASS: GOOD: Explain WHY, not WHAT
352
- // Use exponential backoff to avoid overwhelming the API during outages
353
- const delay = Math.min(1000 * Math.pow(2, retryCount), 30000)
354
-
355
- // Deliberately using mutation here for performance with large arrays
356
- items.push(newItem)
357
-
358
- // FAIL: BAD: Stating the obvious
359
- // Increment counter by 1
360
- count++
361
-
362
- // Set name to user's name
363
- name = user.name
364
- ```
365
-
366
- ### JSDoc for Public APIs
367
-
368
- ```typescript
369
- /**
370
- * Searches markets using semantic similarity.
371
- *
372
- * @param query - Natural language search query
373
- * @param limit - Maximum number of results (default: 10)
374
- * @returns Array of markets sorted by similarity score
375
- * @throws {Error} If OpenAI API fails or Redis unavailable
376
- *
377
- * @example
378
- * ```typescript
379
- * const results = await searchMarkets('election', 5)
380
- * console.log(results[0].name) // "Trump vs Biden"
381
- * ```
382
- */
383
- export async function searchMarkets(
384
- query: string,
385
- limit: number = 10
386
- ): Promise<Market[]> {
387
- // Implementation
388
- }
389
- ```
390
-
391
- ## Performance Best Practices
392
-
393
- ### Memoization
394
-
395
- ```typescript
396
- import { useMemo, useCallback } from 'react'
397
-
398
- // PASS: GOOD: Memoize expensive computations
399
- const sortedMarkets = useMemo(() => {
400
- return markets.sort((a, b) => b.volume - a.volume)
401
- }, [markets])
402
-
403
- // PASS: GOOD: Memoize callbacks
404
- const handleSearch = useCallback((query: string) => {
405
- setSearchQuery(query)
406
- }, [])
407
- ```
408
-
409
- ### Lazy Loading
410
-
411
- ```typescript
412
- import { lazy, Suspense } from 'react'
413
-
414
- // PASS: GOOD: Lazy load heavy components
415
- const HeavyChart = lazy(() => import('./HeavyChart'))
416
-
417
- export function Dashboard() {
418
- return (
419
- <Suspense fallback={<Spinner />}>
420
- <HeavyChart />
421
- </Suspense>
422
- )
423
- }
424
- ```
425
-
426
- ### Database Queries
427
-
428
- ```typescript
429
- // PASS: GOOD: Select only needed columns
430
- const { data } = await supabase
431
- .from('markets')
432
- .select('id, name, status')
433
- .limit(10)
434
-
435
- // FAIL: BAD: Select everything
436
- const { data } = await supabase
437
- .from('markets')
438
- .select('*')
439
- ```
440
-
441
- ## Testing Standards
442
-
443
- ### Test Structure (AAA Pattern)
444
-
445
- ```typescript
446
- test('calculates similarity correctly', () => {
447
- // Arrange
448
- const vector1 = [1, 0, 0]
449
- const vector2 = [0, 1, 0]
450
-
451
- // Act
452
- const similarity = calculateCosineSimilarity(vector1, vector2)
453
-
454
- // Assert
455
- expect(similarity).toBe(0)
456
- })
457
- ```
458
-
459
- ### Test Naming
460
-
461
- ```typescript
462
- // PASS: GOOD: Descriptive test names
463
- test('returns empty array when no markets match query', () => { })
464
- test('throws error when OpenAI API key is missing', () => { })
465
- test('falls back to substring search when Redis unavailable', () => { })
466
-
467
- // FAIL: BAD: Vague test names
468
- test('works', () => { })
469
- test('test search', () => { })
470
- ```
471
-
472
- ## Code Smell Detection
473
-
474
- Watch for these anti-patterns:
475
-
476
- ### 1. Long Functions
477
- ```typescript
478
- // FAIL: BAD: Function > 50 lines
479
- function processMarketData() {
480
- // 100 lines of code
481
- }
482
-
483
- // PASS: GOOD: Split into smaller functions
484
- function processMarketData() {
485
- const validated = validateData()
486
- const transformed = transformData(validated)
487
- return saveData(transformed)
488
- }
489
- ```
490
-
491
- ### 2. Deep Nesting
492
- ```typescript
493
- // FAIL: BAD: 5+ levels of nesting
494
- if (user) {
495
- if (user.isAdmin) {
496
- if (market) {
497
- if (market.isActive) {
498
- if (hasPermission) {
499
- // Do something
500
- }
501
- }
502
- }
503
- }
504
- }
505
-
506
- // PASS: GOOD: Early returns
507
- if (!user) return
508
- if (!user.isAdmin) return
509
- if (!market) return
510
- if (!market.isActive) return
511
- if (!hasPermission) return
512
-
513
- // Do something
514
- ```
515
-
516
- ### 3. Magic Numbers
517
- ```typescript
518
- // FAIL: BAD: Unexplained numbers
519
- if (retryCount > 3) { }
520
- setTimeout(callback, 500)
521
-
522
- // PASS: GOOD: Named constants
523
- const MAX_RETRIES = 3
524
- const DEBOUNCE_DELAY_MS = 500
525
-
526
- if (retryCount > MAX_RETRIES) { }
527
- setTimeout(callback, DEBOUNCE_DELAY_MS)
528
- ```
529
-
530
- **Remember**: Code quality is not negotiable. Clear, maintainable code enables rapid development and confident refactoring.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/coding-standards/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Coding Standards"
3
- short_description: "Universal coding standards and best practices"
4
- brand_color: "#3B82F6"
5
- default_prompt: "Apply standards: immutability, error handling, type safety"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/content-engine/SKILL.md DELETED
@@ -1,88 +0,0 @@
1
- ---
2
- name: content-engine
3
- description: Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.
4
- origin: ECC
5
- ---
6
-
7
- # Content Engine
8
-
9
- Turn one idea into strong, platform-native content instead of posting the same thing everywhere.
10
-
11
- ## When to Activate
12
-
13
- - writing X posts or threads
14
- - drafting LinkedIn posts or launch updates
15
- - scripting short-form video or YouTube explainers
16
- - repurposing articles, podcasts, demos, or docs into social content
17
- - building a lightweight content plan around a launch, milestone, or theme
18
-
19
- ## First Questions
20
-
21
- Clarify:
22
- - source asset: what are we adapting from
23
- - audience: builders, investors, customers, operators, or general audience
24
- - platform: X, LinkedIn, TikTok, YouTube, newsletter, or multi-platform
25
- - goal: awareness, conversion, recruiting, authority, launch support, or engagement
26
-
27
- ## Core Rules
28
-
29
- 1. Adapt for the platform. Do not cross-post the same copy.
30
- 2. Hooks matter more than summaries.
31
- 3. Every post should carry one clear idea.
32
- 4. Use specifics over slogans.
33
- 5. Keep the ask small and clear.
34
-
35
- ## Platform Guidance
36
-
37
- ### X
38
- - open fast
39
- - one idea per post or per tweet in a thread
40
- - keep links out of the main body unless necessary
41
- - avoid hashtag spam
42
-
43
- ### LinkedIn
44
- - strong first line
45
- - short paragraphs
46
- - more explicit framing around lessons, results, and takeaways
47
-
48
- ### TikTok / Short Video
49
- - first 3 seconds must interrupt attention
50
- - script around visuals, not just narration
51
- - one demo, one claim, one CTA
52
-
53
- ### YouTube
54
- - show the result early
55
- - structure by chapter
56
- - refresh the visual every 20-30 seconds
57
-
58
- ### Newsletter
59
- - deliver one clear lens, not a bundle of unrelated items
60
- - make section titles skimmable
61
- - keep the opening paragraph doing real work
62
-
63
- ## Repurposing Flow
64
-
65
- Default cascade:
66
- 1. anchor asset: article, video, demo, memo, or launch doc
67
- 2. extract 3-7 atomic ideas
68
- 3. write platform-native variants
69
- 4. trim repetition across outputs
70
- 5. align CTAs with platform intent
71
-
72
- ## Deliverables
73
-
74
- When asked for a campaign, return:
75
- - the core angle
76
- - platform-specific drafts
77
- - optional posting order
78
- - optional CTA variants
79
- - any missing inputs needed before publishing
80
-
81
- ## Quality Gate
82
-
83
- Before delivering:
84
- - each draft reads natively for its platform
85
- - hooks are strong and specific
86
- - no generic hype language
87
- - no duplicated copy across platforms unless requested
88
- - the CTA matches the content and audience
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/content-engine/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Content Engine"
3
- short_description: "Turn one idea into platform-native social and content outputs"
4
- brand_color: "#DC2626"
5
- default_prompt: "Turn this source asset into strong multi-platform content"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/crosspost/SKILL.md DELETED
@@ -1,188 +0,0 @@
1
- ---
2
- name: crosspost
3
- description: Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.
4
- origin: ECC
5
- ---
6
-
7
- # Crosspost
8
-
9
- Distribute content across multiple social platforms with platform-native adaptation.
10
-
11
- ## When to Activate
12
-
13
- - User wants to post content to multiple platforms
14
- - Publishing announcements, launches, or updates across social media
15
- - Repurposing a post from one platform to others
16
- - User says "crosspost", "post everywhere", "share on all platforms", or "distribute this"
17
-
18
- ## Core Rules
19
-
20
- 1. **Never post identical content cross-platform.** Each platform gets a native adaptation.
21
- 2. **Primary platform first.** Post to the main platform, then adapt for others.
22
- 3. **Respect platform conventions.** Length limits, formatting, link handling all differ.
23
- 4. **One idea per post.** If the source content has multiple ideas, split across posts.
24
- 5. **Attribution matters.** If crossposting someone else's content, credit the source.
25
-
26
- ## Platform Specifications
27
-
28
- | Platform | Max Length | Link Handling | Hashtags | Media |
29
- |----------|-----------|---------------|----------|-------|
30
- | X | 280 chars (4000 for Premium) | Counted in length | Minimal (1-2 max) | Images, video, GIFs |
31
- | LinkedIn | 3000 chars | Not counted in length | 3-5 relevant | Images, video, docs, carousels |
32
- | Threads | 500 chars | Separate link attachment | None typical | Images, video |
33
- | Bluesky | 300 chars | Via facets (rich text) | None (use feeds) | Images |
34
-
35
- ## Workflow
36
-
37
- ### Step 1: Create Source Content
38
-
39
- Start with the core idea. Use `content-engine` skill for high-quality drafts:
40
- - Identify the single core message
41
- - Determine the primary platform (where the audience is biggest)
42
- - Draft the primary platform version first
43
-
44
- ### Step 2: Identify Target Platforms
45
-
46
- Ask the user or determine from context:
47
- - Which platforms to target
48
- - Priority order (primary gets the best version)
49
- - Any platform-specific requirements (e.g., LinkedIn needs professional tone)
50
-
51
- ### Step 3: Adapt Per Platform
52
-
53
- For each target platform, transform the content:
54
-
55
- **X adaptation:**
56
- - Open with a hook, not a summary
57
- - Cut to the core insight fast
58
- - Keep links out of main body when possible
59
- - Use thread format for longer content
60
-
61
- **LinkedIn adaptation:**
62
- - Strong first line (visible before "see more")
63
- - Short paragraphs with line breaks
64
- - Frame around lessons, results, or professional takeaways
65
- - More explicit context than X (LinkedIn audience needs framing)
66
-
67
- **Threads adaptation:**
68
- - Conversational, casual tone
69
- - Shorter than LinkedIn, less compressed than X
70
- - Visual-first if possible
71
-
72
- **Bluesky adaptation:**
73
- - Direct and concise (300 char limit)
74
- - Community-oriented tone
75
- - Use feeds/lists for topic targeting instead of hashtags
76
-
77
- ### Step 4: Post Primary Platform
78
-
79
- Post to the primary platform first:
80
- - Use `x-api` skill for X
81
- - Use platform-specific APIs or tools for others
82
- - Capture the post URL for cross-referencing
83
-
84
- ### Step 5: Post to Secondary Platforms
85
-
86
- Post adapted versions to remaining platforms:
87
- - Stagger timing (not all at once — 30-60 min gaps)
88
- - Include cross-platform references where appropriate ("longer thread on X" etc.)
89
-
90
- ## Content Adaptation Examples
91
-
92
- ### Source: Product Launch
93
-
94
- **X version:**
95
- ```
96
- We just shipped [feature].
97
-
98
- [One specific thing it does that's impressive]
99
-
100
- [Link]
101
- ```
102
-
103
- **LinkedIn version:**
104
- ```
105
- Excited to share: we just launched [feature] at [Company].
106
-
107
- Here's why it matters:
108
-
109
- [2-3 short paragraphs with context]
110
-
111
- [Takeaway for the audience]
112
-
113
- [Link]
114
- ```
115
-
116
- **Threads version:**
117
- ```
118
- just shipped something cool — [feature]
119
-
120
- [casual explanation of what it does]
121
-
122
- link in bio
123
- ```
124
-
125
- ### Source: Technical Insight
126
-
127
- **X version:**
128
- ```
129
- TIL: [specific technical insight]
130
-
131
- [Why it matters in one sentence]
132
- ```
133
-
134
- **LinkedIn version:**
135
- ```
136
- A pattern I've been using that's made a real difference:
137
-
138
- [Technical insight with professional framing]
139
-
140
- [How it applies to teams/orgs]
141
-
142
- #relevantHashtag
143
- ```
144
-
145
- ## API Integration
146
-
147
- ### Batch Crossposting Service (Example Pattern)
148
- If using a crossposting service (e.g., Postbridge, Buffer, or a custom API), the pattern looks like:
149
-
150
- ```python
151
- import os
152
- import requests
153
-
154
- resp = requests.post(
155
- "https://api.postbridge.io/v1/posts",
156
- headers={"Authorization": f"Bearer {os.environ['POSTBRIDGE_API_KEY']}"},
157
- json={
158
- "platforms": ["twitter", "linkedin", "threads"],
159
- "content": {
160
- "twitter": {"text": x_version},
161
- "linkedin": {"text": linkedin_version},
162
- "threads": {"text": threads_version}
163
- }
164
- }
165
- )
166
- ```
167
-
168
- ### Manual Posting
169
- Without Postbridge, post to each platform using its native API:
170
- - X: Use `x-api` skill patterns
171
- - LinkedIn: LinkedIn API v2 with OAuth 2.0
172
- - Threads: Threads API (Meta)
173
- - Bluesky: AT Protocol API
174
-
175
- ## Quality Gate
176
-
177
- Before posting:
178
- - [ ] Each platform version reads naturally for that platform
179
- - [ ] No identical content across platforms
180
- - [ ] Length limits respected
181
- - [ ] Links work and are placed appropriately
182
- - [ ] Tone matches platform conventions
183
- - [ ] Media is sized correctly for each platform
184
-
185
- ## Related Skills
186
-
187
- - `content-engine` — Generate platform-native content
188
- - `x-api` — X/Twitter API integration
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/crosspost/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Crosspost"
3
- short_description: "Multi-platform content distribution with native adaptation"
4
- brand_color: "#EC4899"
5
- default_prompt: "Distribute content across X, LinkedIn, Threads, and Bluesky with platform-native adaptation"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/deep-research/SKILL.md DELETED
@@ -1,155 +0,0 @@
1
- ---
2
- name: deep-research
3
- description: Multi-source deep research using firecrawl and exa MCPs. Searches the web, synthesizes findings, and delivers cited reports with source attribution. Use when the user wants thorough research on any topic with evidence and citations.
4
- origin: ECC
5
- ---
6
-
7
- # Deep Research
8
-
9
- Produce thorough, cited research reports from multiple web sources using firecrawl and exa MCP tools.
10
-
11
- ## When to Activate
12
-
13
- - User asks to research any topic in depth
14
- - Competitive analysis, technology evaluation, or market sizing
15
- - Due diligence on companies, investors, or technologies
16
- - Any question requiring synthesis from multiple sources
17
- - User says "research", "deep dive", "investigate", or "what's the current state of"
18
-
19
- ## MCP Requirements
20
-
21
- At least one of:
22
- - **firecrawl** — `firecrawl_search`, `firecrawl_scrape`, `firecrawl_crawl`
23
- - **exa** — `web_search_exa`, `web_search_advanced_exa`, `crawling_exa`
24
-
25
- Both together give the best coverage. Configure in `~/.claude.json` or `~/.codex/config.toml`.
26
-
27
- ## Workflow
28
-
29
- ### Step 1: Understand the Goal
30
-
31
- Ask 1-2 quick clarifying questions:
32
- - "What's your goal — learning, making a decision, or writing something?"
33
- - "Any specific angle or depth you want?"
34
-
35
- If the user says "just research it" — skip ahead with reasonable defaults.
36
-
37
- ### Step 2: Plan the Research
38
-
39
- Break the topic into 3-5 research sub-questions. Example:
40
- - Topic: "Impact of AI on healthcare"
41
- - What are the main AI applications in healthcare today?
42
- - What clinical outcomes have been measured?
43
- - What are the regulatory challenges?
44
- - What companies are leading this space?
45
- - What's the market size and growth trajectory?
46
-
47
- ### Step 3: Execute Multi-Source Search
48
-
49
- For EACH sub-question, search using available MCP tools:
50
-
51
- **With firecrawl:**
52
- ```
53
- firecrawl_search(query: "<sub-question keywords>", limit: 8)
54
- ```
55
-
56
- **With exa:**
57
- ```
58
- web_search_exa(query: "<sub-question keywords>", numResults: 8)
59
- web_search_advanced_exa(query: "<keywords>", numResults: 5, startPublishedDate: "2025-01-01")
60
- ```
61
-
62
- **Search strategy:**
63
- - Use 2-3 different keyword variations per sub-question
64
- - Mix general and news-focused queries
65
- - Aim for 15-30 unique sources total
66
- - Prioritize: academic, official, reputable news > blogs > forums
67
-
68
- ### Step 4: Deep-Read Key Sources
69
-
70
- For the most promising URLs, fetch full content:
71
-
72
- **With firecrawl:**
73
- ```
74
- firecrawl_scrape(url: "<url>")
75
- ```
76
-
77
- **With exa:**
78
- ```
79
- crawling_exa(url: "<url>", tokensNum: 5000)
80
- ```
81
-
82
- Read 3-5 key sources in full for depth. Do not rely only on search snippets.
83
-
84
- ### Step 5: Synthesize and Write Report
85
-
86
- Structure the report:
87
-
88
- ```markdown
89
- # [Topic]: Research Report
90
- *Generated: [date] | Sources: [N] | Confidence: [High/Medium/Low]*
91
-
92
- ## Executive Summary
93
- [3-5 sentence overview of key findings]
94
-
95
- ## 1. [First Major Theme]
96
- [Findings with inline citations]
97
- - Key point ([Source Name](url))
98
- - Supporting data ([Source Name](url))
99
-
100
- ## 2. [Second Major Theme]
101
- ...
102
-
103
- ## 3. [Third Major Theme]
104
- ...
105
-
106
- ## Key Takeaways
107
- - [Actionable insight 1]
108
- - [Actionable insight 2]
109
- - [Actionable insight 3]
110
-
111
- ## Sources
112
- 1. [Title](url) — [one-line summary]
113
- 2. ...
114
-
115
- ## Methodology
116
- Searched [N] queries across web and news. Analyzed [M] sources.
117
- Sub-questions investigated: [list]
118
- ```
119
-
120
- ### Step 6: Deliver
121
-
122
- - **Short topics**: Post the full report in chat
123
- - **Long reports**: Post the executive summary + key takeaways, save full report to a file
124
-
125
- ## Parallel Research with Subagents
126
-
127
- For broad topics, use Claude Code's Task tool to parallelize:
128
-
129
- ```
130
- Launch 3 research agents in parallel:
131
- 1. Agent 1: Research sub-questions 1-2
132
- 2. Agent 2: Research sub-questions 3-4
133
- 3. Agent 3: Research sub-question 5 + cross-cutting themes
134
- ```
135
-
136
- Each agent searches, reads sources, and returns findings. The main session synthesizes into the final report.
137
-
138
- ## Quality Rules
139
-
140
- 1. **Every claim needs a source.** No unsourced assertions.
141
- 2. **Cross-reference.** If only one source says it, flag it as unverified.
142
- 3. **Recency matters.** Prefer sources from the last 12 months.
143
- 4. **Acknowledge gaps.** If you couldn't find good info on a sub-question, say so.
144
- 5. **No hallucination.** If you don't know, say "insufficient data found."
145
- 6. **Separate fact from inference.** Label estimates, projections, and opinions clearly.
146
-
147
- ## Examples
148
-
149
- ```
150
- "Research the current state of nuclear fusion energy"
151
- "Deep dive into Rust vs Go for backend services in 2026"
152
- "Research the best strategies for bootstrapping a SaaS business"
153
- "What's happening with the US housing market right now?"
154
- "Investigate the competitive landscape for AI code editors"
155
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/deep-research/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Deep Research"
3
- short_description: "Multi-source deep research with firecrawl and exa MCPs"
4
- brand_color: "#6366F1"
5
- default_prompt: "Research the given topic using firecrawl and exa, produce a cited report"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/dmux-workflows/SKILL.md DELETED
@@ -1,144 +0,0 @@
1
- ---
2
- name: dmux-workflows
3
- description: Multi-agent orchestration using dmux (tmux pane manager for AI agents). Patterns for parallel agent workflows across Claude Code, Codex, OpenCode, and other harnesses. Use when running multiple agent sessions in parallel or coordinating multi-agent development workflows.
4
- origin: ECC
5
- ---
6
-
7
- # dmux Workflows
8
-
9
- Orchestrate parallel AI agent sessions using dmux, a tmux pane manager for agent harnesses.
10
-
11
- ## When to Activate
12
-
13
- - Running multiple agent sessions in parallel
14
- - Coordinating work across Claude Code, Codex, and other harnesses
15
- - Complex tasks that benefit from divide-and-conquer parallelism
16
- - User says "run in parallel", "split this work", "use dmux", or "multi-agent"
17
-
18
- ## What is dmux
19
-
20
- dmux is a tmux-based orchestration tool that manages AI agent panes:
21
- - Press `n` to create a new pane with a prompt
22
- - Press `m` to merge pane output back to the main session
23
- - Supports: Claude Code, Codex, OpenCode, Cline, Gemini, Qwen
24
-
25
- **Install:** `npm install -g dmux` or see [github.com/standardagents/dmux](https://github.com/standardagents/dmux)
26
-
27
- ## Quick Start
28
-
29
- ```bash
30
- # Start dmux session
31
- dmux
32
-
33
- # Create agent panes (press 'n' in dmux, then type prompt)
34
- # Pane 1: "Implement the auth middleware in src/auth/"
35
- # Pane 2: "Write tests for the user service"
36
- # Pane 3: "Update API documentation"
37
-
38
- # Each pane runs its own agent session
39
- # Press 'm' to merge results back
40
- ```
41
-
42
- ## Workflow Patterns
43
-
44
- ### Pattern 1: Research + Implement
45
-
46
- Split research and implementation into parallel tracks:
47
-
48
- ```
49
- Pane 1 (Research): "Research best practices for rate limiting in Node.js.
50
- Check current libraries, compare approaches, and write findings to
51
- /tmp/rate-limit-research.md"
52
-
53
- Pane 2 (Implement): "Implement rate limiting middleware for our Express API.
54
- Start with a basic token bucket, we'll refine after research completes."
55
-
56
- # After Pane 1 completes, merge findings into Pane 2's context
57
- ```
58
-
59
- ### Pattern 2: Multi-File Feature
60
-
61
- Parallelize work across independent files:
62
-
63
- ```
64
- Pane 1: "Create the database schema and migrations for the billing feature"
65
- Pane 2: "Build the billing API endpoints in src/api/billing/"
66
- Pane 3: "Create the billing dashboard UI components"
67
-
68
- # Merge all, then do integration in main pane
69
- ```
70
-
71
- ### Pattern 3: Test + Fix Loop
72
-
73
- Run tests in one pane, fix in another:
74
-
75
- ```
76
- Pane 1 (Watcher): "Run the test suite in watch mode. When tests fail,
77
- summarize the failures."
78
-
79
- Pane 2 (Fixer): "Fix failing tests based on the error output from pane 1"
80
- ```
81
-
82
- ### Pattern 4: Cross-Harness
83
-
84
- Use different AI tools for different tasks:
85
-
86
- ```
87
- Pane 1 (Claude Code): "Review the security of the auth module"
88
- Pane 2 (Codex): "Refactor the utility functions for performance"
89
- Pane 3 (Claude Code): "Write E2E tests for the checkout flow"
90
- ```
91
-
92
- ### Pattern 5: Code Review Pipeline
93
-
94
- Parallel review perspectives:
95
-
96
- ```
97
- Pane 1: "Review src/api/ for security vulnerabilities"
98
- Pane 2: "Review src/api/ for performance issues"
99
- Pane 3: "Review src/api/ for test coverage gaps"
100
-
101
- # Merge all reviews into a single report
102
- ```
103
-
104
- ## Best Practices
105
-
106
- 1. **Independent tasks only.** Don't parallelize tasks that depend on each other's output.
107
- 2. **Clear boundaries.** Each pane should work on distinct files or concerns.
108
- 3. **Merge strategically.** Review pane output before merging to avoid conflicts.
109
- 4. **Use git worktrees.** For file-conflict-prone work, use separate worktrees per pane.
110
- 5. **Resource awareness.** Each pane uses API tokens — keep total panes under 5-6.
111
-
112
- ## Git Worktree Integration
113
-
114
- For tasks that touch overlapping files:
115
-
116
- ```bash
117
- # Create worktrees for isolation
118
- git worktree add ../feature-auth feat/auth
119
- git worktree add ../feature-billing feat/billing
120
-
121
- # Run agents in separate worktrees
122
- # Pane 1: cd ../feature-auth && claude
123
- # Pane 2: cd ../feature-billing && claude
124
-
125
- # Merge branches when done
126
- git merge feat/auth
127
- git merge feat/billing
128
- ```
129
-
130
- ## Complementary Tools
131
-
132
- | Tool | What It Does | When to Use |
133
- |------|-------------|-------------|
134
- | **dmux** | tmux pane management for agents | Parallel agent sessions |
135
- | **Superset** | Terminal IDE for 10+ parallel agents | Large-scale orchestration |
136
- | **Claude Code Task tool** | In-process subagent spawning | Programmatic parallelism within a session |
137
- | **Codex multi-agent** | Built-in agent roles | Codex-specific parallel work |
138
-
139
- ## Troubleshooting
140
-
141
- - **Pane not responding:** Check if the agent session is waiting for input. Use `m` to read output.
142
- - **Merge conflicts:** Use git worktrees to isolate file changes per pane.
143
- - **High token usage:** Reduce number of parallel panes. Each pane is a full agent session.
144
- - **tmux not found:** Install with `brew install tmux` (macOS) or `apt install tmux` (Linux).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/dmux-workflows/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "dmux Workflows"
3
- short_description: "Multi-agent orchestration with dmux"
4
- brand_color: "#14B8A6"
5
- default_prompt: "Orchestrate parallel agent sessions using dmux pane manager"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/documentation-lookup/SKILL.md DELETED
@@ -1,90 +0,0 @@
1
- ---
2
- name: documentation-lookup
3
- description: Use up-to-date library and framework docs via Context7 MCP instead of training data. Activates for setup questions, API references, code examples, or when the user names a framework (e.g. React, Next.js, Prisma).
4
- origin: ECC
5
- ---
6
-
7
- # Documentation Lookup (Context7)
8
-
9
- When the user asks about libraries, frameworks, or APIs, fetch current documentation via the Context7 MCP (tools `resolve-library-id` and `query-docs`) instead of relying on training data.
10
-
11
- ## Core Concepts
12
-
13
- - **Context7**: MCP server that exposes live documentation; use it instead of training data for libraries and APIs.
14
- - **resolve-library-id**: Returns Context7-compatible library IDs (e.g. `/vercel/next.js`) from a library name and query.
15
- - **query-docs**: Fetches documentation and code snippets for a given library ID and question. Always call resolve-library-id first to get a valid library ID.
16
-
17
- ## When to use
18
-
19
- Activate when the user:
20
-
21
- - Asks setup or configuration questions (e.g. "How do I configure Next.js middleware?")
22
- - Requests code that depends on a library ("Write a Prisma query for...")
23
- - Needs API or reference information ("What are the Supabase auth methods?")
24
- - Mentions specific frameworks or libraries (React, Vue, Svelte, Express, Tailwind, Prisma, Supabase, etc.)
25
-
26
- Use this skill whenever the request depends on accurate, up-to-date behavior of a library, framework, or API. Applies across harnesses that have the Context7 MCP configured (e.g. Claude Code, Cursor, Codex).
27
-
28
- ## How it works
29
-
30
- ### Step 1: Resolve the Library ID
31
-
32
- Call the **resolve-library-id** MCP tool with:
33
-
34
- - **libraryName**: The library or product name taken from the user's question (e.g. `Next.js`, `Prisma`, `Supabase`).
35
- - **query**: The user's full question. This improves relevance ranking of results.
36
-
37
- You must obtain a Context7-compatible library ID (format `/org/project` or `/org/project/version`) before querying docs. Do not call query-docs without a valid library ID from this step.
38
-
39
- ### Step 2: Select the Best Match
40
-
41
- From the resolution results, choose one result using:
42
-
43
- - **Name match**: Prefer exact or closest match to what the user asked for.
44
- - **Benchmark score**: Higher scores indicate better documentation quality (100 is highest).
45
- - **Source reputation**: Prefer High or Medium reputation when available.
46
- - **Version**: If the user specified a version (e.g. "React 19", "Next.js 15"), prefer a version-specific library ID if listed (e.g. `/org/project/v1.2.0`).
47
-
48
- ### Step 3: Fetch the Documentation
49
-
50
- Call the **query-docs** MCP tool with:
51
-
52
- - **libraryId**: The selected Context7 library ID from Step 2 (e.g. `/vercel/next.js`).
53
- - **query**: The user's specific question or task. Be specific to get relevant snippets.
54
-
55
- Limit: do not call query-docs (or resolve-library-id) more than 3 times per question. If the answer is unclear after 3 calls, state the uncertainty and use the best information you have rather than guessing.
56
-
57
- ### Step 4: Use the Documentation
58
-
59
- - Answer the user's question using the fetched, current information.
60
- - Include relevant code examples from the docs when helpful.
61
- - Cite the library or version when it matters (e.g. "In Next.js 15...").
62
-
63
- ## Examples
64
-
65
- ### Example: Next.js middleware
66
-
67
- 1. Call **resolve-library-id** with `libraryName: "Next.js"`, `query: "How do I set up Next.js middleware?"`.
68
- 2. From results, pick the best match (e.g. `/vercel/next.js`) by name and benchmark score.
69
- 3. Call **query-docs** with `libraryId: "/vercel/next.js"`, `query: "How do I set up Next.js middleware?"`.
70
- 4. Use the returned snippets and text to answer; include a minimal `middleware.ts` example from the docs if relevant.
71
-
72
- ### Example: Prisma query
73
-
74
- 1. Call **resolve-library-id** with `libraryName: "Prisma"`, `query: "How do I query with relations?"`.
75
- 2. Select the official Prisma library ID (e.g. `/prisma/prisma`).
76
- 3. Call **query-docs** with that `libraryId` and the query.
77
- 4. Return the Prisma Client pattern (e.g. `include` or `select`) with a short code snippet from the docs.
78
-
79
- ### Example: Supabase auth methods
80
-
81
- 1. Call **resolve-library-id** with `libraryName: "Supabase"`, `query: "What are the auth methods?"`.
82
- 2. Pick the Supabase docs library ID.
83
- 3. Call **query-docs**; summarize the auth methods and show minimal examples from the fetched docs.
84
-
85
- ## Best Practices
86
-
87
- - **Be specific**: Use the user's full question as the query where possible for better relevance.
88
- - **Version awareness**: When users mention versions, use version-specific library IDs from the resolve step when available.
89
- - **Prefer official sources**: When multiple matches exist, prefer official or primary packages over community forks.
90
- - **No sensitive data**: Redact API keys, passwords, tokens, and other secrets from any query sent to Context7. Treat the user's question as potentially containing secrets before passing it to resolve-library-id or query-docs.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/documentation-lookup/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Documentation Lookup"
3
- short_description: "Fetch up-to-date library docs via Context7 MCP"
4
- brand_color: "#6366F1"
5
- default_prompt: "Look up docs for a library or API"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/e2e-testing/SKILL.md DELETED
@@ -1,326 +0,0 @@
1
- ---
2
- name: e2e-testing
3
- description: Playwright E2E testing patterns, Page Object Model, configuration, CI/CD integration, artifact management, and flaky test strategies.
4
- origin: ECC
5
- ---
6
-
7
- # E2E Testing Patterns
8
-
9
- Comprehensive Playwright patterns for building stable, fast, and maintainable E2E test suites.
10
-
11
- ## Test File Organization
12
-
13
- ```
14
- tests/
15
- ├── e2e/
16
- │ ├── auth/
17
- │ │ ├── login.spec.ts
18
- │ │ ├── logout.spec.ts
19
- │ │ └── register.spec.ts
20
- │ ├── features/
21
- │ │ ├── browse.spec.ts
22
- │ │ ├── search.spec.ts
23
- │ │ └── create.spec.ts
24
- │ └── api/
25
- │ └── endpoints.spec.ts
26
- ├── fixtures/
27
- │ ├── auth.ts
28
- │ └── data.ts
29
- └── playwright.config.ts
30
- ```
31
-
32
- ## Page Object Model (POM)
33
-
34
- ```typescript
35
- import { Page, Locator } from '@playwright/test'
36
-
37
- export class ItemsPage {
38
- readonly page: Page
39
- readonly searchInput: Locator
40
- readonly itemCards: Locator
41
- readonly createButton: Locator
42
-
43
- constructor(page: Page) {
44
- this.page = page
45
- this.searchInput = page.locator('[data-testid="search-input"]')
46
- this.itemCards = page.locator('[data-testid="item-card"]')
47
- this.createButton = page.locator('[data-testid="create-btn"]')
48
- }
49
-
50
- async goto() {
51
- await this.page.goto('/items')
52
- await this.page.waitForLoadState('networkidle')
53
- }
54
-
55
- async search(query: string) {
56
- await this.searchInput.fill(query)
57
- await this.page.waitForResponse(resp => resp.url().includes('/api/search'))
58
- await this.page.waitForLoadState('networkidle')
59
- }
60
-
61
- async getItemCount() {
62
- return await this.itemCards.count()
63
- }
64
- }
65
- ```
66
-
67
- ## Test Structure
68
-
69
- ```typescript
70
- import { test, expect } from '@playwright/test'
71
- import { ItemsPage } from '../../pages/ItemsPage'
72
-
73
- test.describe('Item Search', () => {
74
- let itemsPage: ItemsPage
75
-
76
- test.beforeEach(async ({ page }) => {
77
- itemsPage = new ItemsPage(page)
78
- await itemsPage.goto()
79
- })
80
-
81
- test('should search by keyword', async ({ page }) => {
82
- await itemsPage.search('test')
83
-
84
- const count = await itemsPage.getItemCount()
85
- expect(count).toBeGreaterThan(0)
86
-
87
- await expect(itemsPage.itemCards.first()).toContainText(/test/i)
88
- await page.screenshot({ path: 'artifacts/search-results.png' })
89
- })
90
-
91
- test('should handle no results', async ({ page }) => {
92
- await itemsPage.search('xyznonexistent123')
93
-
94
- await expect(page.locator('[data-testid="no-results"]')).toBeVisible()
95
- expect(await itemsPage.getItemCount()).toBe(0)
96
- })
97
- })
98
- ```
99
-
100
- ## Playwright Configuration
101
-
102
- ```typescript
103
- import { defineConfig, devices } from '@playwright/test'
104
-
105
- export default defineConfig({
106
- testDir: './tests/e2e',
107
- fullyParallel: true,
108
- forbidOnly: !!process.env.CI,
109
- retries: process.env.CI ? 2 : 0,
110
- workers: process.env.CI ? 1 : undefined,
111
- reporter: [
112
- ['html', { outputFolder: 'playwright-report' }],
113
- ['junit', { outputFile: 'playwright-results.xml' }],
114
- ['json', { outputFile: 'playwright-results.json' }]
115
- ],
116
- use: {
117
- baseURL: process.env.BASE_URL || 'http://localhost:3000',
118
- trace: 'on-first-retry',
119
- screenshot: 'only-on-failure',
120
- video: 'retain-on-failure',
121
- actionTimeout: 10000,
122
- navigationTimeout: 30000,
123
- },
124
- projects: [
125
- { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
126
- { name: 'firefox', use: { ...devices['Desktop Firefox'] } },
127
- { name: 'webkit', use: { ...devices['Desktop Safari'] } },
128
- { name: 'mobile-chrome', use: { ...devices['Pixel 5'] } },
129
- ],
130
- webServer: {
131
- command: 'npm run dev',
132
- url: 'http://localhost:3000',
133
- reuseExistingServer: !process.env.CI,
134
- timeout: 120000,
135
- },
136
- })
137
- ```
138
-
139
- ## Flaky Test Patterns
140
-
141
- ### Quarantine
142
-
143
- ```typescript
144
- test('flaky: complex search', async ({ page }) => {
145
- test.fixme(true, 'Flaky - Issue #123')
146
- // test code...
147
- })
148
-
149
- test('conditional skip', async ({ page }) => {
150
- test.skip(process.env.CI, 'Flaky in CI - Issue #123')
151
- // test code...
152
- })
153
- ```
154
-
155
- ### Identify Flakiness
156
-
157
- ```bash
158
- npx playwright test tests/search.spec.ts --repeat-each=10
159
- npx playwright test tests/search.spec.ts --retries=3
160
- ```
161
-
162
- ### Common Causes & Fixes
163
-
164
- **Race conditions:**
165
- ```typescript
166
- // Bad: assumes element is ready
167
- await page.click('[data-testid="button"]')
168
-
169
- // Good: auto-wait locator
170
- await page.locator('[data-testid="button"]').click()
171
- ```
172
-
173
- **Network timing:**
174
- ```typescript
175
- // Bad: arbitrary timeout
176
- await page.waitForTimeout(5000)
177
-
178
- // Good: wait for specific condition
179
- await page.waitForResponse(resp => resp.url().includes('/api/data'))
180
- ```
181
-
182
- **Animation timing:**
183
- ```typescript
184
- // Bad: click during animation
185
- await page.click('[data-testid="menu-item"]')
186
-
187
- // Good: wait for stability
188
- await page.locator('[data-testid="menu-item"]').waitFor({ state: 'visible' })
189
- await page.waitForLoadState('networkidle')
190
- await page.locator('[data-testid="menu-item"]').click()
191
- ```
192
-
193
- ## Artifact Management
194
-
195
- ### Screenshots
196
-
197
- ```typescript
198
- await page.screenshot({ path: 'artifacts/after-login.png' })
199
- await page.screenshot({ path: 'artifacts/full-page.png', fullPage: true })
200
- await page.locator('[data-testid="chart"]').screenshot({ path: 'artifacts/chart.png' })
201
- ```
202
-
203
- ### Traces
204
-
205
- ```typescript
206
- await browser.startTracing(page, {
207
- path: 'artifacts/trace.json',
208
- screenshots: true,
209
- snapshots: true,
210
- })
211
- // ... test actions ...
212
- await browser.stopTracing()
213
- ```
214
-
215
- ### Video
216
-
217
- ```typescript
218
- // In playwright.config.ts
219
- use: {
220
- video: 'retain-on-failure',
221
- videosPath: 'artifacts/videos/'
222
- }
223
- ```
224
-
225
- ## CI/CD Integration
226
-
227
- ```yaml
228
- # .github/workflows/e2e.yml
229
- name: E2E Tests
230
- on: [push, pull_request]
231
-
232
- jobs:
233
- test:
234
- runs-on: ubuntu-latest
235
- steps:
236
- - uses: actions/checkout@v4
237
- - uses: actions/setup-node@v4
238
- with:
239
- node-version: 20
240
- - run: npm ci
241
- - run: npx playwright install --with-deps
242
- - run: npx playwright test
243
- env:
244
- BASE_URL: ${{ vars.STAGING_URL }}
245
- - uses: actions/upload-artifact@v4
246
- if: always()
247
- with:
248
- name: playwright-report
249
- path: playwright-report/
250
- retention-days: 30
251
- ```
252
-
253
- ## Test Report Template
254
-
255
- ```markdown
256
- # E2E Test Report
257
-
258
- **Date:** YYYY-MM-DD HH:MM
259
- **Duration:** Xm Ys
260
- **Status:** PASSING / FAILING
261
-
262
- ## Summary
263
- - Total: X | Passed: Y (Z%) | Failed: A | Flaky: B | Skipped: C
264
-
265
- ## Failed Tests
266
-
267
- ### test-name
268
- **File:** `tests/e2e/feature.spec.ts:45`
269
- **Error:** Expected element to be visible
270
- **Screenshot:** artifacts/failed.png
271
- **Recommended Fix:** [description]
272
-
273
- ## Artifacts
274
- - HTML Report: playwright-report/index.html
275
- - Screenshots: artifacts/*.png
276
- - Videos: artifacts/videos/*.webm
277
- - Traces: artifacts/*.zip
278
- ```
279
-
280
- ## Wallet / Web3 Testing
281
-
282
- ```typescript
283
- test('wallet connection', async ({ page, context }) => {
284
- // Mock wallet provider
285
- await context.addInitScript(() => {
286
- window.ethereum = {
287
- isMetaMask: true,
288
- request: async ({ method }) => {
289
- if (method === 'eth_requestAccounts')
290
- return ['0x1234567890123456789012345678901234567890']
291
- if (method === 'eth_chainId') return '0x1'
292
- }
293
- }
294
- })
295
-
296
- await page.goto('/')
297
- await page.locator('[data-testid="connect-wallet"]').click()
298
- await expect(page.locator('[data-testid="wallet-address"]')).toContainText('0x1234')
299
- })
300
- ```
301
-
302
- ## Financial / Critical Flow Testing
303
-
304
- ```typescript
305
- test('trade execution', async ({ page }) => {
306
- // Skip on production — real money
307
- test.skip(process.env.NODE_ENV === 'production', 'Skip on production')
308
-
309
- await page.goto('/markets/test-market')
310
- await page.locator('[data-testid="position-yes"]').click()
311
- await page.locator('[data-testid="trade-amount"]').fill('1.0')
312
-
313
- // Verify preview
314
- const preview = page.locator('[data-testid="trade-preview"]')
315
- await expect(preview).toContainText('1.0')
316
-
317
- // Confirm and wait for blockchain
318
- await page.locator('[data-testid="confirm-trade"]').click()
319
- await page.waitForResponse(
320
- resp => resp.url().includes('/api/trade') && resp.status() === 200,
321
- { timeout: 30000 }
322
- )
323
-
324
- await expect(page.locator('[data-testid="trade-success"]')).toBeVisible()
325
- })
326
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/e2e-testing/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "E2E Testing"
3
- short_description: "Playwright end-to-end testing"
4
- brand_color: "#06B6D4"
5
- default_prompt: "Generate Playwright E2E tests with Page Object Model"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/eval-harness/SKILL.md DELETED
@@ -1,236 +0,0 @@
1
- ---
2
- name: eval-harness
3
- description: Formal evaluation framework for Claude Code sessions implementing eval-driven development (EDD) principles
4
- origin: ECC
5
- tools: Read, Write, Edit, Bash, Grep, Glob
6
- ---
7
-
8
- # Eval Harness Skill
9
-
10
- A formal evaluation framework for Claude Code sessions, implementing eval-driven development (EDD) principles.
11
-
12
- ## When to Activate
13
-
14
- - Setting up eval-driven development (EDD) for AI-assisted workflows
15
- - Defining pass/fail criteria for Claude Code task completion
16
- - Measuring agent reliability with pass@k metrics
17
- - Creating regression test suites for prompt or agent changes
18
- - Benchmarking agent performance across model versions
19
-
20
- ## Philosophy
21
-
22
- Eval-Driven Development treats evals as the "unit tests of AI development":
23
- - Define expected behavior BEFORE implementation
24
- - Run evals continuously during development
25
- - Track regressions with each change
26
- - Use pass@k metrics for reliability measurement
27
-
28
- ## Eval Types
29
-
30
- ### Capability Evals
31
- Test if Claude can do something it couldn't before:
32
- ```markdown
33
- [CAPABILITY EVAL: feature-name]
34
- Task: Description of what Claude should accomplish
35
- Success Criteria:
36
- - [ ] Criterion 1
37
- - [ ] Criterion 2
38
- - [ ] Criterion 3
39
- Expected Output: Description of expected result
40
- ```
41
-
42
- ### Regression Evals
43
- Ensure changes don't break existing functionality:
44
- ```markdown
45
- [REGRESSION EVAL: feature-name]
46
- Baseline: SHA or checkpoint name
47
- Tests:
48
- - existing-test-1: PASS/FAIL
49
- - existing-test-2: PASS/FAIL
50
- - existing-test-3: PASS/FAIL
51
- Result: X/Y passed (previously Y/Y)
52
- ```
53
-
54
- ## Grader Types
55
-
56
- ### 1. Code-Based Grader
57
- Deterministic checks using code:
58
- ```bash
59
- # Check if file contains expected pattern
60
- grep -q "export function handleAuth" src/auth.ts && echo "PASS" || echo "FAIL"
61
-
62
- # Check if tests pass
63
- npm test -- --testPathPattern="auth" && echo "PASS" || echo "FAIL"
64
-
65
- # Check if build succeeds
66
- npm run build && echo "PASS" || echo "FAIL"
67
- ```
68
-
69
- ### 2. Model-Based Grader
70
- Use Claude to evaluate open-ended outputs:
71
- ```markdown
72
- [MODEL GRADER PROMPT]
73
- Evaluate the following code change:
74
- 1. Does it solve the stated problem?
75
- 2. Is it well-structured?
76
- 3. Are edge cases handled?
77
- 4. Is error handling appropriate?
78
-
79
- Score: 1-5 (1=poor, 5=excellent)
80
- Reasoning: [explanation]
81
- ```
82
-
83
- ### 3. Human Grader
84
- Flag for manual review:
85
- ```markdown
86
- [HUMAN REVIEW REQUIRED]
87
- Change: Description of what changed
88
- Reason: Why human review is needed
89
- Risk Level: LOW/MEDIUM/HIGH
90
- ```
91
-
92
- ## Metrics
93
-
94
- ### pass@k
95
- "At least one success in k attempts"
96
- - pass@1: First attempt success rate
97
- - pass@3: Success within 3 attempts
98
- - Typical target: pass@3 > 90%
99
-
100
- ### pass^k
101
- "All k trials succeed"
102
- - Higher bar for reliability
103
- - pass^3: 3 consecutive successes
104
- - Use for critical paths
105
-
106
- ## Eval Workflow
107
-
108
- ### 1. Define (Before Coding)
109
- ```markdown
110
- ## EVAL DEFINITION: feature-xyz
111
-
112
- ### Capability Evals
113
- 1. Can create new user account
114
- 2. Can validate email format
115
- 3. Can hash password securely
116
-
117
- ### Regression Evals
118
- 1. Existing login still works
119
- 2. Session management unchanged
120
- 3. Logout flow intact
121
-
122
- ### Success Metrics
123
- - pass@3 > 90% for capability evals
124
- - pass^3 = 100% for regression evals
125
- ```
126
-
127
- ### 2. Implement
128
- Write code to pass the defined evals.
129
-
130
- ### 3. Evaluate
131
- ```bash
132
- # Run capability evals
133
- [Run each capability eval, record PASS/FAIL]
134
-
135
- # Run regression evals
136
- npm test -- --testPathPattern="existing"
137
-
138
- # Generate report
139
- ```
140
-
141
- ### 4. Report
142
- ```markdown
143
- EVAL REPORT: feature-xyz
144
- ========================
145
-
146
- Capability Evals:
147
- create-user: PASS (pass@1)
148
- validate-email: PASS (pass@2)
149
- hash-password: PASS (pass@1)
150
- Overall: 3/3 passed
151
-
152
- Regression Evals:
153
- login-flow: PASS
154
- session-mgmt: PASS
155
- logout-flow: PASS
156
- Overall: 3/3 passed
157
-
158
- Metrics:
159
- pass@1: 67% (2/3)
160
- pass@3: 100% (3/3)
161
-
162
- Status: READY FOR REVIEW
163
- ```
164
-
165
- ## Integration Patterns
166
-
167
- ### Pre-Implementation
168
- ```
169
- /eval define feature-name
170
- ```
171
- Creates eval definition file at `.claude/evals/feature-name.md`
172
-
173
- ### During Implementation
174
- ```
175
- /eval check feature-name
176
- ```
177
- Runs current evals and reports status
178
-
179
- ### Post-Implementation
180
- ```
181
- /eval report feature-name
182
- ```
183
- Generates full eval report
184
-
185
- ## Eval Storage
186
-
187
- Store evals in project:
188
- ```
189
- .claude/
190
- evals/
191
- feature-xyz.md # Eval definition
192
- feature-xyz.log # Eval run history
193
- baseline.json # Regression baselines
194
- ```
195
-
196
- ## Best Practices
197
-
198
- 1. **Define evals BEFORE coding** - Forces clear thinking about success criteria
199
- 2. **Run evals frequently** - Catch regressions early
200
- 3. **Track pass@k over time** - Monitor reliability trends
201
- 4. **Use code graders when possible** - Deterministic > probabilistic
202
- 5. **Human review for security** - Never fully automate security checks
203
- 6. **Keep evals fast** - Slow evals don't get run
204
- 7. **Version evals with code** - Evals are first-class artifacts
205
-
206
- ## Example: Adding Authentication
207
-
208
- ```markdown
209
- ## EVAL: add-authentication
210
-
211
- ### Phase 1: Define (10 min)
212
- Capability Evals:
213
- - [ ] User can register with email/password
214
- - [ ] User can login with valid credentials
215
- - [ ] Invalid credentials rejected with proper error
216
- - [ ] Sessions persist across page reloads
217
- - [ ] Logout clears session
218
-
219
- Regression Evals:
220
- - [ ] Public routes still accessible
221
- - [ ] API responses unchanged
222
- - [ ] Database schema compatible
223
-
224
- ### Phase 2: Implement (varies)
225
- [Write code]
226
-
227
- ### Phase 3: Evaluate
228
- Run: /eval check add-authentication
229
-
230
- ### Phase 4: Report
231
- EVAL REPORT: add-authentication
232
- ==============================
233
- Capability: 5/5 passed (pass@3: 100%)
234
- Regression: 3/3 passed (pass^3: 100%)
235
- Status: SHIP IT
236
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/eval-harness/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Eval Harness"
3
- short_description: "Eval-driven development with pass/fail criteria"
4
- brand_color: "#EC4899"
5
- default_prompt: "Set up eval-driven development with pass/fail criteria"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/everything-claude-code/SKILL.md DELETED
@@ -1,442 +0,0 @@
1
- ---
2
- name: everything-claude-code-conventions
3
- description: Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.
4
- ---
5
-
6
- # Everything Claude Code Conventions
7
-
8
- > Generated from [affaan-m/everything-claude-code](https://github.com/affaan-m/everything-claude-code) on 2026-03-20
9
-
10
- ## Overview
11
-
12
- This skill teaches Claude the development patterns and conventions used in everything-claude-code.
13
-
14
- ## Tech Stack
15
-
16
- - **Primary Language**: JavaScript
17
- - **Architecture**: hybrid module organization
18
- - **Test Location**: separate
19
-
20
- ## When to Use This Skill
21
-
22
- Activate this skill when:
23
- - Making changes to this repository
24
- - Adding new features following established patterns
25
- - Writing tests that match project conventions
26
- - Creating commits with proper message format
27
-
28
- ## Commit Conventions
29
-
30
- Follow these commit message conventions based on 500 analyzed commits.
31
-
32
- ### Commit Style: Conventional Commits
33
-
34
- ### Prefixes Used
35
-
36
- - `fix`
37
- - `test`
38
- - `feat`
39
- - `docs`
40
-
41
- ### Message Guidelines
42
-
43
- - Average message length: ~65 characters
44
- - Keep first line concise and descriptive
45
- - Use imperative mood ("Add feature" not "Added feature")
46
-
47
-
48
- *Commit message example*
49
-
50
- ```text
51
- feat(rules): add C# language support
52
- ```
53
-
54
- *Commit message example*
55
-
56
- ```text
57
- chore(deps-dev): bump flatted (#675)
58
- ```
59
-
60
- *Commit message example*
61
-
62
- ```text
63
- fix: auto-detect ECC root from plugin cache when CLAUDE_PLUGIN_ROOT is unset (#547) (#691)
64
- ```
65
-
66
- *Commit message example*
67
-
68
- ```text
69
- docs: add Antigravity setup and usage guide (#552)
70
- ```
71
-
72
- *Commit message example*
73
-
74
- ```text
75
- merge: PR #529 — feat(skills): add documentation-lookup, bun-runtime, nextjs-turbopack; feat(agents): add rust-reviewer
76
- ```
77
-
78
- *Commit message example*
79
-
80
- ```text
81
- Revert "Add Kiro IDE support (.kiro/) (#548)"
82
- ```
83
-
84
- *Commit message example*
85
-
86
- ```text
87
- Add Kiro IDE support (.kiro/) (#548)
88
- ```
89
-
90
- *Commit message example*
91
-
92
- ```text
93
- feat: add block-no-verify hook for Claude Code and Cursor (#649)
94
- ```
95
-
96
- ## Architecture
97
-
98
- ### Project Structure: Single Package
99
-
100
- This project uses **hybrid** module organization.
101
-
102
- ### Configuration Files
103
-
104
- - `.github/workflows/ci.yml`
105
- - `.github/workflows/maintenance.yml`
106
- - `.github/workflows/monthly-metrics.yml`
107
- - `.github/workflows/release.yml`
108
- - `.github/workflows/reusable-release.yml`
109
- - `.github/workflows/reusable-test.yml`
110
- - `.github/workflows/reusable-validate.yml`
111
- - `.opencode/package.json`
112
- - `.opencode/tsconfig.json`
113
- - `.prettierrc`
114
- - `eslint.config.js`
115
- - `package.json`
116
-
117
- ### Guidelines
118
-
119
- - This project uses a hybrid organization
120
- - Follow existing patterns when adding new code
121
-
122
- ## Code Style
123
-
124
- ### Language: JavaScript
125
-
126
- ### Naming Conventions
127
-
128
- | Element | Convention |
129
- |---------|------------|
130
- | Files | camelCase |
131
- | Functions | camelCase |
132
- | Classes | PascalCase |
133
- | Constants | SCREAMING_SNAKE_CASE |
134
-
135
- ### Import Style: Relative Imports
136
-
137
- ### Export Style: Mixed Style
138
-
139
-
140
- *Preferred import style*
141
-
142
- ```typescript
143
- // Use relative imports
144
- import { Button } from '../components/Button'
145
- import { useAuth } from './hooks/useAuth'
146
- ```
147
-
148
- ## Testing
149
-
150
- ### Test Framework
151
-
152
- No specific test framework detected — use the repository's existing test patterns.
153
-
154
- ### File Pattern: `*.test.js`
155
-
156
- ### Test Types
157
-
158
- - **Unit tests**: Test individual functions and components in isolation
159
- - **Integration tests**: Test interactions between multiple components/services
160
-
161
- ### Coverage
162
-
163
- This project has coverage reporting configured. Aim for 80%+ coverage.
164
-
165
-
166
- ## Error Handling
167
-
168
- ### Error Handling Style: Try-Catch Blocks
169
-
170
-
171
- *Standard error handling pattern*
172
-
173
- ```typescript
174
- try {
175
- const result = await riskyOperation()
176
- return result
177
- } catch (error) {
178
- console.error('Operation failed:', error)
179
- throw new Error('User-friendly message')
180
- }
181
- ```
182
-
183
- ## Common Workflows
184
-
185
- These workflows were detected from analyzing commit patterns.
186
-
187
- ### Database Migration
188
-
189
- Database schema changes with migration files
190
-
191
- **Frequency**: ~2 times per month
192
-
193
- **Steps**:
194
- 1. Create migration file
195
- 2. Update schema definitions
196
- 3. Generate/update types
197
-
198
- **Files typically involved**:
199
- - `**/schema.*`
200
- - `migrations/*`
201
-
202
- **Example commit sequence**:
203
- ```
204
- feat: implement --with/--without selective install flags (#679)
205
- fix: sync catalog counts with filesystem (27 agents, 113 skills, 58 commands) (#693)
206
- feat(rules): add Rust language rules (rebased #660) (#686)
207
- ```
208
-
209
- ### Feature Development
210
-
211
- Standard feature implementation workflow
212
-
213
- **Frequency**: ~22 times per month
214
-
215
- **Steps**:
216
- 1. Add feature implementation
217
- 2. Add tests for feature
218
- 3. Update documentation
219
-
220
- **Files typically involved**:
221
- - `manifests/*`
222
- - `schemas/*`
223
- - `**/*.test.*`
224
- - `**/api/**`
225
-
226
- **Example commit sequence**:
227
- ```
228
- feat(skills): add documentation-lookup, bun-runtime, nextjs-turbopack; feat(agents): add rust-reviewer
229
- docs(skills): align documentation-lookup with CONTRIBUTING template; add cross-harness (Codex/Cursor) skill copies
230
- fix: address PR review — skill template (When to use, How it works, Examples), bun.lock, next build note, rust-reviewer CI note, doc-lookup privacy/uncertainty
231
- ```
232
-
233
- ### Add Language Rules
234
-
235
- Adds a new programming language to the rules system, including coding style, hooks, patterns, security, and testing guidelines.
236
-
237
- **Frequency**: ~2 times per month
238
-
239
- **Steps**:
240
- 1. Create a new directory under rules/{language}/
241
- 2. Add coding-style.md, hooks.md, patterns.md, security.md, and testing.md files with language-specific content
242
- 3. Optionally reference or link to related skills
243
-
244
- **Files typically involved**:
245
- - `rules/*/coding-style.md`
246
- - `rules/*/hooks.md`
247
- - `rules/*/patterns.md`
248
- - `rules/*/security.md`
249
- - `rules/*/testing.md`
250
-
251
- **Example commit sequence**:
252
- ```
253
- Create a new directory under rules/{language}/
254
- Add coding-style.md, hooks.md, patterns.md, security.md, and testing.md files with language-specific content
255
- Optionally reference or link to related skills
256
- ```
257
-
258
- ### Add New Skill
259
-
260
- Adds a new skill to the system, documenting its workflow, triggers, and usage, often with supporting scripts.
261
-
262
- **Frequency**: ~4 times per month
263
-
264
- **Steps**:
265
- 1. Create a new directory under skills/{skill-name}/
266
- 2. Add SKILL.md with documentation (When to Use, How It Works, Examples, etc.)
267
- 3. Optionally add scripts or supporting files under skills/{skill-name}/scripts/
268
- 4. Address review feedback and iterate on documentation
269
-
270
- **Files typically involved**:
271
- - `skills/*/SKILL.md`
272
- - `skills/*/scripts/*.sh`
273
- - `skills/*/scripts/*.js`
274
-
275
- **Example commit sequence**:
276
- ```
277
- Create a new directory under skills/{skill-name}/
278
- Add SKILL.md with documentation (When to Use, How It Works, Examples, etc.)
279
- Optionally add scripts or supporting files under skills/{skill-name}/scripts/
280
- Address review feedback and iterate on documentation
281
- ```
282
-
283
- ### Add New Agent
284
-
285
- Adds a new agent to the system for code review, build resolution, or other automated tasks.
286
-
287
- **Frequency**: ~2 times per month
288
-
289
- **Steps**:
290
- 1. Create a new agent markdown file under agents/{agent-name}.md
291
- 2. Register the agent in AGENTS.md
292
- 3. Optionally update README.md and docs/COMMAND-AGENT-MAP.md
293
-
294
- **Files typically involved**:
295
- - `agents/*.md`
296
- - `AGENTS.md`
297
- - `README.md`
298
- - `docs/COMMAND-AGENT-MAP.md`
299
-
300
- **Example commit sequence**:
301
- ```
302
- Create a new agent markdown file under agents/{agent-name}.md
303
- Register the agent in AGENTS.md
304
- Optionally update README.md and docs/COMMAND-AGENT-MAP.md
305
- ```
306
-
307
- ### Add New Command
308
-
309
- Adds a new command to the system, often paired with a backing skill.
310
-
311
- **Frequency**: ~1 times per month
312
-
313
- **Steps**:
314
- 1. Create a new markdown file under commands/{command-name}.md
315
- 2. Optionally add or update a backing skill under skills/{skill-name}/SKILL.md
316
-
317
- **Files typically involved**:
318
- - `commands/*.md`
319
- - `skills/*/SKILL.md`
320
-
321
- **Example commit sequence**:
322
- ```
323
- Create a new markdown file under commands/{command-name}.md
324
- Optionally add or update a backing skill under skills/{skill-name}/SKILL.md
325
- ```
326
-
327
- ### Sync Catalog Counts
328
-
329
- Synchronizes the documented counts of agents, skills, and commands in AGENTS.md and README.md with the actual repository state.
330
-
331
- **Frequency**: ~3 times per month
332
-
333
- **Steps**:
334
- 1. Update agent, skill, and command counts in AGENTS.md
335
- 2. Update the same counts in README.md (quick-start, comparison table, etc.)
336
- 3. Optionally update other documentation files
337
-
338
- **Files typically involved**:
339
- - `AGENTS.md`
340
- - `README.md`
341
-
342
- **Example commit sequence**:
343
- ```
344
- Update agent, skill, and command counts in AGENTS.md
345
- Update the same counts in README.md (quick-start, comparison table, etc.)
346
- Optionally update other documentation files
347
- ```
348
-
349
- ### Add Cross Harness Skill Copies
350
-
351
- Adds skill copies for different agent harnesses (e.g., Codex, Cursor, Antigravity) to ensure compatibility across platforms.
352
-
353
- **Frequency**: ~2 times per month
354
-
355
- **Steps**:
356
- 1. Copy or adapt SKILL.md to .agents/skills/{skill}/SKILL.md and/or .cursor/skills/{skill}/SKILL.md
357
- 2. Optionally add harness-specific openai.yaml or config files
358
- 3. Address review feedback to align with CONTRIBUTING template
359
-
360
- **Files typically involved**:
361
- - `.agents/skills/*/SKILL.md`
362
- - `.cursor/skills/*/SKILL.md`
363
- - `.agents/skills/*/agents/openai.yaml`
364
-
365
- **Example commit sequence**:
366
- ```
367
- Copy or adapt SKILL.md to .agents/skills/{skill}/SKILL.md and/or .cursor/skills/{skill}/SKILL.md
368
- Optionally add harness-specific openai.yaml or config files
369
- Address review feedback to align with CONTRIBUTING template
370
- ```
371
-
372
- ### Add Or Update Hook
373
-
374
- Adds or updates git or bash hooks to enforce workflow, quality, or security policies.
375
-
376
- **Frequency**: ~1 times per month
377
-
378
- **Steps**:
379
- 1. Add or update hook scripts in hooks/ or scripts/hooks/
380
- 2. Register the hook in hooks/hooks.json or similar config
381
- 3. Optionally add or update tests in tests/hooks/
382
-
383
- **Files typically involved**:
384
- - `hooks/*.hook`
385
- - `hooks/hooks.json`
386
- - `scripts/hooks/*.js`
387
- - `tests/hooks/*.test.js`
388
- - `.cursor/hooks.json`
389
-
390
- **Example commit sequence**:
391
- ```
392
- Add or update hook scripts in hooks/ or scripts/hooks/
393
- Register the hook in hooks/hooks.json or similar config
394
- Optionally add or update tests in tests/hooks/
395
- ```
396
-
397
- ### Address Review Feedback
398
-
399
- Addresses code review feedback by updating documentation, scripts, or configuration for clarity, correctness, or convention alignment.
400
-
401
- **Frequency**: ~4 times per month
402
-
403
- **Steps**:
404
- 1. Edit SKILL.md, agent, or command files to address reviewer comments
405
- 2. Update examples, headings, or configuration as requested
406
- 3. Iterate until all review feedback is resolved
407
-
408
- **Files typically involved**:
409
- - `skills/*/SKILL.md`
410
- - `agents/*.md`
411
- - `commands/*.md`
412
- - `.agents/skills/*/SKILL.md`
413
- - `.cursor/skills/*/SKILL.md`
414
-
415
- **Example commit sequence**:
416
- ```
417
- Edit SKILL.md, agent, or command files to address reviewer comments
418
- Update examples, headings, or configuration as requested
419
- Iterate until all review feedback is resolved
420
- ```
421
-
422
-
423
- ## Best Practices
424
-
425
- Based on analysis of the codebase, follow these practices:
426
-
427
- ### Do
428
-
429
- - Use conventional commit format (feat:, fix:, etc.)
430
- - Follow *.test.js naming pattern
431
- - Use camelCase for file names
432
- - Prefer mixed exports
433
-
434
- ### Don't
435
-
436
- - Don't write vague commit messages
437
- - Don't skip tests for new features
438
- - Don't deviate from established patterns without discussion
439
-
440
- ---
441
-
442
- *This skill was auto-generated by [ECC Tools](https://ecc.tools). Review and customize as needed for your team.*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/everything-claude-code/agents/openai.yaml DELETED
@@ -1,6 +0,0 @@
1
- interface:
2
- display_name: "Everything Claude Code"
3
- short_description: "Repo-specific patterns and workflows for everything-claude-code"
4
- default_prompt: "Use the everything-claude-code repo skill to follow existing architecture, testing, and workflow conventions."
5
- policy:
6
- allow_implicit_invocation: true
 
 
 
 
 
 
 
.cursor/.agents/skills/exa-search/SKILL.md DELETED
@@ -1,170 +0,0 @@
1
- ---
2
- name: exa-search
3
- description: Neural search via Exa MCP for web, code, and company research. Use when the user needs web search, code examples, company intel, people lookup, or AI-powered deep research with Exa's neural search engine.
4
- origin: ECC
5
- ---
6
-
7
- # Exa Search
8
-
9
- Neural search for web content, code, companies, and people via the Exa MCP server.
10
-
11
- ## When to Activate
12
-
13
- - User needs current web information or news
14
- - Searching for code examples, API docs, or technical references
15
- - Researching companies, competitors, or market players
16
- - Finding professional profiles or people in a domain
17
- - Running background research for any development task
18
- - User says "search for", "look up", "find", or "what's the latest on"
19
-
20
- ## MCP Requirement
21
-
22
- Exa MCP server must be configured. Add to `~/.claude.json`:
23
-
24
- ```json
25
- "exa-web-search": {
26
- "command": "npx",
27
- "args": ["-y", "exa-mcp-server"],
28
- "env": { "EXA_API_KEY": "YOUR_EXA_API_KEY_HERE" }
29
- }
30
- ```
31
-
32
- Get an API key at [exa.ai](https://exa.ai).
33
-
34
- ## Core Tools
35
-
36
- ### web_search_exa
37
- General web search for current information, news, or facts.
38
-
39
- ```
40
- web_search_exa(query: "latest AI developments 2026", numResults: 5)
41
- ```
42
-
43
- **Parameters:**
44
-
45
- | Param | Type | Default | Notes |
46
- |-------|------|---------|-------|
47
- | `query` | string | required | Search query |
48
- | `numResults` | number | 8 | Number of results |
49
-
50
- ### web_search_advanced_exa
51
- Filtered search with domain and date constraints.
52
-
53
- ```
54
- web_search_advanced_exa(
55
- query: "React Server Components best practices",
56
- numResults: 5,
57
- includeDomains: ["github.com", "react.dev"],
58
- startPublishedDate: "2025-01-01"
59
- )
60
- ```
61
-
62
- **Parameters:**
63
-
64
- | Param | Type | Default | Notes |
65
- |-------|------|---------|-------|
66
- | `query` | string | required | Search query |
67
- | `numResults` | number | 8 | Number of results |
68
- | `includeDomains` | string[] | none | Limit to specific domains |
69
- | `excludeDomains` | string[] | none | Exclude specific domains |
70
- | `startPublishedDate` | string | none | ISO date filter (start) |
71
- | `endPublishedDate` | string | none | ISO date filter (end) |
72
-
73
- ### get_code_context_exa
74
- Find code examples and documentation from GitHub, Stack Overflow, and docs sites.
75
-
76
- ```
77
- get_code_context_exa(query: "Python asyncio patterns", tokensNum: 3000)
78
- ```
79
-
80
- **Parameters:**
81
-
82
- | Param | Type | Default | Notes |
83
- |-------|------|---------|-------|
84
- | `query` | string | required | Code or API search query |
85
- | `tokensNum` | number | 5000 | Content tokens (1000-50000) |
86
-
87
- ### company_research_exa
88
- Research companies for business intelligence and news.
89
-
90
- ```
91
- company_research_exa(companyName: "Anthropic", numResults: 5)
92
- ```
93
-
94
- **Parameters:**
95
-
96
- | Param | Type | Default | Notes |
97
- |-------|------|---------|-------|
98
- | `companyName` | string | required | Company name |
99
- | `numResults` | number | 5 | Number of results |
100
-
101
- ### people_search_exa
102
- Find professional profiles and bios.
103
-
104
- ```
105
- people_search_exa(query: "AI safety researchers at Anthropic", numResults: 5)
106
- ```
107
-
108
- ### crawling_exa
109
- Extract full page content from a URL.
110
-
111
- ```
112
- crawling_exa(url: "https://example.com/article", tokensNum: 5000)
113
- ```
114
-
115
- **Parameters:**
116
-
117
- | Param | Type | Default | Notes |
118
- |-------|------|---------|-------|
119
- | `url` | string | required | URL to extract |
120
- | `tokensNum` | number | 5000 | Content tokens |
121
-
122
- ### deep_researcher_start / deep_researcher_check
123
- Start an AI research agent that runs asynchronously.
124
-
125
- ```
126
- # Start research
127
- deep_researcher_start(query: "comprehensive analysis of AI code editors in 2026")
128
-
129
- # Check status (returns results when complete)
130
- deep_researcher_check(researchId: "<id from start>")
131
- ```
132
-
133
- ## Usage Patterns
134
-
135
- ### Quick Lookup
136
- ```
137
- web_search_exa(query: "Node.js 22 new features", numResults: 3)
138
- ```
139
-
140
- ### Code Research
141
- ```
142
- get_code_context_exa(query: "Rust error handling patterns Result type", tokensNum: 3000)
143
- ```
144
-
145
- ### Company Due Diligence
146
- ```
147
- company_research_exa(companyName: "Vercel", numResults: 5)
148
- web_search_advanced_exa(query: "Vercel funding valuation 2026", numResults: 3)
149
- ```
150
-
151
- ### Technical Deep Dive
152
- ```
153
- # Start async research
154
- deep_researcher_start(query: "WebAssembly component model status and adoption")
155
- # ... do other work ...
156
- deep_researcher_check(researchId: "<id>")
157
- ```
158
-
159
- ## Tips
160
-
161
- - Use `web_search_exa` for broad queries, `web_search_advanced_exa` for filtered results
162
- - Lower `tokensNum` (1000-2000) for focused code snippets, higher (5000+) for comprehensive context
163
- - Combine `company_research_exa` with `web_search_advanced_exa` for thorough company analysis
164
- - Use `crawling_exa` to get full content from specific URLs found in search results
165
- - `deep_researcher_start` is best for comprehensive topics that benefit from AI synthesis
166
-
167
- ## Related Skills
168
-
169
- - `deep-research` — Full research workflow using firecrawl + exa together
170
- - `market-research` — Business-oriented research with decision frameworks
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/exa-search/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Exa Search"
3
- short_description: "Neural search via Exa MCP for web, code, and companies"
4
- brand_color: "#8B5CF6"
5
- default_prompt: "Search using Exa MCP tools for web content, code, or company research"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/fal-ai-media/SKILL.md DELETED
@@ -1,277 +0,0 @@
1
- ---
2
- name: fal-ai-media
3
- description: Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.
4
- origin: ECC
5
- ---
6
-
7
- # fal.ai Media Generation
8
-
9
- Generate images, videos, and audio using fal.ai models via MCP.
10
-
11
- ## When to Activate
12
-
13
- - User wants to generate images from text prompts
14
- - Creating videos from text or images
15
- - Generating speech, music, or sound effects
16
- - Any media generation task
17
- - User says "generate image", "create video", "text to speech", "make a thumbnail", or similar
18
-
19
- ## MCP Requirement
20
-
21
- fal.ai MCP server must be configured. Add to `~/.claude.json`:
22
-
23
- ```json
24
- "fal-ai": {
25
- "command": "npx",
26
- "args": ["-y", "fal-ai-mcp-server"],
27
- "env": { "FAL_KEY": "YOUR_FAL_KEY_HERE" }
28
- }
29
- ```
30
-
31
- Get an API key at [fal.ai](https://fal.ai).
32
-
33
- ## MCP Tools
34
-
35
- The fal.ai MCP provides these tools:
36
- - `search` — Find available models by keyword
37
- - `find` — Get model details and parameters
38
- - `generate` — Run a model with parameters
39
- - `result` — Check async generation status
40
- - `status` — Check job status
41
- - `cancel` — Cancel a running job
42
- - `estimate_cost` — Estimate generation cost
43
- - `models` — List popular models
44
- - `upload` — Upload files for use as inputs
45
-
46
- ---
47
-
48
- ## Image Generation
49
-
50
- ### Nano Banana 2 (Fast)
51
- Best for: quick iterations, drafts, text-to-image, image editing.
52
-
53
- ```
54
- generate(
55
- model_name: "fal-ai/nano-banana-2",
56
- input: {
57
- "prompt": "a futuristic cityscape at sunset, cyberpunk style",
58
- "image_size": "landscape_16_9",
59
- "num_images": 1,
60
- "seed": 42
61
- }
62
- )
63
- ```
64
-
65
- ### Nano Banana Pro (High Fidelity)
66
- Best for: production images, realism, typography, detailed prompts.
67
-
68
- ```
69
- generate(
70
- model_name: "fal-ai/nano-banana-pro",
71
- input: {
72
- "prompt": "professional product photo of wireless headphones on marble surface, studio lighting",
73
- "image_size": "square",
74
- "num_images": 1,
75
- "guidance_scale": 7.5
76
- }
77
- )
78
- ```
79
-
80
- ### Common Image Parameters
81
-
82
- | Param | Type | Options | Notes |
83
- |-------|------|---------|-------|
84
- | `prompt` | string | required | Describe what you want |
85
- | `image_size` | string | `square`, `portrait_4_3`, `landscape_16_9`, `portrait_16_9`, `landscape_4_3` | Aspect ratio |
86
- | `num_images` | number | 1-4 | How many to generate |
87
- | `seed` | number | any integer | Reproducibility |
88
- | `guidance_scale` | number | 1-20 | How closely to follow the prompt (higher = more literal) |
89
-
90
- ### Image Editing
91
- Use Nano Banana 2 with an input image for inpainting, outpainting, or style transfer:
92
-
93
- ```
94
- # First upload the source image
95
- upload(file_path: "/path/to/image.png")
96
-
97
- # Then generate with image input
98
- generate(
99
- model_name: "fal-ai/nano-banana-2",
100
- input: {
101
- "prompt": "same scene but in watercolor style",
102
- "image_url": "<uploaded_url>",
103
- "image_size": "landscape_16_9"
104
- }
105
- )
106
- ```
107
-
108
- ---
109
-
110
- ## Video Generation
111
-
112
- ### Seedance 1.0 Pro (ByteDance)
113
- Best for: text-to-video, image-to-video with high motion quality.
114
-
115
- ```
116
- generate(
117
- model_name: "fal-ai/seedance-1-0-pro",
118
- input: {
119
- "prompt": "a drone flyover of a mountain lake at golden hour, cinematic",
120
- "duration": "5s",
121
- "aspect_ratio": "16:9",
122
- "seed": 42
123
- }
124
- )
125
- ```
126
-
127
- ### Kling Video v3 Pro
128
- Best for: text/image-to-video with native audio generation.
129
-
130
- ```
131
- generate(
132
- model_name: "fal-ai/kling-video/v3/pro",
133
- input: {
134
- "prompt": "ocean waves crashing on a rocky coast, dramatic clouds",
135
- "duration": "5s",
136
- "aspect_ratio": "16:9"
137
- }
138
- )
139
- ```
140
-
141
- ### Veo 3 (Google DeepMind)
142
- Best for: video with generated sound, high visual quality.
143
-
144
- ```
145
- generate(
146
- model_name: "fal-ai/veo-3",
147
- input: {
148
- "prompt": "a bustling Tokyo street market at night, neon signs, crowd noise",
149
- "aspect_ratio": "16:9"
150
- }
151
- )
152
- ```
153
-
154
- ### Image-to-Video
155
- Start from an existing image:
156
-
157
- ```
158
- generate(
159
- model_name: "fal-ai/seedance-1-0-pro",
160
- input: {
161
- "prompt": "camera slowly zooms out, gentle wind moves the trees",
162
- "image_url": "<uploaded_image_url>",
163
- "duration": "5s"
164
- }
165
- )
166
- ```
167
-
168
- ### Video Parameters
169
-
170
- | Param | Type | Options | Notes |
171
- |-------|------|---------|-------|
172
- | `prompt` | string | required | Describe the video |
173
- | `duration` | string | `"5s"`, `"10s"` | Video length |
174
- | `aspect_ratio` | string | `"16:9"`, `"9:16"`, `"1:1"` | Frame ratio |
175
- | `seed` | number | any integer | Reproducibility |
176
- | `image_url` | string | URL | Source image for image-to-video |
177
-
178
- ---
179
-
180
- ## Audio Generation
181
-
182
- ### CSM-1B (Conversational Speech)
183
- Text-to-speech with natural, conversational quality.
184
-
185
- ```
186
- generate(
187
- model_name: "fal-ai/csm-1b",
188
- input: {
189
- "text": "Hello, welcome to the demo. Let me show you how this works.",
190
- "speaker_id": 0
191
- }
192
- )
193
- ```
194
-
195
- ### ThinkSound (Video-to-Audio)
196
- Generate matching audio from video content.
197
-
198
- ```
199
- generate(
200
- model_name: "fal-ai/thinksound",
201
- input: {
202
- "video_url": "<video_url>",
203
- "prompt": "ambient forest sounds with birds chirping"
204
- }
205
- )
206
- ```
207
-
208
- ### ElevenLabs (via API, no MCP)
209
- For professional voice synthesis, use ElevenLabs directly:
210
-
211
- ```python
212
- import os
213
- import requests
214
-
215
- resp = requests.post(
216
- "https://api.elevenlabs.io/v1/text-to-speech/<voice_id>",
217
- headers={
218
- "xi-api-key": os.environ["ELEVENLABS_API_KEY"],
219
- "Content-Type": "application/json"
220
- },
221
- json={
222
- "text": "Your text here",
223
- "model_id": "eleven_turbo_v2_5",
224
- "voice_settings": {"stability": 0.5, "similarity_boost": 0.75}
225
- }
226
- )
227
- with open("output.mp3", "wb") as f:
228
- f.write(resp.content)
229
- ```
230
-
231
- ### VideoDB Generative Audio
232
- If VideoDB is configured, use its generative audio:
233
-
234
- ```python
235
- # Voice generation
236
- audio = coll.generate_voice(text="Your narration here", voice="alloy")
237
-
238
- # Music generation
239
- music = coll.generate_music(prompt="upbeat electronic background music", duration=30)
240
-
241
- # Sound effects
242
- sfx = coll.generate_sound_effect(prompt="thunder crack followed by rain")
243
- ```
244
-
245
- ---
246
-
247
- ## Cost Estimation
248
-
249
- Before generating, check estimated cost:
250
-
251
- ```
252
- estimate_cost(model_name: "fal-ai/nano-banana-pro", input: {...})
253
- ```
254
-
255
- ## Model Discovery
256
-
257
- Find models for specific tasks:
258
-
259
- ```
260
- search(query: "text to video")
261
- find(model_name: "fal-ai/seedance-1-0-pro")
262
- models()
263
- ```
264
-
265
- ## Tips
266
-
267
- - Use `seed` for reproducible results when iterating on prompts
268
- - Start with lower-cost models (Nano Banana 2) for prompt iteration, then switch to Pro for finals
269
- - For video, keep prompts descriptive but concise — focus on motion and scene
270
- - Image-to-video produces more controlled results than pure text-to-video
271
- - Check `estimate_cost` before running expensive video generations
272
-
273
- ## Related Skills
274
-
275
- - `videodb` — Video processing, editing, and streaming
276
- - `video-editing` — AI-powered video editing workflows
277
- - `content-engine` — Content creation for social platforms
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/fal-ai-media/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "fal.ai Media"
3
- short_description: "AI image, video, and audio generation via fal.ai"
4
- brand_color: "#F43F5E"
5
- default_prompt: "Generate images, videos, or audio using fal.ai models"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/frontend-patterns/SKILL.md DELETED
@@ -1,642 +0,0 @@
1
- ---
2
- name: frontend-patterns
3
- description: Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.
4
- origin: ECC
5
- ---
6
-
7
- # Frontend Development Patterns
8
-
9
- Modern frontend patterns for React, Next.js, and performant user interfaces.
10
-
11
- ## When to Activate
12
-
13
- - Building React components (composition, props, rendering)
14
- - Managing state (useState, useReducer, Zustand, Context)
15
- - Implementing data fetching (SWR, React Query, server components)
16
- - Optimizing performance (memoization, virtualization, code splitting)
17
- - Working with forms (validation, controlled inputs, Zod schemas)
18
- - Handling client-side routing and navigation
19
- - Building accessible, responsive UI patterns
20
-
21
- ## Component Patterns
22
-
23
- ### Composition Over Inheritance
24
-
25
- ```typescript
26
- // PASS: GOOD: Component composition
27
- interface CardProps {
28
- children: React.ReactNode
29
- variant?: 'default' | 'outlined'
30
- }
31
-
32
- export function Card({ children, variant = 'default' }: CardProps) {
33
- return <div className={`card card-${variant}`}>{children}</div>
34
- }
35
-
36
- export function CardHeader({ children }: { children: React.ReactNode }) {
37
- return <div className="card-header">{children}</div>
38
- }
39
-
40
- export function CardBody({ children }: { children: React.ReactNode }) {
41
- return <div className="card-body">{children}</div>
42
- }
43
-
44
- // Usage
45
- <Card>
46
- <CardHeader>Title</CardHeader>
47
- <CardBody>Content</CardBody>
48
- </Card>
49
- ```
50
-
51
- ### Compound Components
52
-
53
- ```typescript
54
- interface TabsContextValue {
55
- activeTab: string
56
- setActiveTab: (tab: string) => void
57
- }
58
-
59
- const TabsContext = createContext<TabsContextValue | undefined>(undefined)
60
-
61
- export function Tabs({ children, defaultTab }: {
62
- children: React.ReactNode
63
- defaultTab: string
64
- }) {
65
- const [activeTab, setActiveTab] = useState(defaultTab)
66
-
67
- return (
68
- <TabsContext.Provider value={{ activeTab, setActiveTab }}>
69
- {children}
70
- </TabsContext.Provider>
71
- )
72
- }
73
-
74
- export function TabList({ children }: { children: React.ReactNode }) {
75
- return <div className="tab-list">{children}</div>
76
- }
77
-
78
- export function Tab({ id, children }: { id: string, children: React.ReactNode }) {
79
- const context = useContext(TabsContext)
80
- if (!context) throw new Error('Tab must be used within Tabs')
81
-
82
- return (
83
- <button
84
- className={context.activeTab === id ? 'active' : ''}
85
- onClick={() => context.setActiveTab(id)}
86
- >
87
- {children}
88
- </button>
89
- )
90
- }
91
-
92
- // Usage
93
- <Tabs defaultTab="overview">
94
- <TabList>
95
- <Tab id="overview">Overview</Tab>
96
- <Tab id="details">Details</Tab>
97
- </TabList>
98
- </Tabs>
99
- ```
100
-
101
- ### Render Props Pattern
102
-
103
- ```typescript
104
- interface DataLoaderProps<T> {
105
- url: string
106
- children: (data: T | null, loading: boolean, error: Error | null) => React.ReactNode
107
- }
108
-
109
- export function DataLoader<T>({ url, children }: DataLoaderProps<T>) {
110
- const [data, setData] = useState<T | null>(null)
111
- const [loading, setLoading] = useState(true)
112
- const [error, setError] = useState<Error | null>(null)
113
-
114
- useEffect(() => {
115
- fetch(url)
116
- .then(res => res.json())
117
- .then(setData)
118
- .catch(setError)
119
- .finally(() => setLoading(false))
120
- }, [url])
121
-
122
- return <>{children(data, loading, error)}</>
123
- }
124
-
125
- // Usage
126
- <DataLoader<Market[]> url="/api/markets">
127
- {(markets, loading, error) => {
128
- if (loading) return <Spinner />
129
- if (error) return <Error error={error} />
130
- return <MarketList markets={markets!} />
131
- }}
132
- </DataLoader>
133
- ```
134
-
135
- ## Custom Hooks Patterns
136
-
137
- ### State Management Hook
138
-
139
- ```typescript
140
- export function useToggle(initialValue = false): [boolean, () => void] {
141
- const [value, setValue] = useState(initialValue)
142
-
143
- const toggle = useCallback(() => {
144
- setValue(v => !v)
145
- }, [])
146
-
147
- return [value, toggle]
148
- }
149
-
150
- // Usage
151
- const [isOpen, toggleOpen] = useToggle()
152
- ```
153
-
154
- ### Async Data Fetching Hook
155
-
156
- ```typescript
157
- interface UseQueryOptions<T> {
158
- onSuccess?: (data: T) => void
159
- onError?: (error: Error) => void
160
- enabled?: boolean
161
- }
162
-
163
- export function useQuery<T>(
164
- key: string,
165
- fetcher: () => Promise<T>,
166
- options?: UseQueryOptions<T>
167
- ) {
168
- const [data, setData] = useState<T | null>(null)
169
- const [error, setError] = useState<Error | null>(null)
170
- const [loading, setLoading] = useState(false)
171
-
172
- const refetch = useCallback(async () => {
173
- setLoading(true)
174
- setError(null)
175
-
176
- try {
177
- const result = await fetcher()
178
- setData(result)
179
- options?.onSuccess?.(result)
180
- } catch (err) {
181
- const error = err as Error
182
- setError(error)
183
- options?.onError?.(error)
184
- } finally {
185
- setLoading(false)
186
- }
187
- }, [fetcher, options])
188
-
189
- useEffect(() => {
190
- if (options?.enabled !== false) {
191
- refetch()
192
- }
193
- }, [key, refetch, options?.enabled])
194
-
195
- return { data, error, loading, refetch }
196
- }
197
-
198
- // Usage
199
- const { data: markets, loading, error, refetch } = useQuery(
200
- 'markets',
201
- () => fetch('/api/markets').then(r => r.json()),
202
- {
203
- onSuccess: data => console.log('Fetched', data.length, 'markets'),
204
- onError: err => console.error('Failed:', err)
205
- }
206
- )
207
- ```
208
-
209
- ### Debounce Hook
210
-
211
- ```typescript
212
- export function useDebounce<T>(value: T, delay: number): T {
213
- const [debouncedValue, setDebouncedValue] = useState<T>(value)
214
-
215
- useEffect(() => {
216
- const handler = setTimeout(() => {
217
- setDebouncedValue(value)
218
- }, delay)
219
-
220
- return () => clearTimeout(handler)
221
- }, [value, delay])
222
-
223
- return debouncedValue
224
- }
225
-
226
- // Usage
227
- const [searchQuery, setSearchQuery] = useState('')
228
- const debouncedQuery = useDebounce(searchQuery, 500)
229
-
230
- useEffect(() => {
231
- if (debouncedQuery) {
232
- performSearch(debouncedQuery)
233
- }
234
- }, [debouncedQuery])
235
- ```
236
-
237
- ## State Management Patterns
238
-
239
- ### Context + Reducer Pattern
240
-
241
- ```typescript
242
- interface State {
243
- markets: Market[]
244
- selectedMarket: Market | null
245
- loading: boolean
246
- }
247
-
248
- type Action =
249
- | { type: 'SET_MARKETS'; payload: Market[] }
250
- | { type: 'SELECT_MARKET'; payload: Market }
251
- | { type: 'SET_LOADING'; payload: boolean }
252
-
253
- function reducer(state: State, action: Action): State {
254
- switch (action.type) {
255
- case 'SET_MARKETS':
256
- return { ...state, markets: action.payload }
257
- case 'SELECT_MARKET':
258
- return { ...state, selectedMarket: action.payload }
259
- case 'SET_LOADING':
260
- return { ...state, loading: action.payload }
261
- default:
262
- return state
263
- }
264
- }
265
-
266
- const MarketContext = createContext<{
267
- state: State
268
- dispatch: Dispatch<Action>
269
- } | undefined>(undefined)
270
-
271
- export function MarketProvider({ children }: { children: React.ReactNode }) {
272
- const [state, dispatch] = useReducer(reducer, {
273
- markets: [],
274
- selectedMarket: null,
275
- loading: false
276
- })
277
-
278
- return (
279
- <MarketContext.Provider value={{ state, dispatch }}>
280
- {children}
281
- </MarketContext.Provider>
282
- )
283
- }
284
-
285
- export function useMarkets() {
286
- const context = useContext(MarketContext)
287
- if (!context) throw new Error('useMarkets must be used within MarketProvider')
288
- return context
289
- }
290
- ```
291
-
292
- ## Performance Optimization
293
-
294
- ### Memoization
295
-
296
- ```typescript
297
- // PASS: useMemo for expensive computations
298
- const sortedMarkets = useMemo(() => {
299
- return markets.sort((a, b) => b.volume - a.volume)
300
- }, [markets])
301
-
302
- // PASS: useCallback for functions passed to children
303
- const handleSearch = useCallback((query: string) => {
304
- setSearchQuery(query)
305
- }, [])
306
-
307
- // PASS: React.memo for pure components
308
- export const MarketCard = React.memo<MarketCardProps>(({ market }) => {
309
- return (
310
- <div className="market-card">
311
- <h3>{market.name}</h3>
312
- <p>{market.description}</p>
313
- </div>
314
- )
315
- })
316
- ```
317
-
318
- ### Code Splitting & Lazy Loading
319
-
320
- ```typescript
321
- import { lazy, Suspense } from 'react'
322
-
323
- // PASS: Lazy load heavy components
324
- const HeavyChart = lazy(() => import('./HeavyChart'))
325
- const ThreeJsBackground = lazy(() => import('./ThreeJsBackground'))
326
-
327
- export function Dashboard() {
328
- return (
329
- <div>
330
- <Suspense fallback={<ChartSkeleton />}>
331
- <HeavyChart data={data} />
332
- </Suspense>
333
-
334
- <Suspense fallback={null}>
335
- <ThreeJsBackground />
336
- </Suspense>
337
- </div>
338
- )
339
- }
340
- ```
341
-
342
- ### Virtualization for Long Lists
343
-
344
- ```typescript
345
- import { useVirtualizer } from '@tanstack/react-virtual'
346
-
347
- export function VirtualMarketList({ markets }: { markets: Market[] }) {
348
- const parentRef = useRef<HTMLDivElement>(null)
349
-
350
- const virtualizer = useVirtualizer({
351
- count: markets.length,
352
- getScrollElement: () => parentRef.current,
353
- estimateSize: () => 100, // Estimated row height
354
- overscan: 5 // Extra items to render
355
- })
356
-
357
- return (
358
- <div ref={parentRef} style={{ height: '600px', overflow: 'auto' }}>
359
- <div
360
- style={{
361
- height: `${virtualizer.getTotalSize()}px`,
362
- position: 'relative'
363
- }}
364
- >
365
- {virtualizer.getVirtualItems().map(virtualRow => (
366
- <div
367
- key={virtualRow.index}
368
- style={{
369
- position: 'absolute',
370
- top: 0,
371
- left: 0,
372
- width: '100%',
373
- height: `${virtualRow.size}px`,
374
- transform: `translateY(${virtualRow.start}px)`
375
- }}
376
- >
377
- <MarketCard market={markets[virtualRow.index]} />
378
- </div>
379
- ))}
380
- </div>
381
- </div>
382
- )
383
- }
384
- ```
385
-
386
- ## Form Handling Patterns
387
-
388
- ### Controlled Form with Validation
389
-
390
- ```typescript
391
- interface FormData {
392
- name: string
393
- description: string
394
- endDate: string
395
- }
396
-
397
- interface FormErrors {
398
- name?: string
399
- description?: string
400
- endDate?: string
401
- }
402
-
403
- export function CreateMarketForm() {
404
- const [formData, setFormData] = useState<FormData>({
405
- name: '',
406
- description: '',
407
- endDate: ''
408
- })
409
-
410
- const [errors, setErrors] = useState<FormErrors>({})
411
-
412
- const validate = (): boolean => {
413
- const newErrors: FormErrors = {}
414
-
415
- if (!formData.name.trim()) {
416
- newErrors.name = 'Name is required'
417
- } else if (formData.name.length > 200) {
418
- newErrors.name = 'Name must be under 200 characters'
419
- }
420
-
421
- if (!formData.description.trim()) {
422
- newErrors.description = 'Description is required'
423
- }
424
-
425
- if (!formData.endDate) {
426
- newErrors.endDate = 'End date is required'
427
- }
428
-
429
- setErrors(newErrors)
430
- return Object.keys(newErrors).length === 0
431
- }
432
-
433
- const handleSubmit = async (e: React.FormEvent) => {
434
- e.preventDefault()
435
-
436
- if (!validate()) return
437
-
438
- try {
439
- await createMarket(formData)
440
- // Success handling
441
- } catch (error) {
442
- // Error handling
443
- }
444
- }
445
-
446
- return (
447
- <form onSubmit={handleSubmit}>
448
- <input
449
- value={formData.name}
450
- onChange={e => setFormData(prev => ({ ...prev, name: e.target.value }))}
451
- placeholder="Market name"
452
- />
453
- {errors.name && <span className="error">{errors.name}</span>}
454
-
455
- {/* Other fields */}
456
-
457
- <button type="submit">Create Market</button>
458
- </form>
459
- )
460
- }
461
- ```
462
-
463
- ## Error Boundary Pattern
464
-
465
- ```typescript
466
- interface ErrorBoundaryState {
467
- hasError: boolean
468
- error: Error | null
469
- }
470
-
471
- export class ErrorBoundary extends React.Component<
472
- { children: React.ReactNode },
473
- ErrorBoundaryState
474
- > {
475
- state: ErrorBoundaryState = {
476
- hasError: false,
477
- error: null
478
- }
479
-
480
- static getDerivedStateFromError(error: Error): ErrorBoundaryState {
481
- return { hasError: true, error }
482
- }
483
-
484
- componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
485
- console.error('Error boundary caught:', error, errorInfo)
486
- }
487
-
488
- render() {
489
- if (this.state.hasError) {
490
- return (
491
- <div className="error-fallback">
492
- <h2>Something went wrong</h2>
493
- <p>{this.state.error?.message}</p>
494
- <button onClick={() => this.setState({ hasError: false })}>
495
- Try again
496
- </button>
497
- </div>
498
- )
499
- }
500
-
501
- return this.props.children
502
- }
503
- }
504
-
505
- // Usage
506
- <ErrorBoundary>
507
- <App />
508
- </ErrorBoundary>
509
- ```
510
-
511
- ## Animation Patterns
512
-
513
- ### Framer Motion Animations
514
-
515
- ```typescript
516
- import { motion, AnimatePresence } from 'framer-motion'
517
-
518
- // PASS: List animations
519
- export function AnimatedMarketList({ markets }: { markets: Market[] }) {
520
- return (
521
- <AnimatePresence>
522
- {markets.map(market => (
523
- <motion.div
524
- key={market.id}
525
- initial={{ opacity: 0, y: 20 }}
526
- animate={{ opacity: 1, y: 0 }}
527
- exit={{ opacity: 0, y: -20 }}
528
- transition={{ duration: 0.3 }}
529
- >
530
- <MarketCard market={market} />
531
- </motion.div>
532
- ))}
533
- </AnimatePresence>
534
- )
535
- }
536
-
537
- // PASS: Modal animations
538
- export function Modal({ isOpen, onClose, children }: ModalProps) {
539
- return (
540
- <AnimatePresence>
541
- {isOpen && (
542
- <>
543
- <motion.div
544
- className="modal-overlay"
545
- initial={{ opacity: 0 }}
546
- animate={{ opacity: 1 }}
547
- exit={{ opacity: 0 }}
548
- onClick={onClose}
549
- />
550
- <motion.div
551
- className="modal-content"
552
- initial={{ opacity: 0, scale: 0.9, y: 20 }}
553
- animate={{ opacity: 1, scale: 1, y: 0 }}
554
- exit={{ opacity: 0, scale: 0.9, y: 20 }}
555
- >
556
- {children}
557
- </motion.div>
558
- </>
559
- )}
560
- </AnimatePresence>
561
- )
562
- }
563
- ```
564
-
565
- ## Accessibility Patterns
566
-
567
- ### Keyboard Navigation
568
-
569
- ```typescript
570
- export function Dropdown({ options, onSelect }: DropdownProps) {
571
- const [isOpen, setIsOpen] = useState(false)
572
- const [activeIndex, setActiveIndex] = useState(0)
573
-
574
- const handleKeyDown = (e: React.KeyboardEvent) => {
575
- switch (e.key) {
576
- case 'ArrowDown':
577
- e.preventDefault()
578
- setActiveIndex(i => Math.min(i + 1, options.length - 1))
579
- break
580
- case 'ArrowUp':
581
- e.preventDefault()
582
- setActiveIndex(i => Math.max(i - 1, 0))
583
- break
584
- case 'Enter':
585
- e.preventDefault()
586
- onSelect(options[activeIndex])
587
- setIsOpen(false)
588
- break
589
- case 'Escape':
590
- setIsOpen(false)
591
- break
592
- }
593
- }
594
-
595
- return (
596
- <div
597
- role="combobox"
598
- aria-expanded={isOpen}
599
- aria-haspopup="listbox"
600
- onKeyDown={handleKeyDown}
601
- >
602
- {/* Dropdown implementation */}
603
- </div>
604
- )
605
- }
606
- ```
607
-
608
- ### Focus Management
609
-
610
- ```typescript
611
- export function Modal({ isOpen, onClose, children }: ModalProps) {
612
- const modalRef = useRef<HTMLDivElement>(null)
613
- const previousFocusRef = useRef<HTMLElement | null>(null)
614
-
615
- useEffect(() => {
616
- if (isOpen) {
617
- // Save currently focused element
618
- previousFocusRef.current = document.activeElement as HTMLElement
619
-
620
- // Focus modal
621
- modalRef.current?.focus()
622
- } else {
623
- // Restore focus when closing
624
- previousFocusRef.current?.focus()
625
- }
626
- }, [isOpen])
627
-
628
- return isOpen ? (
629
- <div
630
- ref={modalRef}
631
- role="dialog"
632
- aria-modal="true"
633
- tabIndex={-1}
634
- onKeyDown={e => e.key === 'Escape' && onClose()}
635
- >
636
- {children}
637
- </div>
638
- ) : null
639
- }
640
- ```
641
-
642
- **Remember**: Modern frontend patterns enable maintainable, performant user interfaces. Choose patterns that fit your project complexity.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/frontend-patterns/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Frontend Patterns"
3
- short_description: "React and Next.js patterns and best practices"
4
- brand_color: "#8B5CF6"
5
- default_prompt: "Apply React/Next.js patterns and best practices"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/frontend-slides/SKILL.md DELETED
@@ -1,184 +0,0 @@
1
- ---
2
- name: frontend-slides
3
- description: Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.
4
- origin: ECC
5
- ---
6
-
7
- # Frontend Slides
8
-
9
- Create zero-dependency, animation-rich HTML presentations that run entirely in the browser.
10
-
11
- Inspired by the visual exploration approach showcased in work by [zarazhangrui](https://github.com/zarazhangrui).
12
-
13
- ## When to Activate
14
-
15
- - Creating a talk deck, pitch deck, workshop deck, or internal presentation
16
- - Converting `.ppt` or `.pptx` slides into an HTML presentation
17
- - Improving an existing HTML presentation's layout, motion, or typography
18
- - Exploring presentation styles with a user who does not know their design preference yet
19
-
20
- ## Non-Negotiables
21
-
22
- 1. **Zero dependencies**: default to one self-contained HTML file with inline CSS and JS.
23
- 2. **Viewport fit is mandatory**: every slide must fit inside one viewport with no internal scrolling.
24
- 3. **Show, don't tell**: use visual previews instead of abstract style questionnaires.
25
- 4. **Distinctive design**: avoid generic purple-gradient, Inter-on-white, template-looking decks.
26
- 5. **Production quality**: keep code commented, accessible, responsive, and performant.
27
-
28
- Before generating, read `STYLE_PRESETS.md` for the viewport-safe CSS base, density limits, preset catalog, and CSS gotchas.
29
-
30
- ## Workflow
31
-
32
- ### 1. Detect Mode
33
-
34
- Choose one path:
35
- - **New presentation**: user has a topic, notes, or full draft
36
- - **PPT conversion**: user has `.ppt` or `.pptx`
37
- - **Enhancement**: user already has HTML slides and wants improvements
38
-
39
- ### 2. Discover Content
40
-
41
- Ask only the minimum needed:
42
- - purpose: pitch, teaching, conference talk, internal update
43
- - length: short (5-10), medium (10-20), long (20+)
44
- - content state: finished copy, rough notes, topic only
45
-
46
- If the user has content, ask them to paste it before styling.
47
-
48
- ### 3. Discover Style
49
-
50
- Default to visual exploration.
51
-
52
- If the user already knows the desired preset, skip previews and use it directly.
53
-
54
- Otherwise:
55
- 1. Ask what feeling the deck should create: impressed, energized, focused, inspired.
56
- 2. Generate **3 single-slide preview files** in `.ecc-design/slide-previews/`.
57
- 3. Each preview must be self-contained, show typography/color/motion clearly, and stay under roughly 100 lines of slide content.
58
- 4. Ask the user which preview to keep or what elements to mix.
59
-
60
- Use the preset guide in `STYLE_PRESETS.md` when mapping mood to style.
61
-
62
- ### 4. Build the Presentation
63
-
64
- Output either:
65
- - `presentation.html`
66
- - `[presentation-name].html`
67
-
68
- Use an `assets/` folder only when the deck contains extracted or user-supplied images.
69
-
70
- Required structure:
71
- - semantic slide sections
72
- - a viewport-safe CSS base from `STYLE_PRESETS.md`
73
- - CSS custom properties for theme values
74
- - a presentation controller class for keyboard, wheel, and touch navigation
75
- - Intersection Observer for reveal animations
76
- - reduced-motion support
77
-
78
- ### 5. Enforce Viewport Fit
79
-
80
- Treat this as a hard gate.
81
-
82
- Rules:
83
- - every `.slide` must use `height: 100vh; height: 100dvh; overflow: hidden;`
84
- - all type and spacing must scale with `clamp()`
85
- - when content does not fit, split into multiple slides
86
- - never solve overflow by shrinking text below readable sizes
87
- - never allow scrollbars inside a slide
88
-
89
- Use the density limits and mandatory CSS block in `STYLE_PRESETS.md`.
90
-
91
- ### 6. Validate
92
-
93
- Check the finished deck at these sizes:
94
- - 1920x1080
95
- - 1280x720
96
- - 768x1024
97
- - 375x667
98
- - 667x375
99
-
100
- If browser automation is available, use it to verify no slide overflows and that keyboard navigation works.
101
-
102
- ### 7. Deliver
103
-
104
- At handoff:
105
- - delete temporary preview files unless the user wants to keep them
106
- - open the deck with the platform-appropriate opener when useful
107
- - summarize file path, preset used, slide count, and easy theme customization points
108
-
109
- Use the correct opener for the current OS:
110
- - macOS: `open file.html`
111
- - Linux: `xdg-open file.html`
112
- - Windows: `start "" file.html`
113
-
114
- ## PPT / PPTX Conversion
115
-
116
- For PowerPoint conversion:
117
- 1. Prefer `python3` with `python-pptx` to extract text, images, and notes.
118
- 2. If `python-pptx` is unavailable, ask whether to install it or fall back to a manual/export-based workflow.
119
- 3. Preserve slide order, speaker notes, and extracted assets.
120
- 4. After extraction, run the same style-selection workflow as a new presentation.
121
-
122
- Keep conversion cross-platform. Do not rely on macOS-only tools when Python can do the job.
123
-
124
- ## Implementation Requirements
125
-
126
- ### HTML / CSS
127
-
128
- - Use inline CSS and JS unless the user explicitly wants a multi-file project.
129
- - Fonts may come from Google Fonts or Fontshare.
130
- - Prefer atmospheric backgrounds, strong type hierarchy, and a clear visual direction.
131
- - Use abstract shapes, gradients, grids, noise, and geometry rather than illustrations.
132
-
133
- ### JavaScript
134
-
135
- Include:
136
- - keyboard navigation
137
- - touch / swipe navigation
138
- - mouse wheel navigation
139
- - progress indicator or slide index
140
- - reveal-on-enter animation triggers
141
-
142
- ### Accessibility
143
-
144
- - use semantic structure (`main`, `section`, `nav`)
145
- - keep contrast readable
146
- - support keyboard-only navigation
147
- - respect `prefers-reduced-motion`
148
-
149
- ## Content Density Limits
150
-
151
- Use these maxima unless the user explicitly asks for denser slides and readability still holds:
152
-
153
- | Slide type | Limit |
154
- |------------|-------|
155
- | Title | 1 heading + 1 subtitle + optional tagline |
156
- | Content | 1 heading + 4-6 bullets or 2 short paragraphs |
157
- | Feature grid | 6 cards max |
158
- | Code | 8-10 lines max |
159
- | Quote | 1 quote + attribution |
160
- | Image | 1 image constrained by viewport |
161
-
162
- ## Anti-Patterns
163
-
164
- - generic startup gradients with no visual identity
165
- - system-font decks unless intentionally editorial
166
- - long bullet walls
167
- - code blocks that need scrolling
168
- - fixed-height content boxes that break on short screens
169
- - invalid negated CSS functions like `-clamp(...)`
170
-
171
- ## Related ECC Skills
172
-
173
- - `frontend-patterns` for component and interaction patterns around the deck
174
- - `liquid-glass-design` when a presentation intentionally borrows Apple glass aesthetics
175
- - `e2e-testing` if you need automated browser verification for the final deck
176
-
177
- ## Deliverable Checklist
178
-
179
- - presentation runs from a local file in a browser
180
- - every slide fits the viewport without scrolling
181
- - style is distinctive and intentional
182
- - animation is meaningful, not noisy
183
- - reduced motion is respected
184
- - file paths and customization points are explained at handoff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/frontend-slides/STYLE_PRESETS.md DELETED
@@ -1,330 +0,0 @@
1
- # Style Presets Reference
2
-
3
- Curated visual styles for `frontend-slides`.
4
-
5
- Use this file for:
6
- - the mandatory viewport-fitting CSS base
7
- - preset selection and mood mapping
8
- - CSS gotchas and validation rules
9
-
10
- Abstract shapes only. Avoid illustrations unless the user explicitly asks for them.
11
-
12
- ## Viewport Fit Is Non-Negotiable
13
-
14
- Every slide must fully fit in one viewport.
15
-
16
- ### Golden Rule
17
-
18
- ```text
19
- Each slide = exactly one viewport height.
20
- Too much content = split into more slides.
21
- Never scroll inside a slide.
22
- ```
23
-
24
- ### Density Limits
25
-
26
- | Slide Type | Maximum Content |
27
- |------------|-----------------|
28
- | Title slide | 1 heading + 1 subtitle + optional tagline |
29
- | Content slide | 1 heading + 4-6 bullets or 2 paragraphs |
30
- | Feature grid | 6 cards maximum |
31
- | Code slide | 8-10 lines maximum |
32
- | Quote slide | 1 quote + attribution |
33
- | Image slide | 1 image, ideally under 60vh |
34
-
35
- ## Mandatory Base CSS
36
-
37
- Copy this block into every generated presentation and then theme on top of it.
38
-
39
- ```css
40
- /* ===========================================
41
- VIEWPORT FITTING: MANDATORY BASE STYLES
42
- =========================================== */
43
-
44
- html, body {
45
- height: 100%;
46
- overflow-x: hidden;
47
- }
48
-
49
- html {
50
- scroll-snap-type: y mandatory;
51
- scroll-behavior: smooth;
52
- }
53
-
54
- .slide {
55
- width: 100vw;
56
- height: 100vh;
57
- height: 100dvh;
58
- overflow: hidden;
59
- scroll-snap-align: start;
60
- display: flex;
61
- flex-direction: column;
62
- position: relative;
63
- }
64
-
65
- .slide-content {
66
- flex: 1;
67
- display: flex;
68
- flex-direction: column;
69
- justify-content: center;
70
- max-height: 100%;
71
- overflow: hidden;
72
- padding: var(--slide-padding);
73
- }
74
-
75
- :root {
76
- --title-size: clamp(1.5rem, 5vw, 4rem);
77
- --h2-size: clamp(1.25rem, 3.5vw, 2.5rem);
78
- --h3-size: clamp(1rem, 2.5vw, 1.75rem);
79
- --body-size: clamp(0.75rem, 1.5vw, 1.125rem);
80
- --small-size: clamp(0.65rem, 1vw, 0.875rem);
81
-
82
- --slide-padding: clamp(1rem, 4vw, 4rem);
83
- --content-gap: clamp(0.5rem, 2vw, 2rem);
84
- --element-gap: clamp(0.25rem, 1vw, 1rem);
85
- }
86
-
87
- .card, .container, .content-box {
88
- max-width: min(90vw, 1000px);
89
- max-height: min(80vh, 700px);
90
- }
91
-
92
- .feature-list, .bullet-list {
93
- gap: clamp(0.4rem, 1vh, 1rem);
94
- }
95
-
96
- .feature-list li, .bullet-list li {
97
- font-size: var(--body-size);
98
- line-height: 1.4;
99
- }
100
-
101
- .grid {
102
- display: grid;
103
- grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
104
- gap: clamp(0.5rem, 1.5vw, 1rem);
105
- }
106
-
107
- img, .image-container {
108
- max-width: 100%;
109
- max-height: min(50vh, 400px);
110
- object-fit: contain;
111
- }
112
-
113
- @media (max-height: 700px) {
114
- :root {
115
- --slide-padding: clamp(0.75rem, 3vw, 2rem);
116
- --content-gap: clamp(0.4rem, 1.5vw, 1rem);
117
- --title-size: clamp(1.25rem, 4.5vw, 2.5rem);
118
- --h2-size: clamp(1rem, 3vw, 1.75rem);
119
- }
120
- }
121
-
122
- @media (max-height: 600px) {
123
- :root {
124
- --slide-padding: clamp(0.5rem, 2.5vw, 1.5rem);
125
- --content-gap: clamp(0.3rem, 1vw, 0.75rem);
126
- --title-size: clamp(1.1rem, 4vw, 2rem);
127
- --body-size: clamp(0.7rem, 1.2vw, 0.95rem);
128
- }
129
-
130
- .nav-dots, .keyboard-hint, .decorative {
131
- display: none;
132
- }
133
- }
134
-
135
- @media (max-height: 500px) {
136
- :root {
137
- --slide-padding: clamp(0.4rem, 2vw, 1rem);
138
- --title-size: clamp(1rem, 3.5vw, 1.5rem);
139
- --h2-size: clamp(0.9rem, 2.5vw, 1.25rem);
140
- --body-size: clamp(0.65rem, 1vw, 0.85rem);
141
- }
142
- }
143
-
144
- @media (max-width: 600px) {
145
- :root {
146
- --title-size: clamp(1.25rem, 7vw, 2.5rem);
147
- }
148
-
149
- .grid {
150
- grid-template-columns: 1fr;
151
- }
152
- }
153
-
154
- @media (prefers-reduced-motion: reduce) {
155
- *, *::before, *::after {
156
- animation-duration: 0.01ms !important;
157
- transition-duration: 0.2s !important;
158
- }
159
-
160
- html {
161
- scroll-behavior: auto;
162
- }
163
- }
164
- ```
165
-
166
- ## Viewport Checklist
167
-
168
- - every `.slide` has `height: 100vh`, `height: 100dvh`, and `overflow: hidden`
169
- - all typography uses `clamp()`
170
- - all spacing uses `clamp()` or viewport units
171
- - images have `max-height` constraints
172
- - grids adapt with `auto-fit` + `minmax()`
173
- - short-height breakpoints exist at `700px`, `600px`, and `500px`
174
- - if anything feels cramped, split the slide
175
-
176
- ## Mood to Preset Mapping
177
-
178
- | Mood | Good Presets |
179
- |------|--------------|
180
- | Impressed / Confident | Bold Signal, Electric Studio, Dark Botanical |
181
- | Excited / Energized | Creative Voltage, Neon Cyber, Split Pastel |
182
- | Calm / Focused | Notebook Tabs, Paper & Ink, Swiss Modern |
183
- | Inspired / Moved | Dark Botanical, Vintage Editorial, Pastel Geometry |
184
-
185
- ## Preset Catalog
186
-
187
- ### 1. Bold Signal
188
-
189
- - Vibe: confident, high-impact, keynote-ready
190
- - Best for: pitch decks, launches, statements
191
- - Fonts: Archivo Black + Space Grotesk
192
- - Palette: charcoal base, hot orange focal card, crisp white text
193
- - Signature: oversized section numbers, high-contrast card on dark field
194
-
195
- ### 2. Electric Studio
196
-
197
- - Vibe: clean, bold, agency-polished
198
- - Best for: client presentations, strategic reviews
199
- - Fonts: Manrope only
200
- - Palette: black, white, saturated cobalt accent
201
- - Signature: two-panel split and sharp editorial alignment
202
-
203
- ### 3. Creative Voltage
204
-
205
- - Vibe: energetic, retro-modern, playful confidence
206
- - Best for: creative studios, brand work, product storytelling
207
- - Fonts: Syne + Space Mono
208
- - Palette: electric blue, neon yellow, deep navy
209
- - Signature: halftone textures, badges, punchy contrast
210
-
211
- ### 4. Dark Botanical
212
-
213
- - Vibe: elegant, premium, atmospheric
214
- - Best for: luxury brands, thoughtful narratives, premium product decks
215
- - Fonts: Cormorant + IBM Plex Sans
216
- - Palette: near-black, warm ivory, blush, gold, terracotta
217
- - Signature: blurred abstract circles, fine rules, restrained motion
218
-
219
- ### 5. Notebook Tabs
220
-
221
- - Vibe: editorial, organized, tactile
222
- - Best for: reports, reviews, structured storytelling
223
- - Fonts: Bodoni Moda + DM Sans
224
- - Palette: cream paper on charcoal with pastel tabs
225
- - Signature: paper sheet, colored side tabs, binder details
226
-
227
- ### 6. Pastel Geometry
228
-
229
- - Vibe: approachable, modern, friendly
230
- - Best for: product overviews, onboarding, lighter brand decks
231
- - Fonts: Plus Jakarta Sans only
232
- - Palette: pale blue field, cream card, soft pink/mint/lavender accents
233
- - Signature: vertical pills, rounded cards, soft shadows
234
-
235
- ### 7. Split Pastel
236
-
237
- - Vibe: playful, modern, creative
238
- - Best for: agency intros, workshops, portfolios
239
- - Fonts: Outfit only
240
- - Palette: peach + lavender split with mint badges
241
- - Signature: split backdrop, rounded tags, light grid overlays
242
-
243
- ### 8. Vintage Editorial
244
-
245
- - Vibe: witty, personality-driven, magazine-inspired
246
- - Best for: personal brands, opinionated talks, storytelling
247
- - Fonts: Fraunces + Work Sans
248
- - Palette: cream, charcoal, dusty warm accents
249
- - Signature: geometric accents, bordered callouts, punchy serif headlines
250
-
251
- ### 9. Neon Cyber
252
-
253
- - Vibe: futuristic, techy, kinetic
254
- - Best for: AI, infra, dev tools, future-of-X talks
255
- - Fonts: Clash Display + Satoshi
256
- - Palette: midnight navy, cyan, magenta
257
- - Signature: glow, particles, grids, data-radar energy
258
-
259
- ### 10. Terminal Green
260
-
261
- - Vibe: developer-focused, hacker-clean
262
- - Best for: APIs, CLI tools, engineering demos
263
- - Fonts: JetBrains Mono only
264
- - Palette: GitHub dark + terminal green
265
- - Signature: scan lines, command-line framing, precise monospace rhythm
266
-
267
- ### 11. Swiss Modern
268
-
269
- - Vibe: minimal, precise, data-forward
270
- - Best for: corporate, product strategy, analytics
271
- - Fonts: Archivo + Nunito
272
- - Palette: white, black, signal red
273
- - Signature: visible grids, asymmetry, geometric discipline
274
-
275
- ### 12. Paper & Ink
276
-
277
- - Vibe: literary, thoughtful, story-driven
278
- - Best for: essays, keynote narratives, manifesto decks
279
- - Fonts: Cormorant Garamond + Source Serif 4
280
- - Palette: warm cream, charcoal, crimson accent
281
- - Signature: pull quotes, drop caps, elegant rules
282
-
283
- ## Direct Selection Prompts
284
-
285
- If the user already knows the style they want, let them pick directly from the preset names above instead of forcing preview generation.
286
-
287
- ## Animation Feel Mapping
288
-
289
- | Feeling | Motion Direction |
290
- |---------|------------------|
291
- | Dramatic / Cinematic | slow fades, parallax, large scale-ins |
292
- | Techy / Futuristic | glow, particles, grid motion, scramble text |
293
- | Playful / Friendly | springy easing, rounded shapes, floating motion |
294
- | Professional / Corporate | subtle 200-300ms transitions, clean slides |
295
- | Calm / Minimal | very restrained movement, whitespace-first |
296
- | Editorial / Magazine | strong hierarchy, staggered text and image interplay |
297
-
298
- ## CSS Gotcha: Negating Functions
299
-
300
- Never write these:
301
-
302
- ```css
303
- right: -clamp(28px, 3.5vw, 44px);
304
- margin-left: -min(10vw, 100px);
305
- ```
306
-
307
- Browsers ignore them silently.
308
-
309
- Always write this instead:
310
-
311
- ```css
312
- right: calc(-1 * clamp(28px, 3.5vw, 44px));
313
- margin-left: calc(-1 * min(10vw, 100px));
314
- ```
315
-
316
- ## Validation Sizes
317
-
318
- Test at minimum:
319
- - Desktop: `1920x1080`, `1440x900`, `1280x720`
320
- - Tablet: `1024x768`, `768x1024`
321
- - Mobile: `375x667`, `414x896`
322
- - Landscape phone: `667x375`, `896x414`
323
-
324
- ## Anti-Patterns
325
-
326
- Do not use:
327
- - purple-on-white startup templates
328
- - Inter / Roboto / Arial as the visual voice unless the user explicitly wants utilitarian neutrality
329
- - bullet walls, tiny type, or code blocks that require scrolling
330
- - decorative illustrations when abstract geometry would do the job better
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/frontend-slides/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Frontend Slides"
3
- short_description: "Create distinctive HTML slide decks and convert PPTX to web"
4
- brand_color: "#FF6B3D"
5
- default_prompt: "Create a viewport-safe HTML presentation with strong visual direction"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/investor-materials/SKILL.md DELETED
@@ -1,96 +0,0 @@
1
- ---
2
- name: investor-materials
3
- description: Create and update pitch decks, one-pagers, investor memos, accelerator applications, financial models, and fundraising materials. Use when the user needs investor-facing documents, projections, use-of-funds tables, milestone plans, or materials that must stay internally consistent across multiple fundraising assets.
4
- origin: ECC
5
- ---
6
-
7
- # Investor Materials
8
-
9
- Build investor-facing materials that are consistent, credible, and easy to defend.
10
-
11
- ## When to Activate
12
-
13
- - creating or revising a pitch deck
14
- - writing an investor memo or one-pager
15
- - building a financial model, milestone plan, or use-of-funds table
16
- - answering accelerator or incubator application questions
17
- - aligning multiple fundraising docs around one source of truth
18
-
19
- ## Golden Rule
20
-
21
- All investor materials must agree with each other.
22
-
23
- Create or confirm a single source of truth before writing:
24
- - traction metrics
25
- - pricing and revenue assumptions
26
- - raise size and instrument
27
- - use of funds
28
- - team bios and titles
29
- - milestones and timelines
30
-
31
- If conflicting numbers appear, stop and resolve them before drafting.
32
-
33
- ## Core Workflow
34
-
35
- 1. inventory the canonical facts
36
- 2. identify missing assumptions
37
- 3. choose the asset type
38
- 4. draft the asset with explicit logic
39
- 5. cross-check every number against the source of truth
40
-
41
- ## Asset Guidance
42
-
43
- ### Pitch Deck
44
- Recommended flow:
45
- 1. company + wedge
46
- 2. problem
47
- 3. solution
48
- 4. product / demo
49
- 5. market
50
- 6. business model
51
- 7. traction
52
- 8. team
53
- 9. competition / differentiation
54
- 10. ask
55
- 11. use of funds / milestones
56
- 12. appendix
57
-
58
- If the user wants a web-native deck, pair this skill with `frontend-slides`.
59
-
60
- ### One-Pager / Memo
61
- - state what the company does in one clean sentence
62
- - show why now
63
- - include traction and proof points early
64
- - make the ask precise
65
- - keep claims easy to verify
66
-
67
- ### Financial Model
68
- Include:
69
- - explicit assumptions
70
- - bear / base / bull cases when useful
71
- - clean layer-by-layer revenue logic
72
- - milestone-linked spending
73
- - sensitivity analysis where the decision hinges on assumptions
74
-
75
- ### Accelerator Applications
76
- - answer the exact question asked
77
- - prioritize traction, insight, and team advantage
78
- - avoid puffery
79
- - keep internal metrics consistent with the deck and model
80
-
81
- ## Red Flags to Avoid
82
-
83
- - unverifiable claims
84
- - fuzzy market sizing without assumptions
85
- - inconsistent team roles or titles
86
- - revenue math that does not sum cleanly
87
- - inflated certainty where assumptions are fragile
88
-
89
- ## Quality Gate
90
-
91
- Before delivering:
92
- - every number matches the current source of truth
93
- - use of funds and revenue layers sum correctly
94
- - assumptions are visible, not buried
95
- - the story is clear without hype language
96
- - the final asset is defensible in a partner meeting
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/investor-materials/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Investor Materials"
3
- short_description: "Create decks, memos, and financial materials from one source of truth"
4
- brand_color: "#7C3AED"
5
- default_prompt: "Draft investor materials that stay numerically consistent across assets"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/investor-outreach/SKILL.md DELETED
@@ -1,76 +0,0 @@
1
- ---
2
- name: investor-outreach
3
- description: Draft cold emails, warm intro blurbs, follow-ups, update emails, and investor communications for fundraising. Use when the user wants outreach to angels, VCs, strategic investors, or accelerators and needs concise, personalized, investor-facing messaging.
4
- origin: ECC
5
- ---
6
-
7
- # Investor Outreach
8
-
9
- Write investor communication that is short, personalized, and easy to act on.
10
-
11
- ## When to Activate
12
-
13
- - writing a cold email to an investor
14
- - drafting a warm intro request
15
- - sending follow-ups after a meeting or no response
16
- - writing investor updates during a process
17
- - tailoring outreach based on fund thesis or partner fit
18
-
19
- ## Core Rules
20
-
21
- 1. Personalize every outbound message.
22
- 2. Keep the ask low-friction.
23
- 3. Use proof, not adjectives.
24
- 4. Stay concise.
25
- 5. Never send generic copy that could go to any investor.
26
-
27
- ## Cold Email Structure
28
-
29
- 1. subject line: short and specific
30
- 2. opener: why this investor specifically
31
- 3. pitch: what the company does, why now, what proof matters
32
- 4. ask: one concrete next step
33
- 5. sign-off: name, role, one credibility anchor if needed
34
-
35
- ## Personalization Sources
36
-
37
- Reference one or more of:
38
- - relevant portfolio companies
39
- - a public thesis, talk, post, or article
40
- - a mutual connection
41
- - a clear market or product fit with the investor's focus
42
-
43
- If that context is missing, ask for it or state that the draft is a template awaiting personalization.
44
-
45
- ## Follow-Up Cadence
46
-
47
- Default:
48
- - day 0: initial outbound
49
- - day 4-5: short follow-up with one new data point
50
- - day 10-12: final follow-up with a clean close
51
-
52
- Do not keep nudging after that unless the user wants a longer sequence.
53
-
54
- ## Warm Intro Requests
55
-
56
- Make life easy for the connector:
57
- - explain why the intro is a fit
58
- - include a forwardable blurb
59
- - keep the forwardable blurb under 100 words
60
-
61
- ## Post-Meeting Updates
62
-
63
- Include:
64
- - the specific thing discussed
65
- - the answer or update promised
66
- - one new proof point if available
67
- - the next step
68
-
69
- ## Quality Gate
70
-
71
- Before delivering:
72
- - message is personalized
73
- - the ask is explicit
74
- - there is no fluff or begging language
75
- - the proof point is concrete
76
- - word count stays tight
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/investor-outreach/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Investor Outreach"
3
- short_description: "Write concise, personalized outreach and follow-ups for fundraising"
4
- brand_color: "#059669"
5
- default_prompt: "Draft a personalized investor outreach email with a clear low-friction ask"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/market-research/SKILL.md DELETED
@@ -1,75 +0,0 @@
1
- ---
2
- name: market-research
3
- description: Conduct market research, competitive analysis, investor due diligence, and industry intelligence with source attribution and decision-oriented summaries. Use when the user wants market sizing, competitor comparisons, fund research, technology scans, or research that informs business decisions.
4
- origin: ECC
5
- ---
6
-
7
- # Market Research
8
-
9
- Produce research that supports decisions, not research theater.
10
-
11
- ## When to Activate
12
-
13
- - researching a market, category, company, investor, or technology trend
14
- - building TAM/SAM/SOM estimates
15
- - comparing competitors or adjacent products
16
- - preparing investor dossiers before outreach
17
- - pressure-testing a thesis before building, funding, or entering a market
18
-
19
- ## Research Standards
20
-
21
- 1. Every important claim needs a source.
22
- 2. Prefer recent data and call out stale data.
23
- 3. Include contrarian evidence and downside cases.
24
- 4. Translate findings into a decision, not just a summary.
25
- 5. Separate fact, inference, and recommendation clearly.
26
-
27
- ## Common Research Modes
28
-
29
- ### Investor / Fund Diligence
30
- Collect:
31
- - fund size, stage, and typical check size
32
- - relevant portfolio companies
33
- - public thesis and recent activity
34
- - reasons the fund is or is not a fit
35
- - any obvious red flags or mismatches
36
-
37
- ### Competitive Analysis
38
- Collect:
39
- - product reality, not marketing copy
40
- - funding and investor history if public
41
- - traction metrics if public
42
- - distribution and pricing clues
43
- - strengths, weaknesses, and positioning gaps
44
-
45
- ### Market Sizing
46
- Use:
47
- - top-down estimates from reports or public datasets
48
- - bottom-up sanity checks from realistic customer acquisition assumptions
49
- - explicit assumptions for every leap in logic
50
-
51
- ### Technology / Vendor Research
52
- Collect:
53
- - how it works
54
- - trade-offs and adoption signals
55
- - integration complexity
56
- - lock-in, security, compliance, and operational risk
57
-
58
- ## Output Format
59
-
60
- Default structure:
61
- 1. executive summary
62
- 2. key findings
63
- 3. implications
64
- 4. risks and caveats
65
- 5. recommendation
66
- 6. sources
67
-
68
- ## Quality Gate
69
-
70
- Before delivering:
71
- - all numbers are sourced or labeled as estimates
72
- - old data is flagged
73
- - the recommendation follows from the evidence
74
- - risks and counterarguments are included
75
- - the output makes a decision easier
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/market-research/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Market Research"
3
- short_description: "Source-attributed market, competitor, and investor research"
4
- brand_color: "#2563EB"
5
- default_prompt: "Research this market and summarize the decision-relevant findings"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/mcp-server-patterns/SKILL.md DELETED
@@ -1,67 +0,0 @@
1
- ---
2
- name: mcp-server-patterns
3
- description: Build MCP servers with Node/TypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest API.
4
- origin: ECC
5
- ---
6
-
7
- # MCP Server Patterns
8
-
9
- The Model Context Protocol (MCP) lets AI assistants call tools, read resources, and use prompts from your server. Use this skill when building or maintaining MCP servers. The SDK API evolves; check Context7 (query-docs for "MCP") or the official MCP documentation for current method names and signatures.
10
-
11
- ## When to Use
12
-
13
- Use when: implementing a new MCP server, adding tools or resources, choosing stdio vs HTTP, upgrading the SDK, or debugging MCP registration and transport issues.
14
-
15
- ## How It Works
16
-
17
- ### Core concepts
18
-
19
- - **Tools**: Actions the model can invoke (e.g. search, run a command). Register with `registerTool()` or `tool()` depending on SDK version.
20
- - **Resources**: Read-only data the model can fetch (e.g. file contents, API responses). Register with `registerResource()` or `resource()`. Handlers typically receive a `uri` argument.
21
- - **Prompts**: Reusable, parameterised prompt templates the client can surface (e.g. in Claude Desktop). Register with `registerPrompt()` or equivalent.
22
- - **Transport**: stdio for local clients (e.g. Claude Desktop); Streamable HTTP is preferred for remote (Cursor, cloud). Legacy HTTP/SSE is for backward compatibility.
23
-
24
- The Node/TypeScript SDK may expose `tool()` / `resource()` or `registerTool()` / `registerResource()`; the official SDK has changed over time. Always verify against the current [MCP docs](https://modelcontextprotocol.io) or Context7.
25
-
26
- ### Connecting with stdio
27
-
28
- For local clients, create a stdio transport and pass it to your server’s connect method. The exact API varies by SDK version (e.g. constructor vs factory). See the official MCP documentation or query Context7 for "MCP stdio server" for the current pattern.
29
-
30
- Keep server logic (tools + resources) independent of transport so you can plug in stdio or HTTP in the entrypoint.
31
-
32
- ### Remote (Streamable HTTP)
33
-
34
- For Cursor, cloud, or other remote clients, use **Streamable HTTP** (single MCP HTTP endpoint per current spec). Support legacy HTTP/SSE only when backward compatibility is required.
35
-
36
- ## Examples
37
-
38
- ### Install and server setup
39
-
40
- ```bash
41
- npm install @modelcontextprotocol/sdk zod
42
- ```
43
-
44
- ```typescript
45
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
46
- import { z } from "zod";
47
-
48
- const server = new McpServer({ name: "my-server", version: "1.0.0" });
49
- ```
50
-
51
- Register tools and resources using the API your SDK version provides: some versions use `server.tool(name, description, schema, handler)` (positional args), others use `server.tool({ name, description, inputSchema }, handler)` or `registerTool()`. Same for resources — include a `uri` in the handler when the API provides it. Check the official MCP docs or Context7 for the current `@modelcontextprotocol/sdk` signatures to avoid copy-paste errors.
52
-
53
- Use **Zod** (or the SDK’s preferred schema format) for input validation.
54
-
55
- ## Best Practices
56
-
57
- - **Schema first**: Define input schemas for every tool; document parameters and return shape.
58
- - **Errors**: Return structured errors or messages the model can interpret; avoid raw stack traces.
59
- - **Idempotency**: Prefer idempotent tools where possible so retries are safe.
60
- - **Rate and cost**: For tools that call external APIs, consider rate limits and cost; document in the tool description.
61
- - **Versioning**: Pin SDK version in package.json; check release notes when upgrading.
62
-
63
- ## Official SDKs and Docs
64
-
65
- - **JavaScript/TypeScript**: `@modelcontextprotocol/sdk` (npm). Use Context7 with library name "MCP" for current registration and transport patterns.
66
- - **Go**: Official Go SDK on GitHub (`modelcontextprotocol/go-sdk`).
67
- - **C#**: Official C# SDK for .NET.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/nextjs-turbopack/SKILL.md DELETED
@@ -1,44 +0,0 @@
1
- ---
2
- name: nextjs-turbopack
3
- description: Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.
4
- origin: ECC
5
- ---
6
-
7
- # Next.js and Turbopack
8
-
9
- Next.js 16+ uses Turbopack by default for local development: an incremental bundler written in Rust that significantly speeds up dev startup and hot updates.
10
-
11
- ## When to Use
12
-
13
- - **Turbopack (default dev)**: Use for day-to-day development. Faster cold start and HMR, especially in large apps.
14
- - **Webpack (legacy dev)**: Use only if you hit a Turbopack bug or rely on a webpack-only plugin in dev. Disable with `--webpack` (or `--no-turbopack` depending on your Next.js version; check the docs for your release).
15
- - **Production**: Production build behavior (`next build`) may use Turbopack or webpack depending on Next.js version; check the official Next.js docs for your version.
16
-
17
- Use when: developing or debugging Next.js 16+ apps, diagnosing slow dev startup or HMR, or optimizing production bundles.
18
-
19
- ## How It Works
20
-
21
- - **Turbopack**: Incremental bundler for Next.js dev. Uses file-system caching so restarts are much faster (e.g. 5–14x on large projects).
22
- - **Default in dev**: From Next.js 16, `next dev` runs with Turbopack unless disabled.
23
- - **File-system caching**: Restarts reuse previous work; cache is typically under `.next`; no extra config needed for basic use.
24
- - **Bundle Analyzer (Next.js 16.1+)**: Experimental Bundle Analyzer to inspect output and find heavy dependencies; enable via config or experimental flag (see Next.js docs for your version).
25
-
26
- ## Examples
27
-
28
- ### Commands
29
-
30
- ```bash
31
- next dev
32
- next build
33
- next start
34
- ```
35
-
36
- ### Usage
37
-
38
- Run `next dev` for local development with Turbopack. Use the Bundle Analyzer (see Next.js docs) to optimize code-splitting and trim large dependencies. Prefer App Router and server components where possible.
39
-
40
- ## Best Practices
41
-
42
- - Stay on a recent Next.js 16.x for stable Turbopack and caching behavior.
43
- - If dev is slow, ensure you're on Turbopack (default) and that the cache isn't being cleared unnecessarily.
44
- - For production bundle size issues, use the official Next.js bundle analysis tooling for your version.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/nextjs-turbopack/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Next.js Turbopack"
3
- short_description: "Next.js 16+ and Turbopack dev bundler"
4
- brand_color: "#000000"
5
- default_prompt: "Next.js dev, Turbopack, or bundle optimization"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/security-review/SKILL.md DELETED
@@ -1,495 +0,0 @@
1
- ---
2
- name: security-review
3
- description: Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.
4
- origin: ECC
5
- ---
6
-
7
- # Security Review Skill
8
-
9
- This skill ensures all code follows security best practices and identifies potential vulnerabilities.
10
-
11
- ## When to Activate
12
-
13
- - Implementing authentication or authorization
14
- - Handling user input or file uploads
15
- - Creating new API endpoints
16
- - Working with secrets or credentials
17
- - Implementing payment features
18
- - Storing or transmitting sensitive data
19
- - Integrating third-party APIs
20
-
21
- ## Security Checklist
22
-
23
- ### 1. Secrets Management
24
-
25
- #### FAIL: NEVER Do This
26
- ```typescript
27
- const apiKey = "sk-proj-xxxxx" // Hardcoded secret
28
- const dbPassword = "password123" // In source code
29
- ```
30
-
31
- #### PASS: ALWAYS Do This
32
- ```typescript
33
- const apiKey = process.env.OPENAI_API_KEY
34
- const dbUrl = process.env.DATABASE_URL
35
-
36
- // Verify secrets exist
37
- if (!apiKey) {
38
- throw new Error('OPENAI_API_KEY not configured')
39
- }
40
- ```
41
-
42
- #### Verification Steps
43
- - [ ] No hardcoded API keys, tokens, or passwords
44
- - [ ] All secrets in environment variables
45
- - [ ] `.env.local` in .gitignore
46
- - [ ] No secrets in git history
47
- - [ ] Production secrets in hosting platform (Vercel, Railway)
48
-
49
- ### 2. Input Validation
50
-
51
- #### Always Validate User Input
52
- ```typescript
53
- import { z } from 'zod'
54
-
55
- // Define validation schema
56
- const CreateUserSchema = z.object({
57
- email: z.string().email(),
58
- name: z.string().min(1).max(100),
59
- age: z.number().int().min(0).max(150)
60
- })
61
-
62
- // Validate before processing
63
- export async function createUser(input: unknown) {
64
- try {
65
- const validated = CreateUserSchema.parse(input)
66
- return await db.users.create(validated)
67
- } catch (error) {
68
- if (error instanceof z.ZodError) {
69
- return { success: false, errors: error.errors }
70
- }
71
- throw error
72
- }
73
- }
74
- ```
75
-
76
- #### File Upload Validation
77
- ```typescript
78
- function validateFileUpload(file: File) {
79
- // Size check (5MB max)
80
- const maxSize = 5 * 1024 * 1024
81
- if (file.size > maxSize) {
82
- throw new Error('File too large (max 5MB)')
83
- }
84
-
85
- // Type check
86
- const allowedTypes = ['image/jpeg', 'image/png', 'image/gif']
87
- if (!allowedTypes.includes(file.type)) {
88
- throw new Error('Invalid file type')
89
- }
90
-
91
- // Extension check
92
- const allowedExtensions = ['.jpg', '.jpeg', '.png', '.gif']
93
- const extension = file.name.toLowerCase().match(/\.[^.]+$/)?.[0]
94
- if (!extension || !allowedExtensions.includes(extension)) {
95
- throw new Error('Invalid file extension')
96
- }
97
-
98
- return true
99
- }
100
- ```
101
-
102
- #### Verification Steps
103
- - [ ] All user inputs validated with schemas
104
- - [ ] File uploads restricted (size, type, extension)
105
- - [ ] No direct use of user input in queries
106
- - [ ] Whitelist validation (not blacklist)
107
- - [ ] Error messages don't leak sensitive info
108
-
109
- ### 3. SQL Injection Prevention
110
-
111
- #### FAIL: NEVER Concatenate SQL
112
- ```typescript
113
- // DANGEROUS - SQL Injection vulnerability
114
- const query = `SELECT * FROM users WHERE email = '${userEmail}'`
115
- await db.query(query)
116
- ```
117
-
118
- #### PASS: ALWAYS Use Parameterized Queries
119
- ```typescript
120
- // Safe - parameterized query
121
- const { data } = await supabase
122
- .from('users')
123
- .select('*')
124
- .eq('email', userEmail)
125
-
126
- // Or with raw SQL
127
- await db.query(
128
- 'SELECT * FROM users WHERE email = $1',
129
- [userEmail]
130
- )
131
- ```
132
-
133
- #### Verification Steps
134
- - [ ] All database queries use parameterized queries
135
- - [ ] No string concatenation in SQL
136
- - [ ] ORM/query builder used correctly
137
- - [ ] Supabase queries properly sanitized
138
-
139
- ### 4. Authentication & Authorization
140
-
141
- #### JWT Token Handling
142
- ```typescript
143
- // FAIL: WRONG: localStorage (vulnerable to XSS)
144
- localStorage.setItem('token', token)
145
-
146
- // PASS: CORRECT: httpOnly cookies
147
- res.setHeader('Set-Cookie',
148
- `token=${token}; HttpOnly; Secure; SameSite=Strict; Max-Age=3600`)
149
- ```
150
-
151
- #### Authorization Checks
152
- ```typescript
153
- export async function deleteUser(userId: string, requesterId: string) {
154
- // ALWAYS verify authorization first
155
- const requester = await db.users.findUnique({
156
- where: { id: requesterId }
157
- })
158
-
159
- if (requester.role !== 'admin') {
160
- return NextResponse.json(
161
- { error: 'Unauthorized' },
162
- { status: 403 }
163
- )
164
- }
165
-
166
- // Proceed with deletion
167
- await db.users.delete({ where: { id: userId } })
168
- }
169
- ```
170
-
171
- #### Row Level Security (Supabase)
172
- ```sql
173
- -- Enable RLS on all tables
174
- ALTER TABLE users ENABLE ROW LEVEL SECURITY;
175
-
176
- -- Users can only view their own data
177
- CREATE POLICY "Users view own data"
178
- ON users FOR SELECT
179
- USING (auth.uid() = id);
180
-
181
- -- Users can only update their own data
182
- CREATE POLICY "Users update own data"
183
- ON users FOR UPDATE
184
- USING (auth.uid() = id);
185
- ```
186
-
187
- #### Verification Steps
188
- - [ ] Tokens stored in httpOnly cookies (not localStorage)
189
- - [ ] Authorization checks before sensitive operations
190
- - [ ] Row Level Security enabled in Supabase
191
- - [ ] Role-based access control implemented
192
- - [ ] Session management secure
193
-
194
- ### 5. XSS Prevention
195
-
196
- #### Sanitize HTML
197
- ```typescript
198
- import DOMPurify from 'isomorphic-dompurify'
199
-
200
- // ALWAYS sanitize user-provided HTML
201
- function renderUserContent(html: string) {
202
- const clean = DOMPurify.sanitize(html, {
203
- ALLOWED_TAGS: ['b', 'i', 'em', 'strong', 'p'],
204
- ALLOWED_ATTR: []
205
- })
206
- return <div dangerouslySetInnerHTML={{ __html: clean }} />
207
- }
208
- ```
209
-
210
- #### Content Security Policy
211
- ```typescript
212
- // next.config.js
213
- const securityHeaders = [
214
- {
215
- key: 'Content-Security-Policy',
216
- value: `
217
- default-src 'self';
218
- script-src 'self' 'unsafe-eval' 'unsafe-inline';
219
- style-src 'self' 'unsafe-inline';
220
- img-src 'self' data: https:;
221
- font-src 'self';
222
- connect-src 'self' https://api.example.com;
223
- `.replace(/\s{2,}/g, ' ').trim()
224
- }
225
- ]
226
- ```
227
-
228
- #### Verification Steps
229
- - [ ] User-provided HTML sanitized
230
- - [ ] CSP headers configured
231
- - [ ] No unvalidated dynamic content rendering
232
- - [ ] React's built-in XSS protection used
233
-
234
- ### 6. CSRF Protection
235
-
236
- #### CSRF Tokens
237
- ```typescript
238
- import { csrf } from '@/lib/csrf'
239
-
240
- export async function POST(request: Request) {
241
- const token = request.headers.get('X-CSRF-Token')
242
-
243
- if (!csrf.verify(token)) {
244
- return NextResponse.json(
245
- { error: 'Invalid CSRF token' },
246
- { status: 403 }
247
- )
248
- }
249
-
250
- // Process request
251
- }
252
- ```
253
-
254
- #### SameSite Cookies
255
- ```typescript
256
- res.setHeader('Set-Cookie',
257
- `session=${sessionId}; HttpOnly; Secure; SameSite=Strict`)
258
- ```
259
-
260
- #### Verification Steps
261
- - [ ] CSRF tokens on state-changing operations
262
- - [ ] SameSite=Strict on all cookies
263
- - [ ] Double-submit cookie pattern implemented
264
-
265
- ### 7. Rate Limiting
266
-
267
- #### API Rate Limiting
268
- ```typescript
269
- import rateLimit from 'express-rate-limit'
270
-
271
- const limiter = rateLimit({
272
- windowMs: 15 * 60 * 1000, // 15 minutes
273
- max: 100, // 100 requests per window
274
- message: 'Too many requests'
275
- })
276
-
277
- // Apply to routes
278
- app.use('/api/', limiter)
279
- ```
280
-
281
- #### Expensive Operations
282
- ```typescript
283
- // Aggressive rate limiting for searches
284
- const searchLimiter = rateLimit({
285
- windowMs: 60 * 1000, // 1 minute
286
- max: 10, // 10 requests per minute
287
- message: 'Too many search requests'
288
- })
289
-
290
- app.use('/api/search', searchLimiter)
291
- ```
292
-
293
- #### Verification Steps
294
- - [ ] Rate limiting on all API endpoints
295
- - [ ] Stricter limits on expensive operations
296
- - [ ] IP-based rate limiting
297
- - [ ] User-based rate limiting (authenticated)
298
-
299
- ### 8. Sensitive Data Exposure
300
-
301
- #### Logging
302
- ```typescript
303
- // FAIL: WRONG: Logging sensitive data
304
- console.log('User login:', { email, password })
305
- console.log('Payment:', { cardNumber, cvv })
306
-
307
- // PASS: CORRECT: Redact sensitive data
308
- console.log('User login:', { email, userId })
309
- console.log('Payment:', { last4: card.last4, userId })
310
- ```
311
-
312
- #### Error Messages
313
- ```typescript
314
- // FAIL: WRONG: Exposing internal details
315
- catch (error) {
316
- return NextResponse.json(
317
- { error: error.message, stack: error.stack },
318
- { status: 500 }
319
- )
320
- }
321
-
322
- // PASS: CORRECT: Generic error messages
323
- catch (error) {
324
- console.error('Internal error:', error)
325
- return NextResponse.json(
326
- { error: 'An error occurred. Please try again.' },
327
- { status: 500 }
328
- )
329
- }
330
- ```
331
-
332
- #### Verification Steps
333
- - [ ] No passwords, tokens, or secrets in logs
334
- - [ ] Error messages generic for users
335
- - [ ] Detailed errors only in server logs
336
- - [ ] No stack traces exposed to users
337
-
338
- ### 9. Blockchain Security (Solana)
339
-
340
- #### Wallet Verification
341
- ```typescript
342
- import { verify } from '@solana/web3.js'
343
-
344
- async function verifyWalletOwnership(
345
- publicKey: string,
346
- signature: string,
347
- message: string
348
- ) {
349
- try {
350
- const isValid = verify(
351
- Buffer.from(message),
352
- Buffer.from(signature, 'base64'),
353
- Buffer.from(publicKey, 'base64')
354
- )
355
- return isValid
356
- } catch (error) {
357
- return false
358
- }
359
- }
360
- ```
361
-
362
- #### Transaction Verification
363
- ```typescript
364
- async function verifyTransaction(transaction: Transaction) {
365
- // Verify recipient
366
- if (transaction.to !== expectedRecipient) {
367
- throw new Error('Invalid recipient')
368
- }
369
-
370
- // Verify amount
371
- if (transaction.amount > maxAmount) {
372
- throw new Error('Amount exceeds limit')
373
- }
374
-
375
- // Verify user has sufficient balance
376
- const balance = await getBalance(transaction.from)
377
- if (balance < transaction.amount) {
378
- throw new Error('Insufficient balance')
379
- }
380
-
381
- return true
382
- }
383
- ```
384
-
385
- #### Verification Steps
386
- - [ ] Wallet signatures verified
387
- - [ ] Transaction details validated
388
- - [ ] Balance checks before transactions
389
- - [ ] No blind transaction signing
390
-
391
- ### 10. Dependency Security
392
-
393
- #### Regular Updates
394
- ```bash
395
- # Check for vulnerabilities
396
- npm audit
397
-
398
- # Fix automatically fixable issues
399
- npm audit fix
400
-
401
- # Update dependencies
402
- npm update
403
-
404
- # Check for outdated packages
405
- npm outdated
406
- ```
407
-
408
- #### Lock Files
409
- ```bash
410
- # ALWAYS commit lock files
411
- git add package-lock.json
412
-
413
- # Use in CI/CD for reproducible builds
414
- npm ci # Instead of npm install
415
- ```
416
-
417
- #### Verification Steps
418
- - [ ] Dependencies up to date
419
- - [ ] No known vulnerabilities (npm audit clean)
420
- - [ ] Lock files committed
421
- - [ ] Dependabot enabled on GitHub
422
- - [ ] Regular security updates
423
-
424
- ## Security Testing
425
-
426
- ### Automated Security Tests
427
- ```typescript
428
- // Test authentication
429
- test('requires authentication', async () => {
430
- const response = await fetch('/api/protected')
431
- expect(response.status).toBe(401)
432
- })
433
-
434
- // Test authorization
435
- test('requires admin role', async () => {
436
- const response = await fetch('/api/admin', {
437
- headers: { Authorization: `Bearer ${userToken}` }
438
- })
439
- expect(response.status).toBe(403)
440
- })
441
-
442
- // Test input validation
443
- test('rejects invalid input', async () => {
444
- const response = await fetch('/api/users', {
445
- method: 'POST',
446
- body: JSON.stringify({ email: 'not-an-email' })
447
- })
448
- expect(response.status).toBe(400)
449
- })
450
-
451
- // Test rate limiting
452
- test('enforces rate limits', async () => {
453
- const requests = Array(101).fill(null).map(() =>
454
- fetch('/api/endpoint')
455
- )
456
-
457
- const responses = await Promise.all(requests)
458
- const tooManyRequests = responses.filter(r => r.status === 429)
459
-
460
- expect(tooManyRequests.length).toBeGreaterThan(0)
461
- })
462
- ```
463
-
464
- ## Pre-Deployment Security Checklist
465
-
466
- Before ANY production deployment:
467
-
468
- - [ ] **Secrets**: No hardcoded secrets, all in env vars
469
- - [ ] **Input Validation**: All user inputs validated
470
- - [ ] **SQL Injection**: All queries parameterized
471
- - [ ] **XSS**: User content sanitized
472
- - [ ] **CSRF**: Protection enabled
473
- - [ ] **Authentication**: Proper token handling
474
- - [ ] **Authorization**: Role checks in place
475
- - [ ] **Rate Limiting**: Enabled on all endpoints
476
- - [ ] **HTTPS**: Enforced in production
477
- - [ ] **Security Headers**: CSP, X-Frame-Options configured
478
- - [ ] **Error Handling**: No sensitive data in errors
479
- - [ ] **Logging**: No sensitive data logged
480
- - [ ] **Dependencies**: Up to date, no vulnerabilities
481
- - [ ] **Row Level Security**: Enabled in Supabase
482
- - [ ] **CORS**: Properly configured
483
- - [ ] **File Uploads**: Validated (size, type)
484
- - [ ] **Wallet Signatures**: Verified (if blockchain)
485
-
486
- ## Resources
487
-
488
- - [OWASP Top 10](https://owasp.org/www-project-top-ten/)
489
- - [Next.js Security](https://nextjs.org/docs/security)
490
- - [Supabase Security](https://supabase.com/docs/guides/auth)
491
- - [Web Security Academy](https://portswigger.net/web-security)
492
-
493
- ---
494
-
495
- **Remember**: Security is not optional. One vulnerability can compromise the entire platform. When in doubt, err on the side of caution.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.cursor/.agents/skills/security-review/agents/openai.yaml DELETED
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Security Review"
3
- short_description: "Comprehensive security checklist and vulnerability detection"
4
- brand_color: "#EF4444"
5
- default_prompt: "Run security checklist: secrets, input validation, injection prevention"
6
- policy:
7
- allow_implicit_invocation: true
 
 
 
 
 
 
 
 
.cursor/.agents/skills/strategic-compact/SKILL.md DELETED
@@ -1,103 +0,0 @@
1
- ---
2
- name: strategic-compact
3
- description: Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
4
- origin: ECC
5
- ---
6
-
7
- # Strategic Compact Skill
8
-
9
- Suggests manual `/compact` at strategic points in your workflow rather than relying on arbitrary auto-compaction.
10
-
11
- ## When to Activate
12
-
13
- - Running long sessions that approach context limits (200K+ tokens)
14
- - Working on multi-phase tasks (research → plan → implement → test)
15
- - Switching between unrelated tasks within the same session
16
- - After completing a major milestone and starting new work
17
- - When responses slow down or become less coherent (context pressure)
18
-
19
- ## Why Strategic Compaction?
20
-
21
- Auto-compaction triggers at arbitrary points:
22
- - Often mid-task, losing important context
23
- - No awareness of logical task boundaries
24
- - Can interrupt complex multi-step operations
25
-
26
- Strategic compaction at logical boundaries:
27
- - **After exploration, before execution** — Compact research context, keep implementation plan
28
- - **After completing a milestone** — Fresh start for next phase
29
- - **Before major context shifts** — Clear exploration context before different task
30
-
31
- ## How It Works
32
-
33
- The `suggest-compact.js` script runs on PreToolUse (Edit/Write) and:
34
-
35
- 1. **Tracks tool calls** — Counts tool invocations in session
36
- 2. **Threshold detection** — Suggests at configurable threshold (default: 50 calls)
37
- 3. **Periodic reminders** — Reminds every 25 calls after threshold
38
-
39
- ## Hook Setup
40
-
41
- Add to your `~/.claude/settings.json`:
42
-
43
- ```json
44
- {
45
- "hooks": {
46
- "PreToolUse": [
47
- {
48
- "matcher": "Edit",
49
- "hooks": [{ "type": "command", "command": "node ~/.claude/skills/strategic-compact/suggest-compact.js" }]
50
- },
51
- {
52
- "matcher": "Write",
53
- "hooks": [{ "type": "command", "command": "node ~/.claude/skills/strategic-compact/suggest-compact.js" }]
54
- }
55
- ]
56
- }
57
- }
58
- ```
59
-
60
- ## Configuration
61
-
62
- Environment variables:
63
- - `COMPACT_THRESHOLD` — Tool calls before first suggestion (default: 50)
64
-
65
- ## Compaction Decision Guide
66
-
67
- Use this table to decide when to compact:
68
-
69
- | Phase Transition | Compact? | Why |
70
- |-----------------|----------|-----|
71
- | Research → Planning | Yes | Research context is bulky; plan is the distilled output |
72
- | Planning → Implementation | Yes | Plan is in TodoWrite or a file; free up context for code |
73
- | Implementation → Testing | Maybe | Keep if tests reference recent code; compact if switching focus |
74
- | Debugging → Next feature | Yes | Debug traces pollute context for unrelated work |
75
- | Mid-implementation | No | Losing variable names, file paths, and partial state is costly |
76
- | After a failed approach | Yes | Clear the dead-end reasoning before trying a new approach |
77
-
78
- ## What Survives Compaction
79
-
80
- Understanding what persists helps you compact with confidence:
81
-
82
- | Persists | Lost |
83
- |----------|------|
84
- | CLAUDE.md instructions | Intermediate reasoning and analysis |
85
- | TodoWrite task list | File contents you previously read |
86
- | Memory files (`~/.claude/memory/`) | Multi-step conversation context |
87
- | Git state (commits, branches) | Tool call history and counts |
88
- | Files on disk | Nuanced user preferences stated verbally |
89
-
90
- ## Best Practices
91
-
92
- 1. **Compact after planning** — Once plan is finalized in TodoWrite, compact to start fresh
93
- 2. **Compact after debugging** — Clear error-resolution context before continuing
94
- 3. **Don't compact mid-implementation** — Preserve context for related changes
95
- 4. **Read the suggestion** — The hook tells you *when*, you decide *if*
96
- 5. **Write before compacting** — Save important context to files or memory before compacting
97
- 6. **Use `/compact` with a summary** — Add a custom message: `/compact Focus on implementing auth middleware next`
98
-
99
- ## Related
100
-
101
- - [The Longform Guide](https://x.com/affaanmustafa/status/2014040193557471352) — Token optimization section
102
- - Memory persistence hooks — For state that survives compaction
103
- - `continuous-learning` skill — Extracts patterns before session ends