Postgres Best Practicesby Supabase
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.
npx skills add https://github.com/supabase/agent-skills --skill supabase-postgres-best-practicesSupabase 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/schema-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
Related Skills
Agent Browser
by Vercel
Automates browser interactions for web testing, form filling, screenshots, and data extraction.
gws-modelarmor-sanitize-response
by Google
Google Model Armor: Sanitize a model response through a Model Armor template.
azure-prepare
by Azure
Default entry point for Azure application development. Analyzes your project and prepares it for Azure deployment by generating infrastructure code (Bicep/Terraform), azure.yaml, and Dockerfiles.
recipe-plan-weekly-schedule
by Google
Review your Google Calendar week, identify gaps, and add events to fill them.
Canva Translate
by Canva
Translate all text in a Canva design to another language, creating a translated copy. Faster than manually copying and editing each text box in Canva's editor. Use when users say "translate my design to [language]", "make a Spanish/French/etc version", or "localize my Canva design".
gws-apps-script-push
by Google
Google Apps Script: Upload local files to an Apps Script project.
persona-exec-assistant
by Google
Manage an executive's schedule, inbox, and communications.
gws-workflow-meeting-prep
by Google
Google Workflow: Prepare for your next meeting: agenda, attendees, and linked docs.