Skip to content

Schema design guidance for PostgreSQL covering data types, constraints, indexing, and table patterns, with explicit gotchas.

CCM score
55 of 100
skills.sh installs
664
GitHub stars
50.5K
last updated
Jul 14, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers PostgreSQL-specific schema work: data type choice, NOT NULL and constraint design, indexing, partitioning, and RLS policies
  • Enforces rules such as TIMESTAMPTZ over timestamp, NUMERIC for money, TEXT over char(n) or varchar(n), and identity columns over serial
  • Flags gotchas including unquoted identifiers, UNIQUE NULLS NOT DISTINCT on PG15+, manual FK indexing, and sequence gaps
  • Designed for schema design and review on PostgreSQL, not for non-PostgreSQL databases or query tuning alone

Install

$ npx -y skills add sickn33/agentic-awesome-skills --skill postgresql -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

PostgreSQL Table Design

Use this skill when

  • Designing a schema for PostgreSQL
  • Selecting data types and constraints
  • Planning indexes, partitions, or RLS policies
  • Reviewing tables for scale and maintainability

Do not use this skill when

  • You are targeting a non-PostgreSQL database
  • You only need query tuning without schema changes
  • You require a DB-agnostic modeling guide

Instructions

  1. Capture entities, access patterns, and scale targets (rows, QPS, retention).
  2. Choose data types and constraints that enforce invariants.
  3. Add indexes for real query paths and validate with EXPLAIN.
  4. Plan partitioning or RLS where required by scale or access control.
  5. Review migration impact and apply changes safely.

Safety

  • Avoid destructive DDL on production without backups and a rollback plan.
  • Use migrations and staging validation before applying schema changes.

Core Rules

Details

Repository
github.com/sickn33/agentic-awesome-skills
Category
Databases
First seen
Jun 3, 2026

More from sickn33/agentic-awesome-skills

All 682

Similar to Postgresql

More Databases