What problem does it solve? Slow queries, missing indexes, connection exhaustion, and insecure Row Level Security policies are common Postgres issues that degrade application performance and reliability. This Skill provides a prioritized, example-driven rule set so you can write, review, and optimize Postgres code correctly the first time. ## Core Features & Use Cases - Query Performance Rules: Guidance on missing indexes, composite indexes, covering indexes, partial indexes, and choosing the right index type (B-tree, GIN, BRIN, Hash). - Connection & Security Best Practices: Connection pooling, prepared statement handling, idle timeouts, least-privilege roles, and RLS policy optimization. - Schema & Data Patterns: Data type selection, primary key strategy, foreign key indexing, partitioning, batch inserts, upserts, cursor pagination, and N+1 elimination. - Use Case: While writing a Drizzle ORM migration for a multi-tenant app, consult the RLS and foreign key indexing rules to add proper indexes and performant security policies before deploying. ## Quick Start Ask the AI to review your SQL query or schema design against the Supabase Postgres best practices and suggest optimizations.