supabase-sdk-patterns
Installation
SKILL.md
Supabase SDK Patterns
Overview
Production patterns for @supabase/supabase-js v2 and supabase-py. Every Supabase query returns { data, error } — never assume success. This skill covers client initialization, CRUD with filters, auth, realtime subscriptions, storage, RPC, and the Python equivalent for each pattern.
Prerequisites
- Supabase project with URL and anon key (or service role key for server-side)
@supabase/supabase-jsv2 installed (TypeScript) orsupabasepip package (Python)- TypeScript projects: generated database types via
supabase gen types typescript
Instructions
Step 1: Initialize a Typed Singleton Client
Create one client instance and reuse it. Never call createClient per-request.
Related skills