What problem does it solve? Slow queries, missing indexes, connection exhaustion, and misconfigured Row-Level Security are common Postgres issues that are hard to diagnose without deep expertise. This Skill gives an AI assistant a structured, prioritized rulebook of Postgres best practices so it can write, review, and optimize SQL correctly the first time. ## Core Features & Use Cases - Prioritized Rule Library: 25+ rules across 8 categories (query performance, connection management, security/RLS, schema design, locking, data access, monitoring, advanced features), each ranked by impact from CRITICAL to LOW. - Incorrect vs. Correct SQL Examples: Every rule shows the anti-pattern first, then the optimized rewrite, with quantified impact (e.g., 100x faster with proper indexes, 10x throughput with SKIP LOCKED). - Supabase-Specific Guidance: Covers RLS policy optimization, connection pooling modes, prepared statement behavior with poolers, and auth-aware policies. - Use Case: Ask the assistant to review a slow query on a multi-tenant orders table; it applies rules like adding composite indexes, wrapping auth.uid() in a subselect for RLS performance, and switching OFFSET pagination to cursor-based pagination. ## Quick Start Ask the assistant to review and optimize your Postgres query or schema design using the Supabase best practices rules.