$ skilldirectory
— zsh — registry.skilldirectory.dev
skill library blog

home / Database / PostgreSQL Table Design Skill by @wshobson

PostgreSQL Table Design Skill by @wshobson

FREE
github stars★ 42,243updatedSep 2026repo@wshobson
$git clone https://github.com/wshobson/agents

The skill is the plugins/database-design/skills/postgresql-table-design folder inside that repository. Copy it into the folder your agent loads skills from; check your agent's documentation for where that is.

Read the opening of the original SKILL.md
# PostgreSQL Table Design

## When to Use

- Designing a new PostgreSQL schema, or reviewing one before it ships.
- Choosing column types, keys, constraints, or indexes for PostgreSQL specifically.
- Deciding whether and how to partition a large table, or how to store semi-structured data.
- Planning a schema change on a live database without downtime.

The rules and decision points for a PostgreSQL schema. The full data-type catalog, workload
patterns (update-heavy, insert-heavy, upsert, schema evolution), extensions, JSONB indexing,
and worked DDL examples are in `references/details.md`; open it when a section below points there.

## Core Rules

- Define a **PRIMARY KEY** for reference tables (users, orders, etc.). Not always needed for time-series/event/log data. When used, prefer `BIGINT GENERATED ALWAYS AS IDENTITY`; use `UUID` only when global uniqueness/opacity is needed.
…

Excerpt only, quoted from the author's repository. Open the repository for the complete file.