Skip to content
YYUML
Official MaintainerL1 · Low RiskMIT

Supabase Postgres Best Practices

Maintained by supabase/agent-skills ↗·Updated Nov 26, 2026

Production Postgres schema design, Row-Level Security (RLS) policies, indexing, and Supabase Edge Function guidelines.

Source Repo ↗
Universal Skills CLI (skills.sh)CLI
$ npx skills add supabase/agent-skills

Sample Trigger Prompts

“Review our Postgres migrations for missing foreign-key indexes and slow RLS policy subqueries.”

“Design a multi-tenant Supabase schema with strict Row-Level Security policies.”

Overview

Most Supabase production incidents stem from slow Row-Level Security (RLS) predicates, missing composite indexes, or leaky service-role keys. supabase-postgres-best-practices embeds Supabase’s own Postgres optimization playbook directly into your coding agent.

Key Capabilities

  • RLS Performance & Safety: Wraps auth.uid() calls in (select auth.uid()) for initPlan caching and verifies every public table enables RLS.
  • Indexing & Query Plans: Guides partial indexes, GIN indexes for JSONB/full-text search, and N+1 elimination.
  • Pooling & Auth Hygiene: Distinguishes Supavisor transaction pooling ports from direct migration connections and keeps service_role keys server-only.

Best Paired With

More in Cloud, Infra & APIs

Browse category →

Cloudflare Platform

cloudflare/skills

Official Cloudflare skills for Workers, Durable Objects, D1, R2, KV, Workers AI, Vectorize, and Pages deployment.

Claude Code · Cursor +3·FS: Write, Shell Exec

$ npx skills add cloudflare/skills

Stripe Best Practices

stripe/ai

Official Stripe integration skill covering Checkout, PaymentIntents, webhook signature verification, and Billing APIs.

Claude Code · Cursor +3·Prompt-Only, FS: Write

$ npx skills add stripe/ai

Try keywords like directing-stickman-videos, MCP, Cloudflare, Playwright, or L1 Low.