Back to Skill Hub
Download Skill Package

System Prompt / Instructions

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:

rules/query-missing-indexes.md
rules/schema-partial-indexes.md
rules/_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)

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

Frequently Asked Questions

What is supabase-postgres-best-practices?

supabase-postgres-best-practices is an expert AI persona designed to improve your coding workflow. Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations. It provides senior-level context directly within your IDE.

How do I install the supabase-postgres-best-practices skill in Cursor or Windsurf?

To install the supabase-postgres-best-practices skill, download the package, extract the files to your project's .cursor/skills directory, and type @postgres-best-practices in your editor chat to activate the expert instructions.

Is supabase-postgres-best-practices free to download?

Yes, the supabase-postgres-best-practices AI persona is completely free to download and integrate into compatible Agentic IDEs like Cursor, Windsurf, Github Copilot, and Anthropic MCP servers.

@

supabase-postgres-best-practices

Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.

Download Skill Package

IDE Invocation

@postgres-best-practices
COPY

Platform

IDE Native

Price

Free Download

Setup Instructions

Cursor & Windsurf

  1. Download the zip file above.
  2. Extract to .cursor/skills
  3. Type @postgres-best-practices in editor chat.

Copilot & ChatGPT

Copy the instructions from the panel on the left and paste them into your custom instructions setting.

"Adding this supabase-postgres-best-practices persona to my Cursor workspace completely changed the quality of code my AI generates. Saves me hours every week."

A
Alex Dev
Senior Engineer, TechCorp