wshobson/agents

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features

All-time #1060 Trending #2651 First seen Jan 20, 2026
8-week activity · all time api

Installation

$ npx skills add https://github.com/wshobson/agents
Feature your product here Skill page unit · reach builders installing agent skills View pricing →

Summary

  • PostgreSQL schema design covering best practices, data types, indexing, constraints, and performance patterns.
  • Prioritize normalization to 3NF; denormalize only when join performance is proven problematic and measured for ROI.
  • Use BIGINT GENERATED ALWAYS AS IDENTITY for primary keys unless global uniqueness or opacity requires UUID ; always add indexes on foreign key columns.
  • Choose data types carefully: TIMESTAMPTZ for events, NUMERIC for money, TEXT for strings, JSONB for semi-structured data; avoid TIMESTAMP , VARCHAR(n) , SERIAL , and MONEY type.
  • Index strategically for actual query patterns: B-tree for equality/range, GIN for JSONB/arrays/full-text, GiST for ranges/geometry, BRIN for large time-series data.
  • Partition tables >100M rows by range (time) or hash; use TimescaleDB for time-series automation; separate hot/cold columns and minimize indexes for insert-heavy workloads.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from wshobson/agents · top by installs.

npx skills add https://github.com/wshobson/agents

Browse all from wshobson/agents

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 39.5K
License LICENSE
Default branch main
Open issues 4
Status Active

History

  1. First seen on skills.sh
  2. First recorded snapshot · 25,100 installs