| name | supabase |
| description | Supabase Auth, Realtime subscriptions, Edge Functions, Row Level Security, and Storage |
| layer | domain |
| category | database |
| triggers | ["supabase","supabase auth","supabase realtime","edge functions","row level security","RLS","supabase storage"] |
| inputs | [{"requirements":"Auth, database, realtime, storage, or edge function needs"},{"framework":"Next.js | React | SvelteKit (optional)"},{"auth_providers":"Email, OAuth, magic link, phone (optional)"}] |
| outputs | [{"client_setup":"Supabase client configuration"},{"rls_policies":"Row Level Security policy definitions"},{"auth_flow":"Authentication implementation"},{"realtime_subscriptions":"Real-time data subscription setup"},{"edge_functions":"Deno-based edge function implementations"}] |
| linksTo | ["postgresql","authentication","nextjs","react"] |
| linkedFrom | ["cook","authentication","data-modeling"] |
| preferredNextSkills | ["postgresql","authentication"] |
| fallbackSkills | ["postgresql"] |
| riskLevel | medium |
| memoryReadPolicy | selective |
| memoryWritePolicy | none |
| sideEffects | ["May create database tables and RLS policies","May configure auth providers","May deploy edge functions"] |
Supabase Skill
Purpose
Build applications with Supabase as the backend platform. This skill covers authentication (email, OAuth, magic link), database access with Row Level Security, real-time subscriptions, file storage, and Edge Functions. Supabase is an open-source Firebase alternative built on PostgreSQL.
Key Concepts
Supabase Architecture
CLIENT (browser/app)
|
v
SUPABASE CLIENT SDK
|
+-- Auth -> GoTrue (JWT-based authentication)
+-- Database -> PostgREST (auto-generated REST API from PostgreSQL)
+-- Realtime -> Realtime server (WebSocket subscriptions)
+-- Storage -> S3-compatible object storage with RLS
+-- Functions -> Deno Edge Functions
SECURITY MODEL:
- Every request carries a JWT (from Auth)
- PostgREST passes JWT claims to PostgreSQL
- RLS policies use auth.uid() to check ownership
- Client can ONLY access data that RLS policies allow
Patterns
Client Setup
import { createBrowserClient } from '@supabase/ssr';
export function createClient() {
return createBrowserClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
);
}
import { createServerClient } from '@supabase/ssr';
import { cookies } from 'next/headers';
export async function createServerSupabaseClient() {
const cookieStore = await cookies();
return createServerClient(
process..!,
process..!,
{
: {
() { cookieStore.(); },
() {
cookiesToSet.( {
cookieStore.(name, value, options);
});
},
},
},
);
}