What problem does it solve? Writing efficient PostgreSQL queries and schemas requires knowing which index types, data types, and query patterns to use, and mistakes like missing indexes or unoptimized RLS policies cause slow queries and security gaps. ## Core Features & Use Cases - Index Selection Guide: Cheat sheets mapping query patterns to B-tree, GIN, BRIN, composite, covering, and partial indexes. - Query Pattern Library: Ready-to-use SQL for UPSERT, cursor pagination, queue processing with SKIP LOCKED, and optimized RLS policies. - Anti-Pattern Detection: Diagnostic queries to find unindexed foreign keys, slow queries via pg_stat_statements, and table bloat. - Use Case: When writing a Supabase migration, consult this Skill to choose the correct data types (timestamptz, bigint, numeric), add the right indexes, and write RLS policies that avoid per-row function re-evaluation. ## Quick Start Ask the AI to review your SQL migration or query using the PostgreSQL patterns skill to check indexing, data types, and RLS policy correctness.