What problem does it solve? Writing efficient PostgreSQL queries and schemas requires knowing which index types, data types, and patterns fit each situation, and mistakes like unindexed foreign keys or OFFSET pagination cause slow queries and bloated tables. ## Core Features & Use Cases - Index and Data Type Cheat Sheets: Quick-reference tables mapping query patterns to the right index type (B-tree, GIN, BRIN) and use cases to correct column types (timestamptz, numeric, bigint). - Ready-to-Use SQL Patterns: Copy-paste examples for composite and partial indexes, optimized RLS policies, UPSERT, cursor pagination, and SKIP LOCKED queue processing. - Anti-Pattern Detection Queries: Diagnostic SQL to find unindexed foreign keys, slow queries via pg_stat_statements, and table bloat. - Use Case: When a query on your orders table is slow, use the index cheat sheet to add a composite index on (status, created_at) and verify the fix with the slow-query detection query. ## Quick Start Ask the assistant to review your PostgreSQL query or schema using the postgres-patterns skill and suggest the right indexes and data types.