Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
supabase avatar

Supabase Postgres Best Practices

  • 311k installs
  • 2.4k repo stars
  • Updated July 27, 2026
  • supabase/agent-skills

supabase-postgres-best-practices is a performance optimization guide covering Postgres query performance, connection management, security, schema design, and concurrency with rule categories prioritized by impact.

About

Postgres performance optimization guide organized into 8 priority categories. Provides detailed SQL examples, query plan analysis, and specific metrics for query performance, connection management, security, schema design, and concurrency tuning.

  • 8 priority categories from critical (query perf, connection mgmt) to incremental
  • Detailed examples with incorrect vs correct SQL, query plans, and metrics
  • Rules for indexes, RLS, concurrency, and Postgres-specific features

Supabase Postgres Best Practices by the numbers

  • 310,572 all-time installs (skills.sh)
  • +14,156 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #4 of 923 Databases skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

supabase-postgres-best-practices capabilities & compatibility

Capabilities
query optimization · schema design · rls · performance tuning
Works with
postgres · supabase
Use cases
database · refactoring · code review
From the docs

What supabase-postgres-best-practices says it does

Comprehensive performance optimization guide for Postgres, maintained by Supabase. Contains rules across 8 categories, prioritized by impact
SKILL.md
npx skills add https://github.com/supabase/agent-skills --skill supabase-postgres-best-practices

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs311k
repo stars2.4k
Security audit3 / 3 scanners passed
Last updatedJuly 27, 2026
Repositorysupabase/agent-skills

How do you optimize Postgres queries on Supabase?

Optimize Postgres queries and schema designs for performance at scale

Who is it for?

Developers writing or reviewing Postgres SQL, indexes, and connection settings on Supabase or compatible Postgres deployments.

Skip if: Non-Postgres databases, one-off CRUD without performance concerns, or teams needing migration tooling instead of query guidance.

When should I use this skill?

User writes, reviews, or optimizes Postgres queries, schema designs, or Supabase database configuration.

What you get

Performance-aligned SQL, schema designs, and database configuration recommendations grounded in Supabase Postgres rules.

  • optimized SQL patterns
  • schema recommendations
  • configuration guidance

By the numbers

  • 8 rule categories
  • EXPLAIN output analysis included

Files

SKILL.mdMarkdownGitHub ↗

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

PriorityCategoryImpactPrefix
1Query PerformanceCRITICALquery-
2Connection ManagementCRITICALconn-
3Security & RLSCRITICALsecurity-
4Schema DesignHIGHschema-
5Concurrency & LockingMEDIUM-HIGHlock-
6Data Access PatternsMEDIUMdata-
7Monitoring & DiagnosticsLOW-MEDIUMmonitor-
8Advanced FeaturesLOWadvanced-

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

  • https://www.postgresql.org/docs/current/
  • https://supabase.com/docs
  • https://wiki.postgresql.org/wiki/Performance_Optimization
  • https://supabase.com/docs/guides/database/overview
  • https://supabase.com/docs/guides/auth/row-level-security

Guides

  • Claude Code Skills Examples: 7 Real Skills and What Their SKILL.md Files Actually Do

    Claude Code skills are markdown instruction files that teach the agent one job. This guide walks through 7 real examples spanning discovery, UI generation, plan review, TDD, framework rules, browser automation, and Postgres tuning - led by find-skills at 2,438,642 installs (skills.sh registry, July 2026) - plus the SKILL.md anatomy and a minimal skeleton.

Related skills

Forks & variants (7)

Supabase Postgres Best Practices has 7 known copies in the catalog totaling 215 installs. They canonicalize to this original listing.

How it compares

Use supabase-postgres-best-practices for SQL-level Postgres tuning guidance rather than general Supabase platform setup skills.

FAQ

How many rule categories does supabase-postgres-best-practices cover?

supabase-postgres-best-practices organizes Postgres guidance into 8 categories, prioritized from critical query performance and connection management to incremental advanced features. Each rule includes incorrect versus correct SQL examples.

When should developers load supabase-postgres-best-practices?

Load supabase-postgres-best-practices when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations on Supabase. The skill applies during active development and performance troubleshooting.

Is Supabase Postgres Best Practices safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Databasesdatabasesanalytics

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.