supabase-postgres-best-practices

supabase/agent-skills · updated Apr 8, 2026

$npx skills add https://github.com/supabase/agent-skills --skill supabase-postgres-best-practices
0 commentsdiscussion
summary

Postgres performance optimization rules across 8 priority categories, from query tuning to advanced features.

  • Organized into 8 rule categories prioritized by impact: query performance and connection management (critical), security and RLS, schema design, concurrency, data access patterns, monitoring, and advanced features
  • Each rule includes detailed explanations, incorrect vs. correct SQL examples, EXPLAIN output analysis, and performance metrics to guide optimization decisions
  • Cover
skill.md

Supabase Postgres Best Practices

Comprehensive performance optimization guide for Postgres, maintained by Supabase. Contains rules across 8 categories, prioritized by impact to guide automated query optimization and schema design.

When to Apply

Reference these guidelines when:

  • Writing SQL queries or designing schemas
  • Implementing indexes or query optimization
  • Reviewing database performance issues
  • Configuring connection pooling or scaling
  • Optimizing for Postgres-specific features
  • Working with Row-Level Security (RLS)

Rule Categories by Priority

Priority Category Impact Prefix
1 Query Performance CRITICAL query-
2 Connection Management CRITICAL conn-
3 Security & RLS CRITICAL security-
4 Schema Design HIGH schema-
5 Concurrency & Locking MEDIUM-HIGH lock-
6 Data Access Patterns MEDIUM data-
7 Monitoring & Diagnostics LOW-MEDIUM monitor-
8 Advanced Features LOW advanced-

How to Use

Read individual rule files for detailed explanations and SQL examples:

references/query-missing-indexes.md
references/query-partial-indexes.md
references/_sections.md

Each rule file contains:

  • Brief explanation of why it matters
  • Incorrect SQL example with explanation
  • Correct SQL example with explanation
  • Optional EXPLAIN output or metrics
  • Additional context and references
  • Supabase-specific notes (when applicable)

References

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.729 reviews
  • Noah Mensah· Dec 8, 2024

    supabase-postgres-best-practices has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Chaitanya Patil· Dec 4, 2024

    We added supabase-postgres-best-practices from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Soo Abbas· Nov 27, 2024

    Solid pick for teams standardizing on skills: supabase-postgres-best-practices is focused, and the summary matches what you get after install.

  • Piyush G· Nov 23, 2024

    Useful defaults in supabase-postgres-best-practices — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Harper Singh· Oct 18, 2024

    supabase-postgres-best-practices is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Shikha Mishra· Oct 14, 2024

    Registry listing for supabase-postgres-best-practices matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Yash Thakker· Sep 25, 2024

    Solid pick for teams standardizing on skills: supabase-postgres-best-practices is focused, and the summary matches what you get after install.

  • Michael Jain· Sep 25, 2024

    Keeps context tight: supabase-postgres-best-practices is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Omar Ghosh· Sep 5, 2024

    Registry listing for supabase-postgres-best-practices matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Isabella Chawla· Aug 24, 2024

    Useful defaults in supabase-postgres-best-practices — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

showing 1-10 of 29

1 / 3