What problem does it solve? Designing a PostgreSQL schema involves many version-specific decisions—choosing between identity columns and UUIDs, picking the right index type, avoiding types like timestamp or serial—and mistakes lead to slow queries, bloated tables, and painful migrations. This Skill encodes PostgreSQL best practices so schemas are correct and performant from the start. ## Core Features & Use Cases - Schema Design Guidance: Covers primary keys, normalization to 3NF, NOT NULL/DEFAULT usage, and correct data type selection (TIMESTAMPTZ, NUMERIC, TEXT, BIGINT, JSONB). - Indexing & Performance Patterns: Explains B-tree, GIN, GiST, BRIN, partial, covering, and expression indexes, plus partitioning strategies and update/insert-heavy workload tuning. - PostgreSQL Gotcha Detection: Flags common pitfalls such as unindexed foreign keys, UNIQUE with multiple NULLs, volatile defaults causing table rewrites, and discouraged types like money and varchar(n). - Use Case: When creating a new orders table, apply this Skill to get an identity primary key, an indexed foreign key to users, a CHECK-constrained status column, and a TIMESTAMPTZ created_at with proper defaults. ## Quick Start Ask the AI to design a PostgreSQL schema for your entities, or paste an existing CREATE TABLE statement and request a review against PostgreSQL best practices.