Technical & DevelopmentIntermediate
postgres-best-practices
PostgreSQL best practices for Supabase
Developer Setup
Setup & Installation
bash
npx skills add https://github.com/supabase/agent-skills --skill postgres-best-practicesnpx skills add https://github.com/supabase/agent-skills --skill postgres-best-practicesOr paste this URL into your assistant to install:
Overview
What This Skill Does
A collection of Postgres optimization rules organized by impact, covering query performance, connection management, RLS, schema design, and concurrency. Each rule includes SQL examples showing the wrong and right approach, with EXPLAIN output and metrics where relevant. Maintained by Supabase, but applies to any Postgres setup.
Application
When to use this Skill
- Configuring integration settings for custom agent workflows.
- Optimizing query execution and response latency in production.
- Developing clean, standard-compliant implementations for enterprise services.
- Troubleshooting connection timeouts and authentication handshakes.
- Monitoring API rate limits and execution pipelines programmatically.
Documentation
Show Skills.md file
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- |
Lines 1 - 25 of 52
Recommendations