Skip to main content
skill

postgresql · davila7 — Claude Code skill: what it does, how to install

Guides table schema design for PostgreSQL, emphasizing strict data types, indexing for foreign keys, and engine-specific storage nuances.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill database/postgresql
Open on GitHub

What postgresql does

This skill guides PostgreSQL schema modeling from first principles. It enforces third normal form before any read-oriented denormalization. For primary keys, it favors BIGINT GENERATED ALWAYS AS IDENTITY. It points users toward NUMERIC for currency, TIMESTAMPTZ for timestamps, and standard TEXT with length constraints instead of VARCHAR(n).

It highlights practical engine traps. PostgreSQL skips automatic index creation on foreign key columns, so you must add them manually. The guide details how UNIQUE treats NULL values, covers gaps in sequence counters, and explains heap storage behavior where row order mirrors insertion time. It also covers structured types like JSONB, arrays, ranges, and pgvector embeddings.

This skill does not apply to non-Postgres engines or query tuning that avoids schema modifications. Destructive production DDL requires verified rollbacks and staging migrations first.

What it helps with

  • model normalized PostgreSQL schemas up to 3NF
  • place manual indexes on foreign key columns
  • select strict data types like timestamptz and numeric
  • define storage and GIN indexes for jsonb and arrays

Example prompts for the agent

  • Design an e-commerce schema in PostgreSQL with orders, items, and customers
  • Review this migration script and verify whether my foreign key columns need indexes
  • Recommend the right Postgres data types and constraints for handling date ranges

How to install postgresql

1claude-code-templates

npx claude-code-templates@latest --skill database/postgresql

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill postgresql -a claude-code

3Manually: put the files in place

~/.claude/skills/postgresql/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/postgresql/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about postgresql

How to install postgresql in Claude Code?

Run npx claude-code-templates@latest --skill database/postgresql or use the skills installer by running npx skills add davila7/claude-code-templates --skill postgresql -a claude-code.

What does the postgresql skill do?

It provides PostgreSQL table modeling guidance to Claude Code, covering schema normalization, data type selection, manual FK indexing, and engine pitfalls.

When should you avoid using this skill?

Skip it when targeting non-Postgres engines or when optimizing SQL queries without altering table structures.

Similar skills

All skills for Data and databases →

postgresql by other authors comes first.

From the same set804

The whole set →
domain-name-brainstormer Generates domain name ideas for your project and checks which ones are free across several TLDs. Handy when you are naming a new product or rebranding. 321installs react-patterns Get guidance on React components, hooks, state choices, and performance. Useful when building or refactoring a React interface with TypeScript. 321installs firebase This skill guides Firebase backend work across auth, databases, functions, storage, and hosting. Use it before choosing a data model or access rules. 321installs core-web-vitals This skill examines LCP, INP, and CLS and suggests code changes for loading, responsiveness, and layout stability. Use it when diagnosing weak page metrics. 315installs context-window-management A skill for handling LLM context windows: summarization, trimming, routing and fighting context rot. Useful when a long dialogue runs into the token limit. 309installs documentation-templates This skill provides outlines and templates for READMEs, API references, code comments, and project records. Use it when starting documentation or bringing existing pages into a clearer structure. 305installs unity-project-setup Scaffolds a standardized Unity project with structured Assets directories, URP configs, core C# managers, and Git LFS tracking via Claude Code. 303installs agent-memory-mcp This skill runs an MCP server that gives your agent long-term memory: it stores decisions, architecture notes and patterns, then finds them again by search. 300installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor