8 skills built for PostgreSQL

Claude Code skills for PostgreSQL

PostgreSQL skills that work from real query plans: schema design, indexing, zero-downtime migrations, locking, connection pooling, JSONB, backups and point-in-time recovery. The ORMs and platforms built on Postgres are covered as well.

5 more PostgreSQLskills

Each card opens the full playbook, example prompts and install commands.

Postgres Row-Level Security

Tenant isolation the database enforces and tests prove

Claude sets up RLS so it cannot be bypassed by accident: a runtime role without BYPASSRLS that does not own the tables, ENABLE plus FORCE on every tenant table, and tenant context passed per transaction with set_config so poolers never leak it. It closes the side doors through views, SECURITY DEFINER functions and foreign keys, and writes SQL tests that fail when one tenant can see another.

row-level-security 262 lines

Testcontainers

Real databases in tests, started once and reset fast

Claude replaces database mocks and H2 stand-ins with the production engine in a container, started once per run rather than per test. It runs the real migrations, picks rollback, truncation, template databases or snapshots for isolation, gives each parallel worker its own database, and sets up GitHub Actions or GitLab Docker-in-Docker so the suite passes cold, shuffled and in parallel.

testcontainers 202 lines · 2 files

AWS RDS and Aurora

Right engine, tested failover, no surprise I/O bill

Guides Claude through running PostgreSQL and MySQL on AWS from measured load: choosing RDS, Aurora, or Serverless v2, sizing for the working set, testing failover, and keeping settings in custom parameter groups. It plans major upgrades as blue/green deployments with the logical-replication and PITR caveats, reduces RDS Proxy pinning, and runs a script that compares Aurora Standard and I/O-Optimized from your bill.

aws-rds-aurora 285 lines · 2 files

Connection Pooling

Pools sized to database cores, not request counts

Claude writes down every process that connects and sums its maximum connections against the database limit at full autoscale before touching a setting. Pools are sized from database parallelism, PgBouncer transaction mode is configured with its session-state caveats and prepared statement support, serverless platforms get a proxy, and exhaustion is diagnosed from pg_stat_activity and SHOW POOLS.

connection-pooling 173 lines · 2 files

SQLAlchemy ORM

Typed models, owned sessions, loads you chose on purpose

Makes Claude write SQLAlchemy 2.x the way it is meant to be used: Mapped and mapped_column models with named constraints, one Session per request or task with short transactions, select() queries with deliberate selectinload or joinedload, and lazy="raise" to catch accidental lazy loads. It also reviews Alembic autogenerate output for the renames and enum changes it misses, and sets up rollback-per-test fixtures.

sqlalchemy-orm 350 lines

General skills with PostgreSQL guidance

Not built around PostgreSQL, but they include PostgreSQL-specific tools or steps. Not part of the install-all command.

Install

Every PostgreSQL skill in one command

Installs these 8 skills into ~/.claude/skills/. Add --project after -- to install into the current repository instead.

The installer is a 101-line POSIX shell script. It downloads each skill you name from claudeskills.page and unpacks it into your skills folder, nothing else: no sudo, no telemetry. Every skill page shows the full SKILL.md, so you can read what you install first. Read install.sh

PostgreSQL skills FAQ

Answers drawn from the skills themselves, including what they don't cover.

Which Postgres versions do the skills target?

No single version is pinned. The skills flag version-gated features as they go: Postgres Schema Design notes uuidv7() ships in PostgreSQL 18, Postgres Indexing covers the PG18 B-tree skip scan, Backup and Restore covers PostgreSQL 17 incremental backups, and Postgres JSONB covers JSON_TABLE in PG17. Older caveats, such as PG11 and PG12 behavior, appear in Zero-Downtime Migrations.

Do they cover zero-downtime migrations?

Yes. Zero-Downtime Migrations splits changes into expand, migrate data and contract phases, sets lock_timeout on every DDL statement, uses CREATE INDEX CONCURRENTLY and NOT VALID then VALIDATE for constraints, and runs backfills in throttled batches outside the DDL transaction. It also orders code and schema deploys, writes a rollback or forward-fix plan, and holds destructive steps until you confirm.

Is there help for managed Postgres like RDS or Supabase?

Yes. AWS RDS and Aurora covers choosing RDS vs Aurora vs Serverless v2, parameter groups, RDS Proxy pinning, PITR, blue/green major upgrades and cost traps like Extended Support. Supabase Backend covers the Supabase CLI, migrations, Row Level Security on every exposed table and Edge Functions. Connection Pooling handles PgBouncer, RDS Proxy, Supavisor and Neon for serverless setups.

How do I install all 8 PostgreSQL skills at once?

Pass every name to the installer in one command: curl -fsSL https://claudeskills.page/install.sh | sh -s -- postgres-schema-design postgres-indexing schema-migrations row-level-security testcontainers aws-rds-aurora connection-pooling sqlalchemy-orm. Add --project after -- to install them into the current repository's .claude/skills/ folder so your team gets them too.

esc