
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.
| Path | Size | Type |
|---|---|---|
| CHANGELOG.md | 5.6 KB | text/markdown |
| references/advanced-full-text-search.md | 1.4 KB | text/markdown |
| references/advanced-jsonb-indexing.md | 1.4 KB | text/markdown |
| references/conn-idle-timeout.md | 1.3 KB | text/markdown |
| references/conn-limits.md | 1.3 KB | text/markdown |
| references/conn-pooling.md | 1.3 KB | text/markdown |
| references/conn-prepared-statements.md | 1.5 KB | text/markdown |
| references/_contributing.md | 4 KB | text/markdown |
| references/data-batch-inserts.md | 1.3 KB | text/markdown |
| references/data-n-plus-one.md | 1.3 KB | text/markdown |
| references/data-pagination.md | 1.3 KB | text/markdown |
| references/data-upsert.md | 1.4 KB | text/markdown |
| references/lock-advisory.md | 1.5 KB | text/markdown |
| references/lock-deadlock-prevention.md | 1.8 KB | text/markdown |
| references/lock-short-transactions.md | 1.3 KB | text/markdown |
| references/lock-skip-locked.md | 1.3 KB | text/markdown |
| references/monitor-explain-analyze.md | 1.4 KB | text/markdown |
| references/monitor-pg-stat-statements.md | 1.4 KB | text/markdown |
| references/monitor-vacuum-analyze.md | 1.5 KB | text/markdown |
| references/query-composite-indexes.md | 1.4 KB | text/markdown |
| references/query-covering-indexes.md | 1.3 KB | text/markdown |
| references/query-index-types.md | 1.5 KB | text/markdown |
| references/query-missing-indexes.md | 1.2 KB | text/markdown |
| references/query-partial-indexes.md | 1.3 KB | text/markdown |
| references/schema-constraints.md | 1.8 KB | text/markdown |
| references/schema-data-types.md | 1.4 KB | text/markdown |
| references/schema-foreign-key-indexes.md | 1.6 KB | text/markdown |
| references/schema-lowercase-identifiers.md | 1.7 KB | text/markdown |
| references/schema-partitioning.md | 1.5 KB | text/markdown |
| references/schema-primary-keys.md | 1.8 KB | text/markdown |
| references/_sections.md | 1.6 KB | text/markdown |
| references/security-privileges.md | 1.5 KB | text/markdown |
| references/security-rls-basics.md | 1.3 KB | text/markdown |
| references/security-rls-performance.md | 2.1 KB | text/markdown |
| references/_template.md | 1 KB | text/markdown |
| SKILL.md | 3.2 KB | text/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.
More in Software Development

Playground
anthropics
Builds self-contained interactive HTML playgrounds with controls, live preview, and copyable prompt output.

M5 Onboard
anthropics
Provisions M5Stack ESP32 boards by detecting them on USB, flashing UIFlow 2.0 firmware, and installing a MicroPython app bundle.

Cardputer Buddy
anthropics
Guides iterating on a Cardputer-Adv MicroPython app bundle: adding apps, pushing files over USB-serial, tailing logs, and running REPL commands.

Testing Strategy
anthropics
Designs test strategies and test plans, covering test types, coverage targets, and example test cases.

Tech Debt
anthropics
Identifies, categorizes, and prioritizes technical debt, producing a scored backlog and phased remediation plan.

System Design
anthropics
Guides system and architecture design through requirements, high-level design, deep dives, scaling, and trade-off analysis.