@musashishao/agent-kit 1.8.2 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/.agent/agents/ai-architect.md +39 -0
  2. package/.agent/agents/ai-asset-factory.md +700 -0
  3. package/.agent/agents/ai-audio-factory.md +503 -0
  4. package/.agent/agents/cloud-engineer.md +39 -0
  5. package/.agent/agents/game-developer.md +190 -89
  6. package/.agent/agents/marketing-specialist.md +41 -0
  7. package/.agent/agents/orchestrator.md +113 -3
  8. package/.agent/agents/penetration-tester.md +15 -1
  9. package/.agent/agents/project-planner.md +67 -0
  10. package/.agent/agents/unity-mobile-master.md +949 -0
  11. package/.agent/mcp/config/registry.json +65 -51
  12. package/.agent/mcp/servers/notebooklm/README.md +114 -0
  13. package/.agent/mcp/servers/notebooklm/package.json +35 -0
  14. package/.agent/mcp/servers/notebooklm/src/auth/chrome.ts +225 -0
  15. package/.agent/mcp/servers/notebooklm/src/auth/index.ts +1 -0
  16. package/.agent/mcp/servers/notebooklm/src/index.ts +516 -0
  17. package/.agent/mcp/servers/notebooklm/src/services/index.ts +3 -0
  18. package/.agent/mcp/servers/notebooklm/src/services/library.ts +217 -0
  19. package/.agent/mcp/servers/notebooklm/src/services/notebooklm.ts +380 -0
  20. package/.agent/mcp/servers/notebooklm/tsconfig.json +15 -0
  21. package/.agent/mcp-gateway/README.md +169 -20
  22. package/.agent/mcp-gateway/package.json +22 -7
  23. package/.agent/mcp-gateway/src/auth/index.ts +55 -0
  24. package/.agent/mcp-gateway/src/auth/middleware.ts +242 -0
  25. package/.agent/mcp-gateway/src/auth/oauth.ts +462 -0
  26. package/.agent/mcp-gateway/src/auth/scopes.ts +227 -0
  27. package/.agent/mcp-gateway/src/index.ts +252 -105
  28. package/.agent/mcp-gateway/src/observability/index.ts +5 -0
  29. package/.agent/mcp-gateway/src/observability/otel.ts +405 -0
  30. package/.agent/mcp-gateway/src/transports/index.ts +5 -0
  31. package/.agent/mcp-gateway/src/transports/streamableHttp.ts +235 -0
  32. package/.agent/rules/CODEX.md +115 -2
  33. package/.agent/rules/CODE_RULES.md +73 -0
  34. package/.agent/rules/GEMINI.md +26 -1
  35. package/.agent/rules/MEMORY_STATE.md +110 -0
  36. package/.agent/rules/REFERENCE.md +40 -58
  37. package/.agent/rules/REF_SKILLS.md +116 -0
  38. package/.agent/rules/REF_WORKFLOWS.md +81 -0
  39. package/.agent/scripts/ak_cli.py +106 -5
  40. package/.agent/scripts/memory_manager.py +48 -9
  41. package/.agent/skills/3d-web-experience/SKILL.md +386 -0
  42. package/.agent/skills/DEPENDENCIES.md +54 -0
  43. package/.agent/skills/ab-test-setup/SKILL.md +77 -0
  44. package/.agent/skills/active-directory-attacks/SKILL.md +59 -0
  45. package/.agent/skills/agent-evaluation/SKILL.md +430 -0
  46. package/.agent/skills/agent-memory-systems/SKILL.md +426 -0
  47. package/.agent/skills/agent-tool-builder/SKILL.md +139 -0
  48. package/.agent/skills/ai-agents-architect/SKILL.md +115 -0
  49. package/.agent/skills/ai-product/SKILL.md +86 -0
  50. package/.agent/skills/ai-wrapper-product/SKILL.md +90 -0
  51. package/.agent/skills/analytics-tracking/SKILL.md +88 -0
  52. package/.agent/skills/anti-hallucination/SKILL.md +295 -0
  53. package/.agent/skills/anti-hallucination/scripts/check_hallucination.py +299 -0
  54. package/.agent/skills/api-fuzzing-bug-bounty/SKILL.md +66 -0
  55. package/.agent/skills/app-store-optimization/SKILL.md +66 -0
  56. package/.agent/skills/autonomous-agent-patterns/SKILL.md +414 -0
  57. package/.agent/skills/aws-penetration-testing/SKILL.md +50 -0
  58. package/.agent/skills/aws-serverless/SKILL.md +327 -0
  59. package/.agent/skills/azure-functions/SKILL.md +340 -0
  60. package/.agent/skills/bifurcation-analysis/SKILL.md +56 -0
  61. package/.agent/skills/brainstorming/SKILL.md +80 -6
  62. package/.agent/skills/broken-authentication/SKILL.md +53 -0
  63. package/.agent/skills/browser-automation/SKILL.md +408 -0
  64. package/.agent/skills/browser-extension-builder/SKILL.md +422 -0
  65. package/.agent/skills/bullmq-specialist/SKILL.md +424 -0
  66. package/.agent/skills/bun-development/SKILL.md +386 -0
  67. package/.agent/skills/burp-suite-testing/SKILL.md +60 -0
  68. package/.agent/skills/clerk-auth/SKILL.md +432 -0
  69. package/.agent/skills/cloud-penetration-testing/SKILL.md +51 -0
  70. package/.agent/skills/copywriting/SKILL.md +66 -0
  71. package/.agent/skills/crewai/SKILL.md +470 -0
  72. package/.agent/skills/decision-memory/SKILL.md +317 -0
  73. package/.agent/skills/discord-bot-architect/SKILL.md +447 -0
  74. package/.agent/skills/email-sequence/SKILL.md +73 -0
  75. package/.agent/skills/emergence-detector/SKILL.md +230 -0
  76. package/.agent/skills/emergence-detector/scripts/check_emergence.py +265 -0
  77. package/.agent/skills/ethical-hacking-methodology/SKILL.md +67 -0
  78. package/.agent/skills/explained-qa/SKILL.md +142 -0
  79. package/.agent/skills/explained-qa/game-terminology.md +214 -0
  80. package/.agent/skills/firebase/SKILL.md +377 -0
  81. package/.agent/skills/game-development/ai-dialogue-engine/SKILL.md +442 -0
  82. package/.agent/skills/game-development/ai-graphics-generator/SKILL.md +463 -0
  83. package/.agent/skills/game-development/ai-playtest-framework/SKILL.md +570 -0
  84. package/.agent/skills/game-development/camera-systems/SKILL.md +607 -0
  85. package/.agent/skills/game-development/card-battle-engine/SKILL.md +618 -0
  86. package/.agent/skills/game-development/character-controller-3d/SKILL.md +908 -0
  87. package/.agent/skills/game-development/cloud-save-sync/SKILL.md +527 -0
  88. package/.agent/skills/game-development/combat-system/SKILL.md +748 -0
  89. package/.agent/skills/game-development/compliance-rating/SKILL.md +277 -0
  90. package/.agent/skills/game-development/crossplatform-build/SKILL.md +386 -0
  91. package/.agent/skills/game-development/cultivation-progression/SKILL.md +520 -0
  92. package/.agent/skills/game-development/data-driven-balance/SKILL.md +535 -0
  93. package/.agent/skills/game-development/game-analytics-integrator/SKILL.md +410 -0
  94. package/.agent/skills/game-development/game-audio-advanced/SKILL.md +646 -0
  95. package/.agent/skills/game-development/game-economy-designer/SKILL.md +375 -0
  96. package/.agent/skills/game-development/game-marketing/SKILL.md +85 -0
  97. package/.agent/skills/game-development/game-state-manager/SKILL.md +883 -0
  98. package/.agent/skills/game-development/godot-expert/SKILL.md +462 -0
  99. package/.agent/skills/game-development/hybrid-game-spec/SKILL.md +220 -0
  100. package/.agent/skills/game-development/inventory-quest/SKILL.md +747 -0
  101. package/.agent/skills/game-development/liveops/SKILL.md +308 -0
  102. package/.agent/skills/game-development/localization/SKILL.md +286 -0
  103. package/.agent/skills/game-development/mobile-input-patterns/SKILL.md +343 -0
  104. package/.agent/skills/game-development/monetization-strategy/SKILL.md +94 -0
  105. package/.agent/skills/game-development/multiplayer-master/SKILL.md +727 -0
  106. package/.agent/skills/game-development/narrative-branching/SKILL.md +593 -0
  107. package/.agent/skills/game-development/npc-ai-integration/SKILL.md +110 -0
  108. package/.agent/skills/game-development/procedural-generation/SKILL.md +168 -0
  109. package/.agent/skills/game-development/procedural-level-ai/SKILL.md +367 -0
  110. package/.agent/skills/game-development/prototyping-rapid/SKILL.md +205 -0
  111. package/.agent/skills/game-development/spec-ecosystem/SKILL.md +155 -0
  112. package/.agent/skills/game-development/spec-ecosystem/decision-log-format.md +129 -0
  113. package/.agent/skills/game-development/spec-ecosystem/templates/PLAN-template.md +178 -0
  114. package/.agent/skills/game-development/spec-ecosystem/templates/SPEC-template.md +110 -0
  115. package/.agent/skills/game-development/spec-ecosystem/templates/TASKS-template.md +156 -0
  116. package/.agent/skills/game-development/survival-systems/SKILL.md +493 -0
  117. package/.agent/skills/game-development/testing-qa/SKILL.md +270 -0
  118. package/.agent/skills/game-development/unity-integration/SKILL.md +358 -0
  119. package/.agent/skills/game-development/unity-mobile-optimization/SKILL.md +271 -0
  120. package/.agent/skills/game-development/webgpu-shading/SKILL.md +209 -0
  121. package/.agent/skills/gcp-cloud-run/SKILL.md +358 -0
  122. package/.agent/skills/graphql/SKILL.md +492 -0
  123. package/.agent/skills/idor-testing/SKILL.md +64 -0
  124. package/.agent/skills/inngest/SKILL.md +128 -0
  125. package/.agent/skills/intent-capture/SKILL.md +65 -0
  126. package/.agent/skills/langfuse/SKILL.md +415 -0
  127. package/.agent/skills/langgraph/SKILL.md +360 -0
  128. package/.agent/skills/launch-strategy/SKILL.md +68 -0
  129. package/.agent/skills/linux-privilege-escalation/SKILL.md +62 -0
  130. package/.agent/skills/llm-app-patterns/SKILL.md +367 -0
  131. package/.agent/skills/marketing-ideas/SKILL.md +66 -0
  132. package/.agent/skills/mcp-composition/SKILL.md +362 -0
  133. package/.agent/skills/mcp-observability/SKILL.md +323 -0
  134. package/.agent/skills/mcp-security/SKILL.md +314 -0
  135. package/.agent/skills/metasploit-framework/SKILL.md +60 -0
  136. package/.agent/skills/micro-saas-launcher/SKILL.md +93 -0
  137. package/.agent/skills/neon-postgres/SKILL.md +339 -0
  138. package/.agent/skills/paid-ads/SKILL.md +64 -0
  139. package/.agent/skills/supabase-integration/SKILL.md +411 -0
  140. package/.agent/skills/trust-spectrum/SKILL.md +291 -0
  141. package/.agent/skills/vibe-coding-guard/SKILL.md +328 -0
  142. package/.agent/templates/AGENTS.game.md +63 -0
  143. package/.agent/templates/docs/WORKFLOW_GUIDE.en.md +100 -0
  144. package/.agent/templates/docs/WORKFLOW_GUIDE.vi.md +100 -0
  145. package/.agent/workflows/ai-agent.md +38 -0
  146. package/.agent/workflows/autofix.md +1 -0
  147. package/.agent/workflows/brainstorm.md +1 -0
  148. package/.agent/workflows/context.md +1 -0
  149. package/.agent/workflows/create.md +39 -8
  150. package/.agent/workflows/dashboard.md +1 -0
  151. package/.agent/workflows/debug.md +14 -0
  152. package/.agent/workflows/deploy.md +14 -0
  153. package/.agent/workflows/enhance.md +44 -0
  154. package/.agent/workflows/gamekit-init.md +177 -0
  155. package/.agent/workflows/gamekit-launch.md +338 -0
  156. package/.agent/workflows/gamekit-plan.md +204 -0
  157. package/.agent/workflows/gamekit-qa.md +153 -0
  158. package/.agent/workflows/gamekit-spec.md +243 -0
  159. package/.agent/workflows/gamekit-tasks.md +208 -0
  160. package/.agent/workflows/marketing.md +39 -0
  161. package/.agent/workflows/next.md +1 -0
  162. package/.agent/workflows/orchestrate.md +12 -0
  163. package/.agent/workflows/pentest.md +39 -0
  164. package/.agent/workflows/plan.md +42 -0
  165. package/.agent/workflows/preview.md +1 -0
  166. package/.agent/workflows/quality.md +1 -0
  167. package/.agent/workflows/saas.md +38 -0
  168. package/.agent/workflows/spec.md +42 -0
  169. package/.agent/workflows/status.md +1 -0
  170. package/.agent/workflows/test.md +14 -0
  171. package/.agent/workflows/ui-ux-pro-max.md +1 -0
  172. package/README.md +4 -4
  173. package/bin/cli.js +411 -111
  174. package/package.json +1 -2
  175. package/docs/AI_DATA_INFRASTRUCTURE.md +0 -288
  176. package/docs/CHANGELOG_AI_INFRA.md +0 -111
@@ -0,0 +1,432 @@
1
+ ---
2
+ name: clerk-auth
3
+ description: "Clerk authentication integration for Next.js. Modern auth with pre-built components, organizations, MFA, and seamless user management."
4
+ version: "1.0.0"
5
+ ---
6
+
7
+ # 🔐 Clerk Auth
8
+
9
+ You are a Clerk authentication expert. Clerk provides drop-in auth components, user management, organizations, and session handling that works seamlessly with Next.js App Router.
10
+
11
+ ---
12
+
13
+ ## When to Use This Skill
14
+
15
+ - Need quick, polished auth UI
16
+ - Organization/team management required
17
+ - Multi-factor authentication needed
18
+ - Want managed user profiles
19
+ - Need webhooks for user events
20
+
21
+ ---
22
+
23
+ ## Capabilities
24
+
25
+ - `clerk-auth`
26
+ - `clerk-organizations`
27
+ - `clerk-webhooks`
28
+ - `clerk-middleware`
29
+ - `clerk-components`
30
+
31
+ ---
32
+
33
+ ## 1. Setup
34
+
35
+ ```bash
36
+ npm install @clerk/nextjs
37
+ ```
38
+
39
+ ### Environment Variables
40
+
41
+ ```env
42
+ NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
43
+ CLERK_SECRET_KEY=sk_test_...
44
+
45
+ NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
46
+ NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
47
+ NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard
48
+ NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboard
49
+ ```
50
+
51
+ ### Provider Setup
52
+
53
+ ```typescript
54
+ // app/layout.tsx
55
+ import { ClerkProvider } from '@clerk/nextjs'
56
+
57
+ export default function RootLayout({
58
+ children,
59
+ }: {
60
+ children: React.ReactNode
61
+ }) {
62
+ return (
63
+ <ClerkProvider>
64
+ <html lang="en">
65
+ <body>{children}</body>
66
+ </html>
67
+ </ClerkProvider>
68
+ )
69
+ }
70
+ ```
71
+
72
+ ---
73
+
74
+ ## 2. Middleware
75
+
76
+ ```typescript
77
+ // middleware.ts
78
+ import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server'
79
+
80
+ const isPublicRoute = createRouteMatcher([
81
+ '/',
82
+ '/sign-in(.*)',
83
+ '/sign-up(.*)',
84
+ '/api/webhooks(.*)',
85
+ ])
86
+
87
+ const isProtectedRoute = createRouteMatcher([
88
+ '/dashboard(.*)',
89
+ '/settings(.*)',
90
+ '/api/protected(.*)',
91
+ ])
92
+
93
+ export default clerkMiddleware(async (auth, request) => {
94
+ if (isProtectedRoute(request)) {
95
+ await auth.protect()
96
+ }
97
+ })
98
+
99
+ export const config = {
100
+ matcher: ['/((?!.*\\..*|_next).*)', '/', '/(api|trpc)(.*)'],
101
+ }
102
+ ```
103
+
104
+ ---
105
+
106
+ ## 3. Pre-built Components
107
+
108
+ ### Sign In/Up Pages
109
+
110
+ ```typescript
111
+ // app/sign-in/[[...sign-in]]/page.tsx
112
+ import { SignIn } from '@clerk/nextjs'
113
+
114
+ export default function SignInPage() {
115
+ return (
116
+ <div className="flex min-h-screen items-center justify-center">
117
+ <SignIn
118
+ appearance={{
119
+ elements: {
120
+ formButtonPrimary: 'bg-primary hover:bg-primary/90',
121
+ footerActionLink: 'text-primary hover:text-primary/90',
122
+ }
123
+ }}
124
+ />
125
+ </div>
126
+ )
127
+ }
128
+
129
+ // app/sign-up/[[...sign-up]]/page.tsx
130
+ import { SignUp } from '@clerk/nextjs'
131
+
132
+ export default function SignUpPage() {
133
+ return (
134
+ <div className="flex min-h-screen items-center justify-center">
135
+ <SignUp />
136
+ </div>
137
+ )
138
+ }
139
+ ```
140
+
141
+ ### User Button
142
+
143
+ ```typescript
144
+ // components/navbar.tsx
145
+ import { SignedIn, SignedOut, UserButton, SignInButton } from '@clerk/nextjs'
146
+
147
+ export function Navbar() {
148
+ return (
149
+ <nav className="flex items-center justify-between p-4">
150
+ <Logo />
151
+
152
+ <SignedIn>
153
+ <UserButton
154
+ afterSignOutUrl="/"
155
+ appearance={{
156
+ elements: {
157
+ avatarBox: 'h-10 w-10'
158
+ }
159
+ }}
160
+ />
161
+ </SignedIn>
162
+
163
+ <SignedOut>
164
+ <SignInButton mode="modal">
165
+ <button className="btn btn-primary">Sign In</button>
166
+ </SignInButton>
167
+ </SignedOut>
168
+ </nav>
169
+ )
170
+ }
171
+ ```
172
+
173
+ ---
174
+
175
+ ## 4. Server-Side Auth
176
+
177
+ ### In Server Components
178
+
179
+ ```typescript
180
+ // app/dashboard/page.tsx
181
+ import { auth, currentUser } from '@clerk/nextjs/server'
182
+ import { redirect } from 'next/navigation'
183
+
184
+ export default async function DashboardPage() {
185
+ const { userId } = await auth()
186
+
187
+ if (!userId) {
188
+ redirect('/sign-in')
189
+ }
190
+
191
+ const user = await currentUser()
192
+
193
+ return (
194
+ <div>
195
+ <h1>Welcome, {user?.firstName}!</h1>
196
+ <p>Email: {user?.emailAddresses[0]?.emailAddress}</p>
197
+ </div>
198
+ )
199
+ }
200
+ ```
201
+
202
+ ### In Server Actions
203
+
204
+ ```typescript
205
+ // app/actions.ts
206
+ 'use server'
207
+
208
+ import { auth } from '@clerk/nextjs/server'
209
+ import { prisma } from '@/lib/prisma'
210
+
211
+ export async function createPost(data: { title: string; content: string }) {
212
+ const { userId } = await auth()
213
+
214
+ if (!userId) {
215
+ throw new Error('Unauthorized')
216
+ }
217
+
218
+ return prisma.post.create({
219
+ data: {
220
+ ...data,
221
+ authorId: userId,
222
+ }
223
+ })
224
+ }
225
+ ```
226
+
227
+ ### In API Routes
228
+
229
+ ```typescript
230
+ // app/api/protected/route.ts
231
+ import { auth } from '@clerk/nextjs/server'
232
+ import { NextResponse } from 'next/server'
233
+
234
+ export async function GET() {
235
+ const { userId } = await auth()
236
+
237
+ if (!userId) {
238
+ return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })
239
+ }
240
+
241
+ // Fetch user-specific data
242
+ const data = await getUserData(userId)
243
+
244
+ return NextResponse.json(data)
245
+ }
246
+ ```
247
+
248
+ ---
249
+
250
+ ## 5. Client-Side Auth
251
+
252
+ ```typescript
253
+ 'use client'
254
+
255
+ import { useAuth, useUser } from '@clerk/nextjs'
256
+
257
+ export function ProfileCard() {
258
+ const { isLoaded, isSignedIn, user } = useUser()
259
+ const { signOut, getToken } = useAuth()
260
+
261
+ if (!isLoaded) {
262
+ return <div>Loading...</div>
263
+ }
264
+
265
+ if (!isSignedIn) {
266
+ return <div>Please sign in</div>
267
+ }
268
+
269
+ const handleApiCall = async () => {
270
+ // Get JWT for API calls
271
+ const token = await getToken()
272
+
273
+ const response = await fetch('/api/protected', {
274
+ headers: {
275
+ Authorization: `Bearer ${token}`
276
+ }
277
+ })
278
+ // ...
279
+ }
280
+
281
+ return (
282
+ <div>
283
+ <img src={user.imageUrl} alt={user.fullName ?? ''} />
284
+ <h2>{user.fullName}</h2>
285
+ <p>{user.primaryEmailAddress?.emailAddress}</p>
286
+ <button onClick={() => signOut()}>Sign Out</button>
287
+ </div>
288
+ )
289
+ }
290
+ ```
291
+
292
+ ---
293
+
294
+ ## 6. Organizations (Teams)
295
+
296
+ ```typescript
297
+ // Enable organizations in Clerk Dashboard first
298
+
299
+ // app/org/page.tsx
300
+ import { OrganizationSwitcher, OrganizationList } from '@clerk/nextjs'
301
+
302
+ export default function OrganizationPage() {
303
+ return (
304
+ <div>
305
+ <h1>Organizations</h1>
306
+
307
+ {/* Switch between orgs */}
308
+ <OrganizationSwitcher />
309
+
310
+ {/* List all orgs */}
311
+ <OrganizationList
312
+ afterSelectOrganizationUrl="/dashboard"
313
+ afterCreateOrganizationUrl="/dashboard"
314
+ />
315
+ </div>
316
+ )
317
+ }
318
+
319
+ // Check org membership in server
320
+ import { auth } from '@clerk/nextjs/server'
321
+
322
+ export async function checkOrgAccess() {
323
+ const { orgId, orgRole } = await auth()
324
+
325
+ if (!orgId) {
326
+ throw new Error('No organization selected')
327
+ }
328
+
329
+ if (orgRole !== 'org:admin') {
330
+ throw new Error('Admin access required')
331
+ }
332
+
333
+ return { orgId, orgRole }
334
+ }
335
+ ```
336
+
337
+ ---
338
+
339
+ ## 7. Webhooks
340
+
341
+ ```typescript
342
+ // app/api/webhooks/clerk/route.ts
343
+ import { Webhook } from 'svix'
344
+ import { headers } from 'next/headers'
345
+ import { WebhookEvent } from '@clerk/nextjs/server'
346
+
347
+ export async function POST(req: Request) {
348
+ const WEBHOOK_SECRET = process.env.CLERK_WEBHOOK_SECRET!
349
+
350
+ const headersList = await headers()
351
+ const svix_id = headersList.get('svix-id')
352
+ const svix_timestamp = headersList.get('svix-timestamp')
353
+ const svix_signature = headersList.get('svix-signature')
354
+
355
+ if (!svix_id || !svix_timestamp || !svix_signature) {
356
+ return new Response('Missing svix headers', { status: 400 })
357
+ }
358
+
359
+ const payload = await req.json()
360
+ const body = JSON.stringify(payload)
361
+
362
+ const wh = new Webhook(WEBHOOK_SECRET)
363
+ let evt: WebhookEvent
364
+
365
+ try {
366
+ evt = wh.verify(body, {
367
+ 'svix-id': svix_id,
368
+ 'svix-timestamp': svix_timestamp,
369
+ 'svix-signature': svix_signature,
370
+ }) as WebhookEvent
371
+ } catch (err) {
372
+ return new Response('Invalid signature', { status: 400 })
373
+ }
374
+
375
+ // Handle the webhook
376
+ switch (evt.type) {
377
+ case 'user.created':
378
+ await createUserInDatabase(evt.data)
379
+ break
380
+ case 'user.updated':
381
+ await updateUserInDatabase(evt.data)
382
+ break
383
+ case 'user.deleted':
384
+ await deleteUserFromDatabase(evt.data.id!)
385
+ break
386
+ }
387
+
388
+ return new Response('OK', { status: 200 })
389
+ }
390
+ ```
391
+
392
+ ---
393
+
394
+ ## 8. Anti-Patterns
395
+
396
+ ### ❌ Checking Auth in Layout Only
397
+
398
+ ```typescript
399
+ // WRONG: Auth check in layout, not in pages
400
+ // app/dashboard/layout.tsx
401
+ export default async function Layout({ children }) {
402
+ const { userId } = await auth()
403
+ if (!userId) redirect('/sign-in')
404
+ return children
405
+ }
406
+ // User can still access nested routes via direct URL!
407
+
408
+ // CORRECT: Use middleware for route protection
409
+ // middleware.ts
410
+ export default clerkMiddleware(...)
411
+ ```
412
+
413
+ ### ❌ Storing User Data Only in Clerk
414
+
415
+ ```typescript
416
+ // WRONG: Relying only on Clerk for user data
417
+ const user = await currentUser()
418
+ const subscription = user?.publicMetadata?.subscription // Limited storage!
419
+
420
+ // CORRECT: Sync to your database
421
+ const dbUser = await prisma.user.findUnique({
422
+ where: { clerkId: userId }
423
+ })
424
+ ```
425
+
426
+ ---
427
+
428
+ ## Related Skills
429
+
430
+ - `nextjs-best-practices` - Next.js patterns
431
+ - `api-patterns` - Auth in APIs
432
+ - `supabase-integration` - Alternative auth
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: cloud-penetration-testing
3
+ description: "General methodology for testing Cloud environments (Azure, GCP, O365). Covers shared responsibility, tenant isolation, and API security."
4
+ version: "1.0.0"
5
+ ---
6
+
7
+ # ☁️ Cloud Penetration Testing
8
+
9
+ You are a versatile Cloud Auditor. You understand the shared responsibility model: the provider secures the cloud, you secure what's *in* the cloud. You test for isolation failures and service-specific misconfigurations.
10
+
11
+ ---
12
+
13
+ ## Azure Specifics
14
+ - **Azure AD (Entra ID)**: Testing for guest user over-permissions.
15
+ - **Storage Accounts**: Similar to S3, but uses SAS tokens.
16
+ - **Key Vault**: Finding secrets that have "Read" access for too many users.
17
+ - **Tool**: `MicroBurst`.
18
+
19
+ ---
20
+
21
+ ## GCP Specifics
22
+ - **Service Accounts**: The primary target for privilege escalation.
23
+ - **Cloud Storage**: Permissions like `allUsers:roles/storage.objectViewer`.
24
+ - **Project Hierarchy**: Inherited permissions from Folder/Organization level.
25
+ - **Tool**: `GCPBucketBrute`.
26
+
27
+ ---
28
+
29
+ ## Common Cloud Vulnerabilities
30
+
31
+ | Vulnerability | Impact | Mitigation |
32
+ |---------------|--------|------------|
33
+ | **SSRF** | Credentials theft via Metadata service | Use IMDSv2 (Session-based) |
34
+ | **Insecure Secrets** | Database/API hard-coded in functions | Use Secret Manager / Key Vault |
35
+ | **Public Snapshots** | Data leak from disk backups | Encrypt with KMS and disable public access |
36
+ | **Excessive Permissions**| Full compromise of the cloud tenant | Follow Principle of Least Privilege (PoLP) |
37
+
38
+ ---
39
+
40
+ ## Auditing Workflow
41
+ 1. **Unauthenticated**: Bucket hunting, subdomain enumeration, login portals.
42
+ 2. **Authenticated**: Run `Cloudsploit` or `Prowler` for automatic configuration audit.
43
+ 3. **Manual**: Deep dive into IAM policies and trust relationships.
44
+
45
+ ---
46
+
47
+ ## Related Skills
48
+
49
+ - `aws-penetration-testing` - AWS specific deep dive
50
+ - `ethical-hacking-methodology` - General process
51
+ - `vulnerability-scanner` - Automated tools
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: copywriting
3
+ description: "Expertise in persuasive writing for landing pages, ads, and emails. Covers headline formulas, value proposition design, and call-to-action optimization."
4
+ version: "1.0.0"
5
+ ---
6
+
7
+ # ✍️ Copywriting
8
+
9
+ You are a high-conversion copywriter. You don't just write text; you design persuasion. You focus on user benefits, address objections, and guide readers toward a single desired action.
10
+
11
+ ---
12
+
13
+ ## When to Use This Skill
14
+
15
+ - Writing landing page headlines and body text
16
+ - Crafting high-CTR ad copy (Google, Meta, Twitter)
17
+ - Writing subject lines and body for marketing emails
18
+ - Designing value propositions for new products
19
+ - Defining the "Voice of the Brand"
20
+
21
+ ---
22
+
23
+ ## Capabilities
24
+
25
+ - `headline-formulas`
26
+ - `value-prop-design`
27
+ - `cta-optimization`
28
+ - `storytelling-for-sales`
29
+ - `objection-handling`
30
+
31
+ ---
32
+
33
+ ## 1. High-Performance Formulas
34
+
35
+ | Formula | Implementation | Example |
36
+ |---------|----------------|---------|
37
+ | **PAS** | Problem - Agitation - Solution | "Hate manual data entry? It's killing your team's morale. Use OurApp to automate it instantly." |
38
+ | **AIDA** | Attention - Interest - Desire - Action | "The fastest way to build apps is here. Trusted by 500 startups. Get started for free." |
39
+ | **Benefit > Feature** | "Save 10 hours a week" instead of "Cloud-syncing folders" | Focus on what the user gets, not what the app does. |
40
+
41
+ ---
42
+
43
+ ## 2. Headline Engineering
44
+
45
+ A great headline should do one of four things:
46
+ 1. **Self-Interest**: "Get 50% more leads."
47
+ 2. **Curiosity**: "The one tool every developer is hiding."
48
+ 3. **Quick & Easy**: "Build a landing page in 2 minutes."
49
+ 4. **News**: "The future of AI-native coding is here."
50
+
51
+ ---
52
+
53
+ ## 3. Objection Handling (The "FAQ" Pattern)
54
+
55
+ Address the elephant in the room before the user asks:
56
+ - *"Is it secure?"* -> Mention SOC2 or Encryption upfront.
57
+ - *"Is it expensive?"* -> "Free forever for individuals."
58
+ - *"Will it work for me?"* -> Testimonials from similar users.
59
+
60
+ ---
61
+
62
+ ## Related Skills
63
+
64
+ - `frontend-design` - Layout matters for copy impact
65
+ - `marketing-ideas` - Choosing the right angle
66
+ - `email-sequence` - Applying copy to email flows