Postgres Rules Checker
Postgres best practices maintained by Supabase, for Postgres running anywhere.
Open in the library
What it does
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query. Use when writing or changing anything that lives in a Postgres database.
What’s inside
SKILL.md3 KB
CREDITS.md1 KB
references32 files · 46 KB
_sections.md2 KB
advanced-full-text-search.md1 KB
advanced-jsonb-indexing.md1 KB
conn-idle-timeout.md1 KB
conn-limits.md1 KB
conn-pooling.md1 KB
conn-prepared-statements.md1 KB
data-batch-inserts.md1 KB
data-n-plus-one.md1 KB
data-pagination.md1 KB
data-upsert.md1 KB
lock-advisory.md1 KB
lock-deadlock-prevention.md2 KB
lock-short-transactions.md1 KB
lock-skip-locked.md1 KB
monitor-explain-analyze.md1 KB
monitor-pg-stat-statements.md1 KB
monitor-vacuum-analyze.md1 KB
query-composite-indexes.md1 KB
query-covering-indexes.md1 KB
query-index-types.md1 KB
query-missing-indexes.md1 KB
query-partial-indexes.md1 KB
schema-constraints.md2 KB
schema-data-types.md1 KB
schema-foreign-key-indexes.md2 KB
schema-lowercase-identifiers.md2 KB
schema-partitioning.md2 KB
schema-primary-keys.md2 KB
security-privileges.md1 KB
security-rls-basics.md1 KB
security-rls-performance.md2 KB
The text is never on this site. It loads into your Claude when a task needs it.