
Supabase Postgres Best Practices
A solid reference for anyone working with Postgres, especially on Supabase. Contains 8 categories of performance rules prioritized by impact, from critical query optimization to advanced features. Each rule includes wrong vs. right SQL examples, query plan analysis, and specific performance metrics. The prioritization system is smart - it focuses on the stuff that actually breaks production first (missing indexes, connection pooling) before getting into nice-to-haves. Worth having loaded when reviewing database code or designing schemas, since it catches common Postgres pitfalls that can tank performance.
- install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
- 153
- skills.sh installs
- 479.8K
- GitHub stars
- 3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add supabase/agent-skills --skill supabase-postgres-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Files
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:
Sponsors