@musashishao/agent-kit 1.8.1 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/agents/ai-architect.md +39 -0
- package/.agent/agents/cloud-engineer.md +39 -0
- package/.agent/agents/game-asset-curator.md +317 -0
- package/.agent/agents/game-developer.md +190 -89
- package/.agent/agents/game-narrative-designer.md +310 -0
- package/.agent/agents/game-qa-agent.md +441 -0
- package/.agent/agents/marketing-specialist.md +41 -0
- package/.agent/agents/penetration-tester.md +15 -1
- package/.agent/rules/CODEX.md +26 -2
- package/.agent/rules/GEMINI.md +7 -5
- package/.agent/rules/REFERENCE.md +92 -2
- package/.agent/scripts/ak_cli.py +1 -1
- package/.agent/scripts/localize_workflows.py +54 -0
- package/.agent/scripts/memory_manager.py +24 -1
- package/.agent/skills/3d-web-experience/SKILL.md +386 -0
- package/.agent/skills/DEPENDENCIES.md +54 -0
- package/.agent/skills/ab-test-setup/SKILL.md +77 -0
- package/.agent/skills/active-directory-attacks/SKILL.md +59 -0
- package/.agent/skills/agent-evaluation/SKILL.md +430 -0
- package/.agent/skills/agent-memory-systems/SKILL.md +426 -0
- package/.agent/skills/agent-tool-builder/SKILL.md +139 -0
- package/.agent/skills/ai-agents-architect/SKILL.md +115 -0
- package/.agent/skills/ai-product/SKILL.md +86 -0
- package/.agent/skills/ai-wrapper-product/SKILL.md +90 -0
- package/.agent/skills/analytics-tracking/SKILL.md +88 -0
- package/.agent/skills/api-fuzzing-bug-bounty/SKILL.md +66 -0
- package/.agent/skills/app-store-optimization/SKILL.md +66 -0
- package/.agent/skills/autonomous-agent-patterns/SKILL.md +414 -0
- package/.agent/skills/aws-penetration-testing/SKILL.md +50 -0
- package/.agent/skills/aws-serverless/SKILL.md +327 -0
- package/.agent/skills/azure-functions/SKILL.md +340 -0
- package/.agent/skills/broken-authentication/SKILL.md +53 -0
- package/.agent/skills/browser-automation/SKILL.md +408 -0
- package/.agent/skills/browser-extension-builder/SKILL.md +422 -0
- package/.agent/skills/bullmq-specialist/SKILL.md +424 -0
- package/.agent/skills/bun-development/SKILL.md +386 -0
- package/.agent/skills/burp-suite-testing/SKILL.md +60 -0
- package/.agent/skills/clerk-auth/SKILL.md +432 -0
- package/.agent/skills/cloud-penetration-testing/SKILL.md +51 -0
- package/.agent/skills/copywriting/SKILL.md +66 -0
- package/.agent/skills/crewai/SKILL.md +470 -0
- package/.agent/skills/discord-bot-architect/SKILL.md +447 -0
- package/.agent/skills/email-sequence/SKILL.md +73 -0
- package/.agent/skills/ethical-hacking-methodology/SKILL.md +67 -0
- package/.agent/skills/firebase/SKILL.md +377 -0
- package/.agent/skills/game-development/godot-expert/SKILL.md +462 -0
- package/.agent/skills/game-development/npc-ai-integration/SKILL.md +110 -0
- package/.agent/skills/game-development/procedural-generation/SKILL.md +168 -0
- package/.agent/skills/game-development/unity-integration/SKILL.md +358 -0
- package/.agent/skills/game-development/webgpu-shading/SKILL.md +209 -0
- package/.agent/skills/gcp-cloud-run/SKILL.md +358 -0
- package/.agent/skills/graphql/SKILL.md +492 -0
- package/.agent/skills/idor-testing/SKILL.md +64 -0
- package/.agent/skills/inngest/SKILL.md +128 -0
- package/.agent/skills/langfuse/SKILL.md +415 -0
- package/.agent/skills/langgraph/SKILL.md +360 -0
- package/.agent/skills/launch-strategy/SKILL.md +68 -0
- package/.agent/skills/linux-privilege-escalation/SKILL.md +62 -0
- package/.agent/skills/llm-app-patterns/SKILL.md +367 -0
- package/.agent/skills/marketing-ideas/SKILL.md +66 -0
- package/.agent/skills/metasploit-framework/SKILL.md +60 -0
- package/.agent/skills/micro-saas-launcher/SKILL.md +93 -0
- package/.agent/skills/neon-postgres/SKILL.md +339 -0
- package/.agent/skills/paid-ads/SKILL.md +64 -0
- package/.agent/skills/supabase-integration/SKILL.md +411 -0
- package/.agent/workflows/ai-agent.md +36 -0
- package/.agent/workflows/autofix.md +1 -0
- package/.agent/workflows/brainstorm.md +1 -0
- package/.agent/workflows/context.md +1 -0
- package/.agent/workflows/create.md +1 -0
- package/.agent/workflows/dashboard.md +1 -0
- package/.agent/workflows/debug.md +1 -0
- package/.agent/workflows/deploy.md +1 -0
- package/.agent/workflows/enhance.md +1 -0
- package/.agent/workflows/game-prototype.md +154 -0
- package/.agent/workflows/marketing.md +37 -0
- package/.agent/workflows/next.md +1 -0
- package/.agent/workflows/orchestrate.md +1 -0
- package/.agent/workflows/pentest.md +37 -0
- package/.agent/workflows/plan.md +1 -0
- package/.agent/workflows/preview.md +2 -1
- package/.agent/workflows/quality.md +1 -0
- package/.agent/workflows/saas.md +36 -0
- package/.agent/workflows/spec.md +1 -0
- package/.agent/workflows/status.md +1 -0
- package/.agent/workflows/test.md +1 -0
- package/.agent/workflows/ui-ux-pro-max.md +1 -0
- package/README.md +52 -24
- package/bin/cli.js +68 -3
- package/docs/CHANGELOG_AI_INFRA.md +30 -0
- package/docs/MIGRATION_GUIDE_V1.9.md +55 -0
- package/package.json +1 -1
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: supabase-integration
|
|
3
|
+
description: "Expert integration of Supabase with Next.js App Router. Covers Auth, Database (Postgres), Storage, Edge Functions, and Row Level Security (RLS)."
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
source: "antigravity-awesome-skills (adapted)"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# ⚡ Supabase Integration
|
|
9
|
+
|
|
10
|
+
You are an expert in Supabase - the open-source Firebase alternative built on Postgres. You understand the server/client boundary in Next.js, Row Level Security for data protection, and the power of Postgres.
|
|
11
|
+
|
|
12
|
+
**Key insight**: Supabase is Postgres with superpowers. Unlike Firebase, you have full SQL power, proper relations, and RLS for fine-grained access control.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## When to Use This Skill
|
|
17
|
+
|
|
18
|
+
- Next.js apps needing auth + database
|
|
19
|
+
- Apps requiring proper relational data
|
|
20
|
+
- Real-time subscriptions
|
|
21
|
+
- File storage with CDN
|
|
22
|
+
- Edge Functions for serverless logic
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Capabilities
|
|
27
|
+
|
|
28
|
+
- `supabase-auth`
|
|
29
|
+
- `supabase-database`
|
|
30
|
+
- `supabase-storage`
|
|
31
|
+
- `supabase-edge-functions`
|
|
32
|
+
- `supabase-realtime`
|
|
33
|
+
- `row-level-security`
|
|
34
|
+
- `postgres-rpc`
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 1. Client Setup for Next.js
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
// lib/supabase/client.ts
|
|
42
|
+
import { createBrowserClient } from '@supabase/ssr'
|
|
43
|
+
|
|
44
|
+
export function createClient() {
|
|
45
|
+
return createBrowserClient(
|
|
46
|
+
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
|
47
|
+
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// lib/supabase/server.ts
|
|
52
|
+
import { createServerClient, type CookieOptions } from '@supabase/ssr'
|
|
53
|
+
import { cookies } from 'next/headers'
|
|
54
|
+
|
|
55
|
+
export async function createServerSupabaseClient() {
|
|
56
|
+
const cookieStore = await cookies()
|
|
57
|
+
|
|
58
|
+
return createServerClient(
|
|
59
|
+
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
|
60
|
+
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
|
61
|
+
{
|
|
62
|
+
cookies: {
|
|
63
|
+
getAll() {
|
|
64
|
+
return cookieStore.getAll()
|
|
65
|
+
},
|
|
66
|
+
setAll(cookiesToSet) {
|
|
67
|
+
cookiesToSet.forEach(({ name, value, options }) => {
|
|
68
|
+
cookieStore.set(name, value, options)
|
|
69
|
+
})
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 2. Auth Middleware
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
// middleware.ts
|
|
83
|
+
import { createServerClient, type CookieOptions } from '@supabase/ssr'
|
|
84
|
+
import { NextResponse, type NextRequest } from 'next/server'
|
|
85
|
+
|
|
86
|
+
export async function middleware(request: NextRequest) {
|
|
87
|
+
let response = NextResponse.next({
|
|
88
|
+
request: {
|
|
89
|
+
headers: request.headers,
|
|
90
|
+
},
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
const supabase = createServerClient(
|
|
94
|
+
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
|
95
|
+
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
|
96
|
+
{
|
|
97
|
+
cookies: {
|
|
98
|
+
getAll() {
|
|
99
|
+
return request.cookies.getAll()
|
|
100
|
+
},
|
|
101
|
+
setAll(cookiesToSet) {
|
|
102
|
+
cookiesToSet.forEach(({ name, value, options }) => {
|
|
103
|
+
request.cookies.set(name, value)
|
|
104
|
+
response.cookies.set(name, value, options)
|
|
105
|
+
})
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
// Refresh session
|
|
112
|
+
const { data: { user } } = await supabase.auth.getUser()
|
|
113
|
+
|
|
114
|
+
// Protect routes
|
|
115
|
+
const protectedRoutes = ['/dashboard', '/settings', '/api/protected']
|
|
116
|
+
const isProtected = protectedRoutes.some(route =>
|
|
117
|
+
request.nextUrl.pathname.startsWith(route)
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
if (isProtected && !user) {
|
|
121
|
+
return NextResponse.redirect(new URL('/login', request.url))
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return response
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export const config = {
|
|
128
|
+
matcher: ['/((?!_next/static|_next/image|favicon.ico).*)'],
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 3. Auth Patterns
|
|
135
|
+
|
|
136
|
+
### Sign Up / Sign In
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
// app/auth/actions.ts
|
|
140
|
+
'use server'
|
|
141
|
+
|
|
142
|
+
import { createServerSupabaseClient } from '@/lib/supabase/server'
|
|
143
|
+
import { redirect } from 'next/navigation'
|
|
144
|
+
|
|
145
|
+
export async function signUp(formData: FormData) {
|
|
146
|
+
const supabase = await createServerSupabaseClient()
|
|
147
|
+
|
|
148
|
+
const { error } = await supabase.auth.signUp({
|
|
149
|
+
email: formData.get('email') as string,
|
|
150
|
+
password: formData.get('password') as string,
|
|
151
|
+
options: {
|
|
152
|
+
emailRedirectTo: `${process.env.NEXT_PUBLIC_SITE_URL}/auth/callback`,
|
|
153
|
+
},
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
if (error) {
|
|
157
|
+
return { error: error.message }
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return { message: 'Check your email for confirmation link' }
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export async function signIn(formData: FormData) {
|
|
164
|
+
const supabase = await createServerSupabaseClient()
|
|
165
|
+
|
|
166
|
+
const { error } = await supabase.auth.signInWithPassword({
|
|
167
|
+
email: formData.get('email') as string,
|
|
168
|
+
password: formData.get('password') as string,
|
|
169
|
+
})
|
|
170
|
+
|
|
171
|
+
if (error) {
|
|
172
|
+
return { error: error.message }
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
redirect('/dashboard')
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export async function signOut() {
|
|
179
|
+
const supabase = await createServerSupabaseClient()
|
|
180
|
+
await supabase.auth.signOut()
|
|
181
|
+
redirect('/login')
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### OAuth Callback
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
// app/auth/callback/route.ts
|
|
189
|
+
import { createServerSupabaseClient } from '@/lib/supabase/server'
|
|
190
|
+
import { NextResponse } from 'next/server'
|
|
191
|
+
|
|
192
|
+
export async function GET(request: Request) {
|
|
193
|
+
const { searchParams, origin } = new URL(request.url)
|
|
194
|
+
const code = searchParams.get('code')
|
|
195
|
+
const next = searchParams.get('next') ?? '/dashboard'
|
|
196
|
+
|
|
197
|
+
if (code) {
|
|
198
|
+
const supabase = await createServerSupabaseClient()
|
|
199
|
+
const { error } = await supabase.auth.exchangeCodeForSession(code)
|
|
200
|
+
|
|
201
|
+
if (!error) {
|
|
202
|
+
return NextResponse.redirect(`${origin}${next}`)
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return NextResponse.redirect(`${origin}/auth/error`)
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## 4. Database Patterns
|
|
213
|
+
|
|
214
|
+
### Server Component Data Fetching
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
// app/posts/page.tsx
|
|
218
|
+
import { createServerSupabaseClient } from '@/lib/supabase/server'
|
|
219
|
+
|
|
220
|
+
export default async function PostsPage() {
|
|
221
|
+
const supabase = await createServerSupabaseClient()
|
|
222
|
+
|
|
223
|
+
const { data: posts, error } = await supabase
|
|
224
|
+
.from('posts')
|
|
225
|
+
.select(`
|
|
226
|
+
id,
|
|
227
|
+
title,
|
|
228
|
+
content,
|
|
229
|
+
created_at,
|
|
230
|
+
author:users(id, name, avatar_url)
|
|
231
|
+
`)
|
|
232
|
+
.order('created_at', { ascending: false })
|
|
233
|
+
.limit(20)
|
|
234
|
+
|
|
235
|
+
if (error) {
|
|
236
|
+
throw new Error(error.message)
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
return (
|
|
240
|
+
<div>
|
|
241
|
+
{posts.map(post => (
|
|
242
|
+
<PostCard key={post.id} post={post} />
|
|
243
|
+
))}
|
|
244
|
+
</div>
|
|
245
|
+
)
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Real-time Subscriptions (Client)
|
|
250
|
+
|
|
251
|
+
```typescript
|
|
252
|
+
'use client'
|
|
253
|
+
|
|
254
|
+
import { createClient } from '@/lib/supabase/client'
|
|
255
|
+
import { useEffect, useState } from 'react'
|
|
256
|
+
|
|
257
|
+
export function RealtimeMessages({ roomId }: { roomId: string }) {
|
|
258
|
+
const [messages, setMessages] = useState<Message[]>([])
|
|
259
|
+
const supabase = createClient()
|
|
260
|
+
|
|
261
|
+
useEffect(() => {
|
|
262
|
+
// Initial fetch
|
|
263
|
+
const fetchMessages = async () => {
|
|
264
|
+
const { data } = await supabase
|
|
265
|
+
.from('messages')
|
|
266
|
+
.select('*')
|
|
267
|
+
.eq('room_id', roomId)
|
|
268
|
+
.order('created_at')
|
|
269
|
+
|
|
270
|
+
setMessages(data ?? [])
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
fetchMessages()
|
|
274
|
+
|
|
275
|
+
// Subscribe to new messages
|
|
276
|
+
const channel = supabase
|
|
277
|
+
.channel(`room:${roomId}`)
|
|
278
|
+
.on(
|
|
279
|
+
'postgres_changes',
|
|
280
|
+
{
|
|
281
|
+
event: 'INSERT',
|
|
282
|
+
schema: 'public',
|
|
283
|
+
table: 'messages',
|
|
284
|
+
filter: `room_id=eq.${roomId}`,
|
|
285
|
+
},
|
|
286
|
+
(payload) => {
|
|
287
|
+
setMessages(prev => [...prev, payload.new as Message])
|
|
288
|
+
}
|
|
289
|
+
)
|
|
290
|
+
.subscribe()
|
|
291
|
+
|
|
292
|
+
return () => {
|
|
293
|
+
supabase.removeChannel(channel)
|
|
294
|
+
}
|
|
295
|
+
}, [roomId])
|
|
296
|
+
|
|
297
|
+
return (
|
|
298
|
+
<div>
|
|
299
|
+
{messages.map(msg => (
|
|
300
|
+
<MessageItem key={msg.id} message={msg} />
|
|
301
|
+
))}
|
|
302
|
+
</div>
|
|
303
|
+
)
|
|
304
|
+
}
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## 5. Row Level Security (RLS)
|
|
310
|
+
|
|
311
|
+
```sql
|
|
312
|
+
-- Enable RLS
|
|
313
|
+
ALTER TABLE posts ENABLE ROW LEVEL SECURITY;
|
|
314
|
+
|
|
315
|
+
-- Policy: Anyone can read published posts
|
|
316
|
+
CREATE POLICY "Public posts are viewable by everyone"
|
|
317
|
+
ON posts FOR SELECT
|
|
318
|
+
USING (published = true);
|
|
319
|
+
|
|
320
|
+
-- Policy: Users can CRUD their own posts
|
|
321
|
+
CREATE POLICY "Users can manage their own posts"
|
|
322
|
+
ON posts FOR ALL
|
|
323
|
+
USING (auth.uid() = author_id)
|
|
324
|
+
WITH CHECK (auth.uid() = author_id);
|
|
325
|
+
|
|
326
|
+
-- Policy: Admins can do anything
|
|
327
|
+
CREATE POLICY "Admins have full access"
|
|
328
|
+
ON posts FOR ALL
|
|
329
|
+
USING (
|
|
330
|
+
EXISTS (
|
|
331
|
+
SELECT 1 FROM user_roles
|
|
332
|
+
WHERE user_id = auth.uid()
|
|
333
|
+
AND role = 'admin'
|
|
334
|
+
)
|
|
335
|
+
);
|
|
336
|
+
|
|
337
|
+
-- Helper function for current user
|
|
338
|
+
CREATE FUNCTION auth.user_id() RETURNS UUID AS $$
|
|
339
|
+
SELECT auth.uid()
|
|
340
|
+
$$ LANGUAGE SQL SECURITY DEFINER;
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## 6. Storage Patterns
|
|
346
|
+
|
|
347
|
+
```typescript
|
|
348
|
+
// Upload file
|
|
349
|
+
const uploadFile = async (file: File, bucket: string, path: string) => {
|
|
350
|
+
const supabase = createClient()
|
|
351
|
+
|
|
352
|
+
const { data, error } = await supabase.storage
|
|
353
|
+
.from(bucket)
|
|
354
|
+
.upload(path, file, {
|
|
355
|
+
cacheControl: '3600',
|
|
356
|
+
upsert: false
|
|
357
|
+
})
|
|
358
|
+
|
|
359
|
+
if (error) throw error
|
|
360
|
+
|
|
361
|
+
// Get public URL
|
|
362
|
+
const { data: { publicUrl } } = supabase.storage
|
|
363
|
+
.from(bucket)
|
|
364
|
+
.getPublicUrl(path)
|
|
365
|
+
|
|
366
|
+
return publicUrl
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// Storage policy (SQL)
|
|
370
|
+
// Allow users to upload to their own folder
|
|
371
|
+
CREATE POLICY "Users can upload to own folder"
|
|
372
|
+
ON storage.objects FOR INSERT
|
|
373
|
+
WITH CHECK (
|
|
374
|
+
bucket_id = 'avatars' AND
|
|
375
|
+
(storage.foldername(name))[1] = auth.uid()::text
|
|
376
|
+
);
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## 7. Anti-Patterns
|
|
382
|
+
|
|
383
|
+
### ❌ getSession in Server Components
|
|
384
|
+
|
|
385
|
+
```typescript
|
|
386
|
+
// WRONG: getSession can return stale data
|
|
387
|
+
const { data: { session } } = await supabase.auth.getSession()
|
|
388
|
+
|
|
389
|
+
// CORRECT: getUser validates with auth server
|
|
390
|
+
const { data: { user } } = await supabase.auth.getUser()
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
### ❌ No RLS on Tables
|
|
394
|
+
|
|
395
|
+
```sql
|
|
396
|
+
-- WRONG: No RLS = anyone with anon key can read/write!
|
|
397
|
+
CREATE TABLE secrets (data TEXT);
|
|
398
|
+
|
|
399
|
+
-- CORRECT: Always enable RLS
|
|
400
|
+
CREATE TABLE secrets (data TEXT);
|
|
401
|
+
ALTER TABLE secrets ENABLE ROW LEVEL SECURITY;
|
|
402
|
+
-- Then add appropriate policies
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## Related Skills
|
|
408
|
+
|
|
409
|
+
- `firebase` - Firebase comparison
|
|
410
|
+
- `database-design` - Postgres patterns
|
|
411
|
+
- `nextjs-best-practices` - Next.js integration
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Build AI agent workflow. From system design to autonomous execution loops.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 🤖 /ai-agent - AI Agent Builder Workflow
|
|
6
|
+
|
|
7
|
+
This workflow guides you through designing and implementing sophisticated AI agents and multi-agent systems.
|
|
8
|
+
|
|
9
|
+
## 📋 Steps
|
|
10
|
+
|
|
11
|
+
### 1. System Design
|
|
12
|
+
- Use `ai-agents-architect` to map the agent roles.
|
|
13
|
+
- Define a state graph using `langgraph`.
|
|
14
|
+
- Select an orchestration style (Sequential, Hierarchical, Swarm).
|
|
15
|
+
|
|
16
|
+
### 2. Implementation
|
|
17
|
+
- Build agent loops with `autonomous-agent-patterns`.
|
|
18
|
+
- Implement tool-calling using `agent-tool-builder` or `mcp-builder`.
|
|
19
|
+
- Setup context management with `agent-memory-systems`.
|
|
20
|
+
|
|
21
|
+
### 3. RAG & Knowledge
|
|
22
|
+
- Connect depth knowledge with `llm-app-patterns` (RAG).
|
|
23
|
+
- Ensure high-quality retrieval using semantic search patterns.
|
|
24
|
+
|
|
25
|
+
### 4. Evaluation & Monitoring
|
|
26
|
+
- Build tests with `agent-evaluation`.
|
|
27
|
+
- Trace every action through `langfuse`.
|
|
28
|
+
- Optimize costs with `ai-wrapper-product` patterns.
|
|
29
|
+
|
|
30
|
+
## 🤖 Agents
|
|
31
|
+
- `@ai-architect`: Lead for system design and graphs.
|
|
32
|
+
- `@orchestrator`: For multi-agent coordination.
|
|
33
|
+
- `@backend-specialist`: For tool and API integration.
|
|
34
|
+
|
|
35
|
+
## 🛠️ Usage
|
|
36
|
+
Run this command when building specialized AI features or autonomous agents.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Structured brainstorming for projects and features. Explore multiple options before implementation.
|
|
3
|
+
description_vi: Brainstorming có cấu trúc cho dự án và tính năng. Khám phá nhiều phương án trước khi triển khai.
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
# /brainstorm - Structured Idea Exploration
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Command to create a new application. Activates the App Builder skill and initiates user dialogue.
|
|
3
|
+
description_vi: Tạo ứng dụng mới với kiến trúc AI-Ready. Kích hoạt kỹ năng App Builder và bắt đầu đối thoại với người dùng.
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
# /create - Create Application
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Rapid game prototyping workflow. Creates playable game skeleton in minutes.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Game Prototype Workflow
|
|
6
|
+
|
|
7
|
+
Rapidly prototype a game idea from concept to playable skeleton.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
- Define core gameplay loop (30-second experience)
|
|
14
|
+
- Choose target platform (Web/PC/Mobile)
|
|
15
|
+
- Identify minimum viable mechanics
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Phase 1: Concept Validation (5 min)
|
|
20
|
+
|
|
21
|
+
### Step 1.1: Define Core Loop
|
|
22
|
+
|
|
23
|
+
Ask yourself:
|
|
24
|
+
- What does the player DO? (verb)
|
|
25
|
+
- What is the GOAL?
|
|
26
|
+
- What creates CHALLENGE?
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
Example: "Player JUMPS between platforms to REACH the end while AVOIDING enemies"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Step 1.2: Choose Tech Stack
|
|
33
|
+
|
|
34
|
+
| Platform | Framework | Why |
|
|
35
|
+
|----------|-----------|-----|
|
|
36
|
+
| Web 2D | Phaser 4 | Fast setup, browser |
|
|
37
|
+
| Web 3D | Three.js | Lightweight |
|
|
38
|
+
| PC/Mobile 2D | Godot | Free, fast iteration |
|
|
39
|
+
| PC/Mobile 3D | Unity | Ecosystem |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Phase 2: Project Setup (5 min)
|
|
44
|
+
|
|
45
|
+
### For Web (Phaser)
|
|
46
|
+
|
|
47
|
+
// turbo
|
|
48
|
+
```bash
|
|
49
|
+
npm create vite@latest my-game -- --template vanilla-ts
|
|
50
|
+
cd my-game
|
|
51
|
+
npm install phaser
|
|
52
|
+
npm run dev
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### For Godot
|
|
56
|
+
|
|
57
|
+
// turbo
|
|
58
|
+
```bash
|
|
59
|
+
# Create new Godot project via editor or:
|
|
60
|
+
mkdir my-game && cd my-game
|
|
61
|
+
touch project.godot
|
|
62
|
+
# Open in Godot
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### For Unity
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Use Unity Hub to create new 2D/3D project
|
|
69
|
+
# Or CLI:
|
|
70
|
+
unity -createProject my-game
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Phase 3: Core Mechanics (30 min)
|
|
76
|
+
|
|
77
|
+
### Step 3.1: Player Controller
|
|
78
|
+
|
|
79
|
+
Implement basic movement:
|
|
80
|
+
- Input handling
|
|
81
|
+
- Physics/collision
|
|
82
|
+
- Basic state (idle, move, jump)
|
|
83
|
+
|
|
84
|
+
### Step 3.2: One Enemy/Obstacle
|
|
85
|
+
|
|
86
|
+
- Simple AI or static hazard
|
|
87
|
+
- Collision with player
|
|
88
|
+
- Game over on hit
|
|
89
|
+
|
|
90
|
+
### Step 3.3: One Goal
|
|
91
|
+
|
|
92
|
+
- Collectible or finish line
|
|
93
|
+
- Win condition
|
|
94
|
+
- Score increment
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Phase 4: Juice Pass (15 min)
|
|
99
|
+
|
|
100
|
+
Add feedback:
|
|
101
|
+
- [ ] Screen shake on hit
|
|
102
|
+
- [ ] Particle effects
|
|
103
|
+
- [ ] Sound effects (can be placeholder)
|
|
104
|
+
- [ ] Simple animations
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Phase 5: Playtest Loop
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
PLAY → NOTE ISSUES → FIX → REPEAT
|
|
112
|
+
|
|
113
|
+
Focus on:
|
|
114
|
+
- Is it FUN?
|
|
115
|
+
- Is the CHALLENGE right?
|
|
116
|
+
- Does the FEEL good?
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Output Checklist
|
|
122
|
+
|
|
123
|
+
- [ ] Playable prototype
|
|
124
|
+
- [ ] Core loop working
|
|
125
|
+
- [ ] One enemy/obstacle
|
|
126
|
+
- [ ] One goal/win condition
|
|
127
|
+
- [ ] Basic feedback (juice)
|
|
128
|
+
- [ ] Playtested once
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Next Steps
|
|
133
|
+
|
|
134
|
+
After prototype is fun:
|
|
135
|
+
1. Add more content (levels, enemies)
|
|
136
|
+
2. Polish graphics
|
|
137
|
+
3. Add sound design
|
|
138
|
+
4. Implement save/load
|
|
139
|
+
5. Prepare for release
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Agent Invocations
|
|
144
|
+
|
|
145
|
+
| Task | Agent |
|
|
146
|
+
|------|-------|
|
|
147
|
+
| Core mechanics code | `game-developer` |
|
|
148
|
+
| Visual style | `game-asset-curator` |
|
|
149
|
+
| Dialogue/story | `game-narrative-designer` |
|
|
150
|
+
| QA testing | `game-qa-agent` |
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
> **Remember:** A fun prototype with placeholder art beats a polished prototype that isn't fun.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Growth marketing and campaign planning workflow. Sets up analytics, crafts copy, and plans the launch.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 🚀 /marketing - Campaign Planning Workflow
|
|
6
|
+
|
|
7
|
+
This workflow guides you through the process of planning and executing a high-impact marketing campaign for your product.
|
|
8
|
+
|
|
9
|
+
## 📋 Steps
|
|
10
|
+
|
|
11
|
+
### 1. Analysis & Tracking
|
|
12
|
+
- Use `analytics-tracking` to define what metrics matter.
|
|
13
|
+
- Set up a tracking plan for the campaign.
|
|
14
|
+
- Use `ab-test-setup` to identify elements to test.
|
|
15
|
+
|
|
16
|
+
### 2. Messaging & Copy
|
|
17
|
+
- Use `copywriting` to craft your value proposition.
|
|
18
|
+
- Generate headlines, ad copy, and landing page content.
|
|
19
|
+
- Use `email-sequence` to design the nurture flow.
|
|
20
|
+
|
|
21
|
+
### 3. Distribution Strategy
|
|
22
|
+
- Use `marketing-ideas` to find unconventional growth channels.
|
|
23
|
+
- Plan your `paid-ads` strategy and budget.
|
|
24
|
+
- Optimize mobile presence with `app-store-optimization`.
|
|
25
|
+
|
|
26
|
+
### 4. Launch Execution
|
|
27
|
+
- Use `launch-strategy` to coordinate the Big Day.
|
|
28
|
+
- Create a checklist for Product Hunt, Twitter, and other platforms.
|
|
29
|
+
- Set up "Build in Public" hooks.
|
|
30
|
+
|
|
31
|
+
## 🤖 Agents
|
|
32
|
+
- `@marketing-specialist`: Lead agent for this workflow.
|
|
33
|
+
- `@frontend-specialist`: For landing page implementation.
|
|
34
|
+
- `@documentation-writer`: For press releases and newsletters.
|
|
35
|
+
|
|
36
|
+
## 🛠️ Usage
|
|
37
|
+
Run this command to start a marketing audit or plan a new launch.
|