What problem does it solve? Working with PostgreSQL involves many pitfalls: slow queries, bloated tables, connection exhaustion, XID wraparound, and misconfigured backups. This Skill gives an AI assistant structured, expert-level PostgreSQL guidance so it can diagnose performance issues, design sound schemas, and advise on operations without guesswork. ## Core Features & Use Cases - Schema and Index Guidance: Covers primary key selection, data types, foreign keys, composite/partial/covering indexes, and audits for unused, duplicate, invalid, or bloated indexes. - Query Optimization: Identifies SQL anti-patterns such as N+1 queries, OFFSET pagination, and non-SARGable filters, with rewritten alternatives. - Operations and Internals: Explains MVCC, VACUUM/autovacuum tuning, WAL and checkpoints, replication, backup/PITR, memory management, partitioning, and monitoring via pg_stat views. - PlanetScale-Specific Workflows: Includes PgBouncer pooling configuration, pscale CLI commands, query insights, and supported extensions for PlanetScale-hosted Postgres. - Use Case: When a user reports a slow dashboard query, the assistant can check pg_stat_statements, detect a missing index from a high rows_read/rows_returned ratio, and propose a composite index with EXPLAIN ANALYZE verification. ## Quick Start Ask the assistant to review your slow PostgreSQL query and suggest indexes or rewrites based on Postgres best practices.