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 unindexed foreign keys or OFFSET pagination cause slow queries and bloated tables. ## Core Features & Use Cases - Index Selection Guide: Cheat sheet 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 designing a new orders table, use the composite index ordering rule (equality columns first, then range columns) and the data type reference to pick bigint IDs and timestamptz timestamps. ## Quick Start Ask the agent to review your SQL migration or slow query using the postgres-patterns skill and suggest the right indexes and data types.