supabase-postgres-best-practices

Apply Supabase best-practice rules to optimize PostgreSQL queries, schemas, and configurations.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/Pedroguerrerodev/pwa-rutinas-gym-basic --skill supabase-postgres-best-practices-pedroguerrerodev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-postgres-best-practices
Source: https://github.com/Pedroguerrerodev/pwa-rutinas-gym-basic/tree/main/.agents/skills/supabase-postgres-best-practices
Command: npx skills add https://github.com/Pedroguerrerodev/pwa-rutinas-gym-basic --skill supabase-postgres-best-practices-pedroguerrerodev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Supabase-backed PostgreSQL projects often face slow queries, suboptimal indexing, and misconfigured settings. This guide consolidates prioritized rules and concrete SQL patterns to improve performance and reliability.

Core Features & Use Cases

  • Coverage across 8 priority categories: Query Performance, Connection Management, Security & RLS, Schema Design, Concurrency & Locking, Data Access Patterns, Monitoring & Diagnostics, Advanced Features.
  • Includes detailed rule explanations with correct vs incorrect SQL, explicit metrics, and references.
  • Applicable for development, staging, and production DB tuning, audits, and automated optimization workflows.

Quick Start

To begin, review the catalog in SKILL.md and apply the top-priority rules to your current Postgres setup, starting with enabling performance-extensive monitoring and adding/adjusting indexes on hot paths.

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 Supabase?

Optimize slow PostgreSQL queries in Supabase by applying prioritized rules for query tuning, adding indexes to hot paths, and enabling performance monitoring. Concrete SQL examples and correct vs incorrect patterns guide schema adjustments and connection management.

What are the best practices for Supabase Row Level Security performance?

Supabase Row Level Security (RLS) best practices involve using RLS-aware query patterns to maintain security without degrading speed. The guide covers Security & RLS configurations with explicit metrics and SQL examples to prevent misconfigured policies from causing bottlenecks.

How do I configure connection management for a Supabase Postgres database?

Configure connection management for a Supabase Postgres database by applying rules from the Connection Management category. The guide provides prioritized configurations and SQL patterns to optimize connections and prevent suboptimal settings in production environments.

Does this Supabase Postgres guide cover schema design and partitioning?

Yes, this Supabase Postgres guide covers schema design and partitioning under its eight priority categories. It provides concrete SQL examples and prioritized rules for schema adjustments, data access patterns, and advanced features to improve database reliability.

When should I apply concurrency and locking optimizations in Supabase Postgres?

Apply concurrency and locking optimizations in Supabase Postgres during production DB tuning and audits. The guide includes specific rules for concurrency and locking patterns with explicit metrics to resolve performance bottlenecks in database-heavy applications.