
Postgres Schema Design
You're getting help designing PostgreSQL schemas through structured prompts. This comes from davila7's template collection, which has a solid 27.7K stars and 233 installs so far. There's no SKILL.md in the repo, so you're working with whatever prompt patterns they've set up for table design, relationships, indexes, and constraints. Useful when you're starting a new project or refactoring an existing schema and want Claude to guide you through normalization, data types, and foreign key decisions. It won't replace knowing Postgres, but it'll save you from forgetting the basics or making obvious mistakes with indexes.
- skills.sh installs
- 248
- GitHub stars
- 33.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add davila7/claude-code-templates --skill postgres-schema-design --agent claude-codeInstalls into .claude/skills of the current project.
Files
PostgreSQL Table Design
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; useUUIDonly when global uniqueness/opacity is needed. - Normalize first (to 3NF) to eliminate data redundancy and update anomalies; denormalize only for measured, high-ROI reads where join performance is proven problematic. Premature denormalization creates maintenance burden.
- Add NOT NULL everywhere it’s semantically required; use DEFAULTs for common values.
- Create indexes for access paths you actually query: PK/unique (auto), FK columns (manual!), frequent filters/sorts, and join keys.
- Prefer TIMESTAMPTZ for event time; NUMERIC for money; TEXT for strings; BIGINT for integer values, DOUBLE PRECISION for floats (or
NUMERICfor exact decimal arithmetic).
PostgreSQL “Gotchas”
Sponsors
Promote your product hereReach 125k+ visitors monthlyPromote your product hereReach 125k+ visitors monthly
Agent CaffeineSponsoredClose your lid, come back to finished work
SnugSponsoredThe clipboard manager for the AI eraPromote your product hereReach 125k+ visitors monthly
WaxSponsoredBlock anything with supervision, without erasing your iPhonePromote your product hereReach 125k+ visitors monthly
knobsSponsoredSee your site on any phone, any day, in any language
Details
- Repository
- github.com/davila7/claude-code-templates
- Categories
- Design & UI/UX, Databases
- First seen
- Jun 3, 2026
More from davila7/claude-code-templates
All 618- Obsidian Clipper Template Creator247
- Test Fixing247
- Dask246
- Denario246
- Ensembl Database246
- Security Best Practices246
- Doc Coauthoring245
- Graphql245
- Iterate Pr245
- Playwright E2e Builder245
- Adaptyv242
- Medchem241
- Personal Tool Builder241
- Zarr Python239
- Cobrapy238
- Pylabrobot238
- Qutip237
- Torchdrug237
- Template Skill236
- Deployment Procedures235
- Gcp Cloud Run235
- Gepetto234
- Qiskit234
- Pysam233
Recommended
More Design & UI/UX2
arco-designarco-design/arco-design-skillArco Design React UI component library reference (@arco-design/web-react). Use this skill whenever the user asks to build a page, create a UI, write frontend co229skills.sh installs
3
opc-business-model-designeasychen/opc-methodologyDesign a viable business model for a one-person company using Lean Canvas and a simplified Business Model Canvas. Use when Codex needs to explain the business-m226skills.sh installs
4
hwc-ux-feedbackthehotwireclub/hotwire_club-skillsImplement cross-cutting Hotwire UX feedback patterns: loading states, busy indicators, progress bars, optimistic UI, render interception, and view/page transiti225skills.sh installs
6
system-designqodex-ai/ai-agent-skillsDesign and architect software systems. Plans system components, interactions, and deployment patterns for scalability and maintainability.217skills.sh installs