supabase-postgres-best-practices

Provide structured PostgreSQL performance best practices for Supabase applications.

Updated Dec 17, 2025
One-click install
npx skills add https://github.com/Lrmdom/patrimonio-pwa --skill supabase-postgres-best-practices-lrmdom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-postgres-best-practices
Source: https://github.com/Lrmdom/patrimonio-pwa/tree/main/.windsurf/skills/supabase-postgres-best-practices
Command: npx skills add https://github.com/Lrmdom/patrimonio-pwa --skill supabase-postgres-best-practices-lrmdom

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PostgreSQL performance can degrade due to poorly planned indexes, inefficient queries, and misconfigured maintenance. This skill provides structured, prioritized guidance to optimize Postgres performance for apps built on Supabase.

Core Features & Use Cases

  • Comprehensive rule sets across eight priority categories: Query Performance, Connection Management, Security & RLS, Schema Design, Concurrency & Locking, Data Access Patterns, Monitoring & Diagnostics, and Advanced Features.
  • Ready-to-use reference files with concrete SQL examples, performance tips, and actionable tasks for index design, vacuum/analyze, and RLS tuning.
  • Practical guidance for designing scalable schemas, selecting appropriate data types, and safe deployment practices to prevent regressions and outages.

Quick Start

Read the available references relevant to your current performance issue and implement the recommended optimizations.

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 PostgreSQL query performance in Supabase?

To optimize PostgreSQL query performance in Supabase, apply structured best practices for query tuning, index design, and data access patterns. This provides categorized rules with concrete SQL examples to guide automated optimization and safe deployments.

What are the best practices for designing Row Level Security policies in Supabase?

Best practices for designing Row Level Security (RLS) in Supabase involve tuning policies to prevent performance degradation. This skill provides actionable security and RLS rules with concrete examples to ensure safe data access without sacrificing database speed.

How do I fix slow Supabase database queries caused by missing indexes?

Fix slow Supabase database queries by implementing structured indexing rules and schema design guidelines. This skill offers ready-to-use reference files with concrete SQL examples to correct poorly planned indexes and improve overall PostgreSQL performance.

Does this PostgreSQL optimization guidance cover vacuum and analyze maintenance?

Yes, this PostgreSQL optimization guidance covers vacuum and analyze maintenance. It includes practical reference files with actionable tasks for database maintenance, concurrency, locking, and monitoring to prevent performance regressions in production environments.

What is the best way to manage database connections for scalable Supabase applications?

The best way to manage database connections for scalable Supabase applications is to follow structured connection management and concurrency rules. This skill provides categorized guidance to prevent locking issues and maintain stable production database performance.