Supabase Postgres Best Practices

by supabasec9be0e931b79MITListed Oct 8, 2026Updated Oct 8, 2026

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.

Only the file list is public. File contents are available once the skill is installed in a workspace.

PathSizeType
CHANGELOG.md5.6 KBtext/markdown
references/advanced-full-text-search.md1.4 KBtext/markdown
references/advanced-jsonb-indexing.md1.4 KBtext/markdown
references/conn-idle-timeout.md1.3 KBtext/markdown
references/conn-limits.md1.3 KBtext/markdown
references/conn-pooling.md1.3 KBtext/markdown
references/conn-prepared-statements.md1.5 KBtext/markdown
references/_contributing.md4 KBtext/markdown
references/data-batch-inserts.md1.3 KBtext/markdown
references/data-n-plus-one.md1.3 KBtext/markdown
references/data-pagination.md1.3 KBtext/markdown
references/data-upsert.md1.4 KBtext/markdown
references/lock-advisory.md1.5 KBtext/markdown
references/lock-deadlock-prevention.md1.8 KBtext/markdown
references/lock-short-transactions.md1.3 KBtext/markdown
references/lock-skip-locked.md1.3 KBtext/markdown
references/monitor-explain-analyze.md1.4 KBtext/markdown
references/monitor-pg-stat-statements.md1.4 KBtext/markdown
references/monitor-vacuum-analyze.md1.5 KBtext/markdown
references/query-composite-indexes.md1.4 KBtext/markdown
references/query-covering-indexes.md1.3 KBtext/markdown
references/query-index-types.md1.5 KBtext/markdown
references/query-missing-indexes.md1.2 KBtext/markdown
references/query-partial-indexes.md1.3 KBtext/markdown
references/schema-constraints.md1.8 KBtext/markdown
references/schema-data-types.md1.4 KBtext/markdown
references/schema-foreign-key-indexes.md1.6 KBtext/markdown
references/schema-lowercase-identifiers.md1.7 KBtext/markdown
references/schema-partitioning.md1.5 KBtext/markdown
references/schema-primary-keys.md1.8 KBtext/markdown
references/_sections.md1.6 KBtext/markdown
references/security-privileges.md1.5 KBtext/markdown
references/security-rls-basics.md1.3 KBtext/markdown
references/security-rls-performance.md2.1 KBtext/markdown
references/_template.md1 KBtext/markdown
SKILL.md3.2 KBtext/markdown

Source and attribution

Source:supabase/agent-skillsinskills/supabase-postgres-best-practicesat commitc9be0e9

License: MIT

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal