What problem does it solve? Postgres databases often suffer from slow queries, connection exhaustion, missing indexes, and insecure Row-Level Security configurations. This Skill gives AI agents a structured, prioritized rule set so they can write, review, and optimize SQL correctly the first time instead of guessing at performance fixes. ## Core Features & Use Cases - Prioritized Rule Categories: 8 categories ranked by impact, from critical query performance and connection management to advanced features like full-text search and JSONB indexing. - Error-First SQL Examples: Each rule shows an incorrect pattern with explanation, then the correct SQL rewrite with quantified impact (e.g., 10-100x faster queries, 50% smaller indexes). - Supabase-Specific Guidance: Covers RLS policy optimization, connection pooling modes, prepared statement handling, and pg_stat_statements monitoring. - Use Case: When an agent writes a migration adding a foreign key, it consults the schema rules and automatically adds the required index, avoiding slow JOINs and table-locking CASCADE deletes. ## Quick Start Ask the agent to review your SQL schema or slow query using the Supabase Postgres best practices and suggest optimized rewrites.