What problem does it solve? Slow queries, insecure tables, connection exhaustion, and risky migrations are the most common failure modes in Supabase and Postgres projects. This Skill provides a distilled, prioritized rulebook so engineers write performant SQL, secure RLS policies, and zero-downtime migrations from the start instead of debugging production incidents later. ## Core Features & Use Cases - Query Performance Rules: Indexing strategies (composite, partial, covering, expression indexes), keyset pagination, and EXPLAIN (ANALYZE, BUFFERS) diagnostics for slow queries. - Security & RLS Patterns: Performant row-level security using initPlan subselects, indexed policy columns, SECURITY DEFINER helpers, and pinned search_path for functions. - Safe Migrations & Connection Management: Zero-downtime migration playbooks (CONCURRENTLY, NOT VALID constraints, expand/contract), Supavisor transaction-mode pooling for serverless, and statement timeouts. - Use Case: A developer writing a new migration for a multi-tenant Supabase app uses this Skill to add RLS policies with (SELECT auth.uid()), index the tenant FK, create indexes CONCURRENTLY, and validate the query plan before merging. ## Quick Start Review my Supabase migration and RLS policies for performance and security issues using the Postgres best practices checklist.