supabase-sdk-patterns

Installation
SKILL.md

Supabase SDK Patterns

Overview

Production patterns for @supabase/supabase-js v2 and supabase-py, where every call returns { data, error } and success is never assumed. Covers client initialization, CRUD with filters, auth, realtime, storage, and RPC, with Python equivalents for the query patterns.

Prerequisites

  • Supabase project with URL and anon key (or service role key for server-side)
  • @supabase/supabase-js v2 installed (TypeScript) or supabase pip 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 — a singleton preserves the auth session and connection pool.

Installs
30
GitHub Stars
2.8K
First Seen
Jan 24, 2026