What problem does it solve? Slow queries, missing indexes, connection exhaustion, and insecure Row-Level Security policies are common Postgres issues that are hard to diagnose without deep expertise. This Skill gives AI agents a structured, prioritized rule set so generated or reviewed SQL follows proven performance and security practices. ## Core Features & Use Cases - Prioritized Rule Library: 20+ 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., "100-1000x faster queries", "10x smaller index"). - Supabase-Specific Guidance: Covers RLS policy optimization, SECURITY DEFINER functions, connection pooling modes, and prepared statement behavior with Supabase's pooler. - Use Case: When asked to review a slow endpoint, the agent consults rules like query-missing-indexes, data-n-plus-one, and security-rls-performance to rewrite the query with proper indexes, batch loading, and cached RLS checks. ## Quick Start Ask the agent to review your Postgres query or schema design for performance and security issues using the Supabase best practices rules.