Supabase Developer Skill
Overview
This skill provides comprehensive expertise in building production-ready applications with Supabase, the open-source Firebase alternative. It covers database design, authentication, Row Level Security (RLS), file storage, Edge Functions, and real-time subscriptions. Edge Functions now run on Deno 2.1 by default (full rollout August 2025), with local preview available since March 2025.
Core Capabilities
Database & PostgreSQL
- Schema Design: Normalized tables with proper relationships and indexes
- Migrations: Version-controlled database changes
- Queries: Complex queries with joins, CTEs, and aggregations
- Functions: PostgreSQL stored procedures and triggers
- Extensions: PostGIS, pg_vector, pgcrypto, and more
Authentication
- Email/Password: Traditional authentication flow
- Magic Links: Passwordless email authentication
- OAuth Providers: Google, GitHub, Discord, Twitter, and more
- Phone Auth: SMS-based authentication
- Multi-Factor Authentication: TOTP and SMS verification
- Session Management: JWT tokens and refresh handling
Row Level Security (RLS)
- Policy Design: Secure data access patterns
- User-based Access: Policies tied to authenticated users
- Role-based Access: Custom roles and permissions
- Organization-based: Multi-tenant security patterns
- Performance: Optimized RLS with proper indexing
Storage
- File Uploads: Direct and resumable uploads
- Access Control: Bucket policies and RLS integration
- Transformations: Image resizing and optimization
- CDN: Global content delivery
- Signed URLs: Temporary access tokens
Edge Functions
- Deno 2.1 Runtime: TypeScript/JavaScript edge computing with seamless npm imports, native TypeScript support, Web API compatibility, and better performance
- Dashboard Editor: In-dashboard Edge Functions editor for quick updates and prototyping
- AI Assistant: Built-in AI assistant for generating function code
- API Routes: Custom backend logic
- Webhooks: Event-driven integrations
- Scheduled Tasks: Cron-based functions (pg_cron)
- Third-party APIs: External service integrations
- No-Docker Deploy: Deploy with
supabase functions deploy --no-docker when Docker isn't available
Realtime
- Database Changes: Listen to INSERT, UPDATE, DELETE
- Broadcast: Publish messages to channels
- Presence: Track online users and state
- Postgres Changes: Row-level change subscriptions
Implementation Patterns
Project Structure
├── supabase/
│ ├── config.toml # Project configuration
│ ├── migrations/ # Database migrations
│ │ ├── 20240101000000_initial_schema.sql
│ │ └── 20240102000000_add_profiles.sql
│ ├── functions/ # Edge Functions
│ │ ├── hello-world/
│ │ │ └── index.ts
│ │ └── _shared/ # Shared utilities
│ │ └── cors.ts
│ └── seed.sql # Development seed data
├── src/
│ ├── lib/
│ │ └── supabase.ts # Client initialization
│ ├── types/
│ │ └── database.types.ts # Generated types
│ └── ...
└── package.json
Database Schema Example
-- Users profile extension
create table public.profiles (
id uuid references auth.users on delete cascade primary key,
username text unique not null,
full_name text,
avatar_url text,
created_at timestamptz default now() not null,
updated_at timestamptz default now() not null
);
-- Enable RLS
alter table public.profiles enable row level security;
-- RLS Policies
create policy "Public profiles are viewable by everyone"
on public.profiles for select
using (true);
create policy "Users can update their own profile"
on public.profiles for update
using (auth.uid() = id);
-- Trigger for updated_at
create trigger handle_updated_at
before update on public.profiles
for each row execute function moddatetime(updated_at);
Client Initialization
// src/lib/supabase.ts
import { createClient } from '@supabase/supabase-js'
import type { Database } from '@/types/database.types'
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL!
const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
export const supabase = createClient<Database>(
supabaseUrl,
supabaseAnonKey
)
Authentication Patterns
// Sign up with email
const { data, error } = await supabase.auth.signUp({
email: 'user@example.com',
password: 'secure-password',
options: {
data: {
full_name: 'John Doe'
}
}
})
// Sign in with OAuth
const { data, error } = await supabase.auth.signInWithOAuth({
provider: 'google',
options: {
redirectTo: `${window.location.origin}/auth/callback`
}
})
// Get current user
const { data: { user } } = await supabase.auth.getUser()
// Listen to auth changes
supabase.auth.onAuthStateChange((event, session) => {
if (event === 'SIGNED_IN') {
// Handle sign in
}
})
Database Queries
// Select with relations
const { data: posts, error } = await supabase
.from('posts')
.select(`
id,
title,
content,
author:profiles(username, avatar_url),
comments(id, content, created_at)
`)
.eq('published', true)
.order('created_at', { ascending: false })
.range(0, 9)
// Insert with returning
const { data: post, error } = await supabase
.from('posts')
.insert({
title: 'New Post',
content: 'Content here',
author_id: user.id
})
.select()
.single()
// Update with filters
const { error } = await supabase
.from('posts')
.update({ published: true })
.eq('id', postId)
.eq('author_id', user.id)
// Delete with cascade
const { error } = await supabase
.from('posts')
.delete()
.eq('id', postId)
Storage Operations
// Upload file
const { data, error } = await supabase.storage
.from('avatars')
.upload(`${userId}/avatar.png`, file, {
cacheControl: '3600',
upsert: true
})
// Get public URL
const { data: { publicUrl } } = supabase.storage
.from('avatars')
.getPublicUrl(`${userId}/avatar.png`)
// Download file
const { data, error } = await supabase.storage
.from('documents')
.download('report.pdf')
// Create signed URL
const { data, error } = await supabase.storage
.from('private')
.createSignedUrl('file.pdf', 3600)
Realtime Subscriptions
// Subscribe to database changes
const channel = supabase
.channel('posts-changes')
.on(
'postgres_changes',
{
event: '*',
schema: 'public',
table: 'posts',
filter: 'published=eq.true'
},
(payload) => {
console.log('Change:', payload)
}
)
.subscribe()
// Broadcast messages
const channel = supabase.channel('room-1')
channel.subscribe((status) => {
if (status === 'SUBSCRIBED') {
channel.send({
type: 'broadcast',
event: 'cursor',
payload: { x: 100, y: 200 }
})
}
})
// Presence tracking
const channel = supabase.channel('online-users')
channel.on('presence', { event: 'sync' }, () => {
const state = channel.presenceState()
console.log('Online users:', state)
})
channel.subscribe(async (status) => {
if (status === 'SUBSCRIBED') {
await channel.track({ user_id: user.id, online_at: new Date() })
}
})
// Cleanup
supabase.removeChannel(channel)
Edge Function Example
// supabase/functions/send-email/index.ts (Deno 2.1)
import "jsr:@supabase/functions-js/edge-runtime.d.ts"
import { createClient } from 'npm:@supabase/supabase-js@2'
const corsHeaders = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type',
}
Deno.serve(async (req) => {
if (req.method === 'OPTIONS') {
return new Response('ok', { headers: corsHeaders })
}
try {
const supabase = createClient(
Deno.env.get('SUPABASE_URL')!,
Deno.env.get('SUPABASE_SERVICE_ROLE_KEY')!
)
const { email, subject, body } = await req.json()
// Your email sending logic here
return new Response(
JSON.stringify({ success: true }),
{ headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
)
} catch (error) {
return new Response(
JSON.stringify({ error: error.message }),
{ status: 400, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
)
}
})
Edge Function Management API
Use the Management API for programmatic deploys and updates in CI/CD pipelines or automated workflows.
curl -X POST "https://api.supabase.com/v1/projects/{ref}/functions" \
-H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "hello-world", "slug": "hello-world", "verify_jwt": true}'
Best Practices
Security
- Always enable RLS on public tables
- Use service role key only server-side
- Validate inputs in Edge Functions
- Implement proper auth checks
- Use parameterized queries
- Review RLS policies regularly
Performance
- Add indexes for frequently queried columns
- Use
select() to limit returned columns
- Implement pagination with
range()
- Use database functions for complex operations
- Enable connection pooling in production
- Use
head: true for count-only queries
Architecture
- Keep migrations small and focused
- Use database triggers for side effects
- Implement proper error handling
- Generate and use TypeScript types
- Organize Edge Functions by domain
- Use shared utilities in
_shared/
Development Workflow
- Use Supabase CLI for local development; use the dashboard editor and AI assistant for quick prototypes, and rely on the CLI or Management API for production workflows
- Test RLS policies before deployment
- Seed database for consistent testing
- Use branching for schema changes
- Document all RLS policies
Scripts
This skill includes executable scripts in the scripts/ folder:
Project Setup
setup-project.sh: Initialize new Supabase project with configuration
./scripts/setup-project.sh <project-name>
local-dev.sh: Start local Supabase development environment
./scripts/local-dev.sh [--reset]
Database
create-migration.sh: Create a new timestamped migration file
./scripts/create-migration.sh <migration-name>
run-migrations.sh: Apply pending migrations
./scripts/run-migrations.sh [--local|--remote]
seed-database.sh: Seed database with test data
./scripts/seed-database.sh
generate-types.sh: Generate TypeScript types from database schema
./scripts/generate-types.sh [--output PATH]
link-project.sh: Link local project to remote Supabase project
./scripts/link-project.sh <project-ref>
Edge Functions
create-function.sh: Create a new Edge Function with boilerplate
./scripts/create-function.sh <function-name>
deploy-function.sh: Deploy Edge Function to production (supports --no-docker when Docker isn't available)
./scripts/deploy-function.sh <function-name> [--all]
serve-functions.sh: Run Edge Functions locally for testing
./scripts/serve-functions.sh
Testing & Security
setup-testing.sh: Set up testing environment with Vitest
./scripts/setup-testing.sh
run-tests.sh: Run tests with various options
./scripts/run-tests.sh [--watch] [--ui] [--coverage]
test-rls.sh: Test RLS policies with different user contexts
./scripts/test-rls.sh <table-name>
backup-database.sh: Create database backup
./scripts/backup-database.sh [--output PATH]
Templates
This skill includes production-ready templates in the templates/ folder:
Database
- schema-base.sql: Complete base schema with profiles, posts, comments, RLS policies, triggers, and indexes
- rls-policies.sql: Comprehensive RLS policy patterns library (10+ patterns including user-owned, org-based, role-based, time-based, and more)
Client Code
- supabase-client.ts: Type-safe client initialization with browser, server, and admin clients plus utility functions
- auth-helpers.ts: Complete authentication utilities including email/password, OAuth, magic links, phone auth, MFA, and React hooks
- storage-helpers.ts: File upload/download utilities with progress tracking, image compression, bucket management, and React hooks
Edge Functions
- edge-function-complete.ts: Complete Edge Function template with CORS, authentication, validation, error handling, and common patterns (webhooks, scheduled tasks, email, external APIs, rate limiting)
Resources
This skill includes detailed reference guides in the resources/ folder:
- database-patterns.md: Schema design, queries, migrations, and PostgreSQL features
- authentication.md: Auth flows, providers, sessions, and MFA
- row-level-security.md: RLS policy patterns and multi-tenant security
- storage.md: File storage, access control, and transformations
- edge-functions.md: Deno 2.1 runtime, dashboard editor, AI assistant, Management API, deployment, and best practices
- realtime.md: Subscriptions, broadcast, and presence
- client-libraries.md: JavaScript, Python, and other client usage
Specialization: Supabase Full-Stack Development
Version: 2.0
Last Updated: May 2026
1---2name: supabase-developer3description: Expert Supabase development with PostgreSQL, authentication, Row Level Security, Storage, Edge Functions, and Realtime subscriptions4---5
6# Supabase Developer Skill
7
8## Overview
9
10This skill provides comprehensive expertise in building production-ready applications with **Supabase**, the open-source Firebase alternative. It covers database design, authentication, Row Level Security (RLS), file storage, Edge Functions, and real-time subscriptions. Edge Functions now run on Deno 2.1 by default (full rollout August 2025), with local preview available since March 2025.
11
12## Core Capabilities
13
14### Database & PostgreSQL
15- **Schema Design**: Normalized tables with proper relationships and indexes
16- **Migrations**: Version-controlled database changes
17- **Queries**: Complex queries with joins, CTEs, and aggregations
18- **Functions**: PostgreSQL stored procedures and triggers
19- **Extensions**: PostGIS, pg_vector, pgcrypto, and more
20
21### Authentication
22- **Email/Password**: Traditional authentication flow
23- **Magic Links**: Passwordless email authentication
24- **OAuth Providers**: Google, GitHub, Discord, Twitter, and more
25- **Phone Auth**: SMS-based authentication
26- **Multi-Factor Authentication**: TOTP and SMS verification
27- **Session Management**: JWT tokens and refresh handling
28
29### Row Level Security (RLS)
30- **Policy Design**: Secure data access patterns
31- **User-based Access**: Policies tied to authenticated users
32- **Role-based Access**: Custom roles and permissions
33- **Organization-based**: Multi-tenant security patterns
34- **Performance**: Optimized RLS with proper indexing
35
36### Storage
37- **File Uploads**: Direct and resumable uploads
38- **Access Control**: Bucket policies and RLS integration
39- **Transformations**: Image resizing and optimization
40- **CDN**: Global content delivery
41- **Signed URLs**: Temporary access tokens
42
43### Edge Functions
44- **Deno 2.1 Runtime**: TypeScript/JavaScript edge computing with seamless npm imports, native TypeScript support, Web API compatibility, and better performance
45- **Dashboard Editor**: In-dashboard Edge Functions editor for quick updates and prototyping
46- **AI Assistant**: Built-in AI assistant for generating function code
47- **API Routes**: Custom backend logic
48- **Webhooks**: Event-driven integrations
49- **Scheduled Tasks**: Cron-based functions (pg_cron)
50- **Third-party APIs**: External service integrations
51- **No-Docker Deploy**: Deploy with `supabase functions deploy --no-docker` when Docker isn't available
52
53### Realtime
54- **Database Changes**: Listen to INSERT, UPDATE, DELETE
55- **Broadcast**: Publish messages to channels
56- **Presence**: Track online users and state
57- **Postgres Changes**: Row-level change subscriptions
58
59## Implementation Patterns
60
61### Project Structure
62```
63├── supabase/
64│ ├── config.toml # Project configuration
65│ ├── migrations/ # Database migrations
66│ │ ├── 20240101000000_initial_schema.sql
67│ │ └── 20240102000000_add_profiles.sql
68│ ├── functions/ # Edge Functions
69│ │ ├── hello-world/
70│ │ │ └── index.ts
71│ │ └── _shared/ # Shared utilities
72│ │ └── cors.ts
73│ └── seed.sql # Development seed data
74├── src/
75│ ├── lib/
76│ │ └── supabase.ts # Client initialization
77│ ├── types/
78│ │ └── database.types.ts # Generated types
79│ └── ...
80└── package.json
81```
82
83### Database Schema Example
84
85```sql
86-- Users profile extension
87create table public.profiles (
88 id uuid references auth.users on delete cascade primary key,
89 username text unique not null,
90 full_name text,
91 avatar_url text,
92 created_at timestamptz default now() not null,
93 updated_at timestamptz default now() not null
94);
95
96-- Enable RLS
97alter table public.profiles enable row level security;
98
99-- RLS Policies
100create policy "Public profiles are viewable by everyone"
101 on public.profiles for select
102 using (true);
103
104create policy "Users can update their own profile"
105 on public.profiles for update
106 using (auth.uid() = id);
107
108-- Trigger for updated_at
109create trigger handle_updated_at
110 before update on public.profiles
111 for each row execute function moddatetime(updated_at);
112```
113
114### Client Initialization
115
116```typescript
117// src/lib/supabase.ts
118import { createClient } from '@supabase/supabase-js'
119import type { Database } from '@/types/database.types'
120
121const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL!
122const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
123
124export const supabase = createClient<Database>(
125 supabaseUrl,
126 supabaseAnonKey
127)
128```
129
130### Authentication Patterns
131
132```typescript
133// Sign up with email
134const { data, error } = await supabase.auth.signUp({
135 email: 'user@example.com',
136 password: 'secure-password',
137 options: {
138 data: {
139 full_name: 'John Doe'
140 }
141 }
142})
143
144// Sign in with OAuth
145const { data, error } = await supabase.auth.signInWithOAuth({
146 provider: 'google',
147 options: {
148 redirectTo: `${window.location.origin}/auth/callback`
149 }
150})
151
152// Get current user
153const { data: { user } } = await supabase.auth.getUser()
154
155// Listen to auth changes
156supabase.auth.onAuthStateChange((event, session) => {
157 if (event === 'SIGNED_IN') {
158 // Handle sign in
159 }
160})
161```
162
163### Database Queries
164
165```typescript
166// Select with relations
167const { data: posts, error } = await supabase
168 .from('posts')
169 .select(`
170 id,
171 title,
172 content,
173 author:profiles(username, avatar_url),
174 comments(id, content, created_at)
175 `)
176 .eq('published', true)
177 .order('created_at', { ascending: false })
178 .range(0, 9)
179
180// Insert with returning
181const { data: post, error } = await supabase
182 .from('posts')
183 .insert({
184 title: 'New Post',
185 content: 'Content here',
186 author_id: user.id
187 })
188 .select()
189 .single()
190
191// Update with filters
192const { error } = await supabase
193 .from('posts')
194 .update({ published: true })
195 .eq('id', postId)
196 .eq('author_id', user.id)
197
198// Delete with cascade
199const { error } = await supabase
200 .from('posts')
201 .delete()
202 .eq('id', postId)
203```
204
205### Storage Operations
206
207```typescript
208// Upload file
209const { data, error } = await supabase.storage
210 .from('avatars')
211 .upload(`${userId}/avatar.png`, file, {
212 cacheControl: '3600',
213 upsert: true
214 })
215
216// Get public URL
217const { data: { publicUrl } } = supabase.storage
218 .from('avatars')
219 .getPublicUrl(`${userId}/avatar.png`)
220
221// Download file
222const { data, error } = await supabase.storage
223 .from('documents')
224 .download('report.pdf')
225
226// Create signed URL
227const { data, error } = await supabase.storage
228 .from('private')
229 .createSignedUrl('file.pdf', 3600)
230```
231
232### Realtime Subscriptions
233
234```typescript
235// Subscribe to database changes
236const channel = supabase
237 .channel('posts-changes')
238 .on(
239 'postgres_changes',
240 {
241 event: '*',
242 schema: 'public',
243 table: 'posts',
244 filter: 'published=eq.true'
245 },
246 (payload) => {
247 console.log('Change:', payload)
248 }
249 )
250 .subscribe()
251
252// Broadcast messages
253const channel = supabase.channel('room-1')
254channel.subscribe((status) => {
255 if (status === 'SUBSCRIBED') {
256 channel.send({
257 type: 'broadcast',
258 event: 'cursor',
259 payload: { x: 100, y: 200 }
260 })
261 }
262})
263
264// Presence tracking
265const channel = supabase.channel('online-users')
266channel.on('presence', { event: 'sync' }, () => {
267 const state = channel.presenceState()
268 console.log('Online users:', state)
269})
270channel.subscribe(async (status) => {
271 if (status === 'SUBSCRIBED') {
272 await channel.track({ user_id: user.id, online_at: new Date() })
273 }
274})
275
276// Cleanup
277supabase.removeChannel(channel)
278```
279
280### Edge Function Example
281
282```typescript
283// supabase/functions/send-email/index.ts (Deno 2.1)
284import "jsr:@supabase/functions-js/edge-runtime.d.ts"
285import { createClient } from 'npm:@supabase/supabase-js@2'
286
287const corsHeaders = {
288 'Access-Control-Allow-Origin': '*',
289 'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type',
290}
291
292Deno.serve(async (req) => {
293 if (req.method === 'OPTIONS') {
294 return new Response('ok', { headers: corsHeaders })
295 }
296
297 try {
298 const supabase = createClient(
299 Deno.env.get('SUPABASE_URL')!,
300 Deno.env.get('SUPABASE_SERVICE_ROLE_KEY')!
301 )
302
303 const { email, subject, body } = await req.json()
304
305 // Your email sending logic here
306
307 return new Response(
308 JSON.stringify({ success: true }),
309 { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
310 )
311 } catch (error) {
312 return new Response(
313 JSON.stringify({ error: error.message }),
314 { status: 400, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
315 )
316 }
317})
318```
319
320### Edge Function Management API
321
322Use the Management API for programmatic deploys and updates in CI/CD pipelines or automated workflows.
323
324```bash
325curl -X POST "https://api.supabase.com/v1/projects/{ref}/functions" \
326 -H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN" \
327 -H "Content-Type: application/json" \
328 -d '{"name": "hello-world", "slug": "hello-world", "verify_jwt": true}'
329```
330
331## Best Practices
332
333### Security
334- Always enable RLS on public tables
335- Use service role key only server-side
336- Validate inputs in Edge Functions
337- Implement proper auth checks
338- Use parameterized queries
339- Review RLS policies regularly
340
341### Performance
342- Add indexes for frequently queried columns
343- Use `select()` to limit returned columns
344- Implement pagination with `range()`
345- Use database functions for complex operations
346- Enable connection pooling in production
347- Use `head: true` for count-only queries
348
349### Architecture
350- Keep migrations small and focused
351- Use database triggers for side effects
352- Implement proper error handling
353- Generate and use TypeScript types
354- Organize Edge Functions by domain
355- Use shared utilities in `_shared/`
356
357### Development Workflow
358- Use Supabase CLI for local development; use the dashboard editor and AI assistant for quick prototypes, and rely on the CLI or Management API for production workflows
359- Test RLS policies before deployment
360- Seed database for consistent testing
361- Use branching for schema changes
362- Document all RLS policies
363
364## Scripts
365
366This skill includes executable scripts in the `scripts/` folder:
367
368### Project Setup
369- **setup-project.sh**: Initialize new Supabase project with configuration
370 ```bash
371 ./scripts/setup-project.sh <project-name>
372 ```
373
374- **local-dev.sh**: Start local Supabase development environment
375 ```bash
376 ./scripts/local-dev.sh [--reset]
377 ```
378
379### Database
380- **create-migration.sh**: Create a new timestamped migration file
381 ```bash
382 ./scripts/create-migration.sh <migration-name>
383 ```
384
385- **run-migrations.sh**: Apply pending migrations
386 ```bash
387 ./scripts/run-migrations.sh [--local|--remote]
388 ```
389
390- **seed-database.sh**: Seed database with test data
391 ```bash
392 ./scripts/seed-database.sh
393 ```
394
395- **generate-types.sh**: Generate TypeScript types from database schema
396 ```bash
397 ./scripts/generate-types.sh [--output PATH]
398 ```
399
400- **link-project.sh**: Link local project to remote Supabase project
401 ```bash
402 ./scripts/link-project.sh <project-ref>
403 ```
404
405### Edge Functions
406- **create-function.sh**: Create a new Edge Function with boilerplate
407 ```bash
408 ./scripts/create-function.sh <function-name>
409 ```
410
411- **deploy-function.sh**: Deploy Edge Function to production (supports `--no-docker` when Docker isn't available)
412 ```bash
413 ./scripts/deploy-function.sh <function-name> [--all]
414 ```
415
416- **serve-functions.sh**: Run Edge Functions locally for testing
417 ```bash
418 ./scripts/serve-functions.sh
419 ```
420
421### Testing & Security
422- **setup-testing.sh**: Set up testing environment with Vitest
423 ```bash
424 ./scripts/setup-testing.sh
425 ```
426
427- **run-tests.sh**: Run tests with various options
428 ```bash
429 ./scripts/run-tests.sh [--watch] [--ui] [--coverage]
430 ```
431
432- **test-rls.sh**: Test RLS policies with different user contexts
433 ```bash
434 ./scripts/test-rls.sh <table-name>
435 ```
436
437- **backup-database.sh**: Create database backup
438 ```bash
439 ./scripts/backup-database.sh [--output PATH]
440 ```
441
442## Templates
443
444This skill includes production-ready templates in the `templates/` folder:
445
446### Database
447- **schema-base.sql**: Complete base schema with profiles, posts, comments, RLS policies, triggers, and indexes
448- **rls-policies.sql**: Comprehensive RLS policy patterns library (10+ patterns including user-owned, org-based, role-based, time-based, and more)
449
450### Client Code
451- **supabase-client.ts**: Type-safe client initialization with browser, server, and admin clients plus utility functions
452- **auth-helpers.ts**: Complete authentication utilities including email/password, OAuth, magic links, phone auth, MFA, and React hooks
453- **storage-helpers.ts**: File upload/download utilities with progress tracking, image compression, bucket management, and React hooks
454
455### Edge Functions
456- **edge-function-complete.ts**: Complete Edge Function template with CORS, authentication, validation, error handling, and common patterns (webhooks, scheduled tasks, email, external APIs, rate limiting)
457
458## Resources
459
460This skill includes detailed reference guides in the `resources/` folder:
461
462- **database-patterns.md**: Schema design, queries, migrations, and PostgreSQL features
463- **authentication.md**: Auth flows, providers, sessions, and MFA
464- **row-level-security.md**: RLS policy patterns and multi-tenant security
465- **storage.md**: File storage, access control, and transformations
466- **edge-functions.md**: Deno 2.1 runtime, dashboard editor, AI assistant, Management API, deployment, and best practices
467- **realtime.md**: Subscriptions, broadcast, and presence
468- **client-libraries.md**: JavaScript, Python, and other client usage
469
470---
471
472**Specialization**: Supabase Full-Stack Development
473**Version**: 2.0
474**Last Updated**: May 2026