← Explore all skills

DATABASES / Supabase

Supabase Postgres Best Practices

Connects Postgres schema and query decisions to worked SQL examples, connection guidance and row-level security checks.

“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”

01 / THE REASONING

Why this made the selection.

  • Pairs incorrect and corrected SQL with query-plan examples instead of offering only generic database advice.
  • Treats row-level security, privileges and connection management as part of database work rather than a separate performance afterthought.

02 / THE REVIEW RECORD

What we actually inspected.

Source review has boundaries.
A clear record is more useful than a “safe” badge.

Material inspected

  • skills/supabase-postgres-best-practices/SKILL.md
  • skills/supabase-postgres-best-practices/references/query-missing-indexes.md
  • skills/supabase-postgres-best-practices/references/security-rls-performance.md
  • LICENSE

Our findings

  • The definition routes work to named rules for queries, connections, schema, locking and RLS.
  • The inspected missing-index rule contrasts sequential and index scans using a concrete WHERE/JOIN example.
  • The RLS reference warns that security-definer functions bypass table policies and calls for caller checks, a non-exposed schema and restricted execution.

Not established by this review

  • No SQL was executed against a database.
  • Workload performance and tenant-isolation behavior were not measured.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

Add a skill to your workflow.

Upstream setup instructions ↗

DOCUMENTED COMMAND

npx skills add https://github.com/supabase/agent-skills/tree/8331f910845103c08d51f6ca1d86ebb7d1f745e3/skills/supabase-postgres-best-practices

Copying does not execute this command. It may retrieve a newer version than the reviewed source.

  1. Install the complete skill directory with its references and helpers; a copied SKILL.md alone may be incomplete.
  2. Choose the intended agent and project scope in the installer, then review its permissions before using the skill.

Before you start

  • Node.js/npm for this installer
  • An agent that supports the Agent Skills format
  • Access to the relevant schema and query plans; database credentials only if you choose to run checks

04 / FOLLOW THE EVIDENCE

The source trail.

Our notes are separate from the original resource.
Check upstream before adopting a new version.

  1. https://github.com/supabase/agent-skills/blob/8331f910845103c08d51f6ca1d86ebb7d1f745e3/skills/supabase-postgres-best-practices/SKILL.md

    Supports: summary, upstreamDescription, whySelected, bestFor, limitations, review, compatibility, access

  2. https://github.com/supabase/agent-skills/blob/8331f910845103c08d51f6ca1d86ebb7d1f745e3/skills/supabase-postgres-best-practices/references/query-missing-indexes.md

    Supports: review, limitations, access

  3. https://github.com/supabase/agent-skills/blob/8331f910845103c08d51f6ca1d86ebb7d1f745e3/skills/supabase-postgres-best-practices/references/security-rls-performance.md

    Supports: review, limitations, access

  4. https://github.com/supabase/agent-skills/blob/8331f910845103c08d51f6ca1d86ebb7d1f745e3/LICENSE

    Supports: license

  5. https://github.com/supabase/agent-skills/blob/8331f910845103c08d51f6ca1d86ebb7d1f745e3/README.md

    Supports: install, compatibility, access

  6. https://github.com/vercel-labs/skills/blob/7407f3893ad4dceab546ac002c3ef806e4000c73/README.md

    Supports: install

  7. https://github.com/vercel-labs/skills/blob/7407f3893ad4dceab546ac002c3ef806e4000c73/src/git.ts

    Supports: install