postgres-best-practices
Installation
SKILL.md
Iron Law
NEVER TUNE WHAT YOU HAVEN'T MEASURED — CHECK pg_stat_statements AND pg_stat_activity BEFORE CHANGING CONFIGURATION OR ADDING INDEXES
When to Use This Skill
- Configuring connection pooling (PgBouncer, Prisma pool, asyncpg pool, R2DBC pool)
- Implementing Row Level Security (RLS) for multi-tenant data isolation
- Designing worker queues with
SKIP LOCKEDand advisory locks - Preventing deadlocks in concurrent write workloads
- Configuring VACUUM/ANALYZE and autovacuum tuning
- Adding full-text search with
tsvector/tsquery - Indexing JSONB columns (
jsonb_opsvsjsonb_path_ops) - Reviewing any PostgreSQL schema or query against the 8-category rule library
Do Not Use This Skill When
- You need query EXPLAIN analysis and index pattern SQL (use
sql-optimization-patterns) - You need schema migration design or ERDs (use
database-schema-designer) - You need cloud analytics or HTAP (use
sql-pro)