This walks Claude through PostgreSQL schema design with opinionated best practices baked in. It covers the practical stuff: when to use BIGINT GENERATED ALWAYS AS IDENTITY versus UUID, why you need to manually index foreign keys, how to pick between JSONB and proper columns, and which data types to avoid entirely (no VARCHAR, no TIMESTAMP without timezone, no SERIAL). The normalize-first rule is solid, and the gotchas section actually explains MVCC and sequence gaps instead of glossing over them. Use this when you're designing tables from scratch or reviewing a schema for performance and maintainability. It's thorough without being academic, and it'll stop you from making the common mistakes that bite you six months later.

skills.sh installs
664
GitHub stars
43.1K
last updated
Jul 14, 2026

Install

$ npx -y skills add sickn33/antigravity-awesome-skills --skill postgresql --agent claude-code

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/sickn33/antigravity-awesome-skills
Categories
Backend & APIs, Databases
First seen
Jun 3, 2026

More from sickn33/antigravity-awesome-skills

All 708
1patternsdev avatarproxy-patternpatternsdev/skillsTeaches the proxy pattern for intercepting object operations. Use when you need validation, logging, formatting, or access control on property access, assignmen627skills.sh installs
2aj-geddes avataraws-lambda-functionsaj-geddes/useful-ai-promptsCreate and deploy serverless functions using AWS Lambda with event sources, permissions, layers, and environment configuration. Use for event-driven computing w619skills.sh installs
3sickn33 avatarbackend-development-feature-developmentsickn33/antigravity-awesome-skillsbackend development feature development615skills.sh installs
4aj-geddes avatardatabase-query-optimizationaj-geddes/useful-ai-promptsImprove database query performance through indexing, query optimization, and execution plan analysis. Reduce response times and database load.593skills.sh installs
5recoupable avatarrecoup-apirecoupable/skillsCall the Recoupable API from the sandbox to fetch artist data, socials, organizations, research, documents and any other platform resource — and to invoke exter550skills.sh installs
6aj-geddes avatarpayment-gateway-integrationaj-geddes/useful-ai-promptsIntegrate payment gateways like Stripe, PayPal, and Square with backends for payment processing, subscription management, and webhook handling. Use when buildin529skills.sh installs