supabase-postgres-best-practices

Analyze PostgreSQL configurations and queries to generate optimization guidance with SQL templates.

Updated Dec 22, 2025
One-click install
npx skills add https://github.com/chris-gs4/my-family-story-archive --skill supabase-postgres-best-practices-chris-gs4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-postgres-best-practices
Source: https://github.com/chris-gs4/my-family-story-archive/tree/main/archive/old-editor-configs/.agents/skills/supabase-postgres-best-practices
Command: npx skills add https://github.com/chris-gs4/my-family-story-archive --skill supabase-postgres-best-practices-chris-gs4

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL performance can be fragile and hard to tune; this guide consolidates proven best practices from Supabase to help teams diagnose and fix slow queries, poor indexing, and suboptimal configuration.

Core Features & Use Cases

  • Rule-driven guidance across indexing, partitioning, RLS, autovacuum, and connection management with concrete SQL examples.
  • Applicable to reviewing and optimizing Postgres schemas, queries, and deployment configurations in production.
  • Use Case: when you need scalable, repeatable performance improvements across multiple databases.

Quick Start

Review your current Postgres workload and apply the Supabase-best-practice rules to begin optimizing performance.

Frequently Asked Questions about supabase-postgres-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize slow PostgreSQL queries in production?

PostgreSQL indexing best practices involve analyzing your schema to generate actionable guidance on query tuning and indexing strategies. This provides ready-to-use SQL templates and categorized rules to improve database performance.

What is the best way to configure PostgreSQL autovacuum and connection management?

Configuring PostgreSQL autovacuum and connection management relies on applying proven best practices to your deployment configuration. This generates categorized rules and SQL templates to stabilize and scale database performance.

How do I tune Row Level Security policies in PostgreSQL for better performance?

Tuning Row Level Security (RLS) policies in PostgreSQL requires analyzing query patterns against your schema. This generates optimization guidance and concrete SQL examples to ensure RLS rules do not degrade query speed.

When should I use table partitioning in PostgreSQL?

You should use table partitioning in PostgreSQL when you need scalable performance improvements across large datasets. Analyzing your workload and schema details generates specific partitioning rules and SQL templates to apply.

Does this PostgreSQL optimization guidance work for databases outside Supabase?

Yes, the PostgreSQL optimization guidance applies to Postgres deployments generally, covering RLS, autovacuum, and connection management. It delivers SQL templates and rules derived from Supabase best practices for any production database.