What problem does it solve? Writing efficient and secure PostgreSQL requires knowing which index types, data types, and query patterns to use, and mistakes like missing indexes or wrong types cause slow queries and production issues. This Skill gives you a quick-reference guide of proven PostgreSQL patterns based on Supabase best practices. ## Core Features & Use Cases - Index Selection Guide: Cheat sheet mapping query patterns to the right index type (B-tree, GIN, BRIN, composite, partial, covering). - Data Type & Schema Guidance: Correct type choices for IDs, strings, timestamps, money, and flags, plus RLS policy and UPSERT patterns. - Anti-Pattern Detection: Ready-to-run SQL queries 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 this Skill to identify the right composite index order (equality columns first, then range columns) and verify the fix with pg_stat_statements. ## Quick Start Ask the agent to review your PostgreSQL query or schema and suggest the right index and data types using the postgres-patterns reference.