Skip to content

Phở Founder Lifetime: $59 once, 1 year of Phở AI included. Limited seats. See the offer

Engineering · Skill

Supabase Postgres Best Practices

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.

Open in Phở

What the skill covers

The sections of its instructions, in order.

  1. 01 When to Apply
  2. 02 Rule Categories by Priority
  3. 03 How to Use
  4. 04 References

Reference files

35 files Phở can open while it uses the skill.

  • CHANGELOG.md
  • references/_contributing.md
  • references/_sections.md
  • references/_template.md
  • references/advanced-full-text-search.md
  • references/advanced-jsonb-indexing.md
  • references/conn-idle-timeout.md
  • references/conn-limits.md
  • references/conn-pooling.md
  • references/conn-prepared-statements.md
  • references/data-batch-inserts.md
  • references/data-n-plus-one.md
  • references/data-pagination.md
  • references/data-upsert.md
  • references/lock-advisory.md
  • references/lock-deadlock-prevention.md
  • +19 more

More in Supabase and Postgres

  • Supabase

    Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR…

Similar engineering skills

Frequently asked questions

What does Supabase Postgres Best Practices do?

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.

Is Supabase Postgres Best Practices free to use?

Yes. Supabase Postgres Best Practices is published by Supabase under the MIT licence, and you can use it with a free Phở account.

How do I use Supabase Postgres Best Practices in Phở?

Press Open in Phở, then Try to apply it to your next message, or add the Supabase and Postgres set so Phở loads it whenever a request matches.

Does Supabase Postgres Best Practices need other tools?

No. It works in a normal Phở chat with what you type or upload.

Copied unchanged from supabase/agent-skills at commit c9be0e9 and credited to Supabase, who is not affiliated with Phở. The full instructions and licence text ship with the skill inside Phở.