What problem does it solve? Slow queries, missing indexes, connection exhaustion, and poorly written RLS policies are the most common causes of Postgres performance issues, and diagnosing them requires deep database expertise. This Skill gives you a prioritized, rule-based reference so you can write, review, and optimize Postgres SQL correctly the first time. ## Core Features & Use Cases - Prioritized Rule Set: 30+ optimization rules organized into 8 categories ranked by impact, from critical query performance and connection management to advanced JSONB indexing and full-text search. - Incorrect vs. Correct SQL Examples: Every rule shows a failing pattern alongside the optimized version, with EXPLAIN output and quantified impact (e.g., 100-1000x faster queries with proper indexes). - Supabase-Specific Guidance: Covers Row Level Security policy optimization, connection pooling modes, and auth.uid() performance patterns specific to Supabase deployments. - Use Case: When reviewing a slow endpoint, consult the query performance rules to identify missing indexes, then apply composite or partial index patterns and verify with EXPLAIN ANALYZE. ## Quick Start Ask the AI to review your SQL query or schema design against Postgres best practices and suggest optimizations.