What problem does it solve? Writing efficient Postgres queries, schemas, and configurations is error-prone, and common mistakes like missing indexes, unbounded connections, or poorly written RLS policies cause severe performance degradation. This Skill gives AI agents and developers a prioritized, example-driven rule set for optimizing Postgres and Supabase databases. ## Core Features & Use Cases - Prioritized Rule Catalog: 30+ rules across 8 categories (query performance, connection management, security & RLS, schema design, locking, data access, monitoring, advanced features) 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 with proper indexes). - Supabase-Specific Guidance: Covers Row Level Security policies, connection pooling modes, prepared statement handling, and auth-aware patterns. - Use Case: When reviewing a slow query like select * from orders where customer_id = 123, the Skill directs you to add an index on the filtered column and verify with EXPLAIN ANALYZE. ## Quick Start Ask the agent to review your Postgres query or schema design using the postgres-best-practices rules and suggest optimized SQL.