supabase-postgres-best-practices

Apply Supabase-specific PostgreSQL performance best practices to optimize queries, indexing, and configuration.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/robertsthomas/hellobrand --skill supabase-postgres-best-practices-robertsthomas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-postgres-best-practices
Source: https://github.com/robertsthomas/hellobrand/tree/main/.agents/skills/supabase-postgres-best-practices
Command: npx skills add https://github.com/robertsthomas/hellobrand --skill supabase-postgres-best-practices-robertsthomas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Supabase projects often struggle with PostgreSQL performance due to unoptimized queries, missing indexes, and poorly tuned settings. This skill consolidates production-grade best practices to help you write, review, and optimize Postgres queries, schema designs, and configurations within a Supabase context.

Core Features & Use Cases

  • Comprehensive rules organized into eight priority categories (Query Performance, Connection Management, Security & RLS, Schema Design, Concurrency & Locking, Data Access Patterns, Monitoring & Diagnostics, and Advanced Features) with concrete SQL examples, explanations, and metrics.
  • Guidance for auditing, refactoring, and automating performance improvements across queries, indexes, schemas, and server settings in real-world apps (dashboards, multi-tenant data, batch imports).
  • Practical use cases include tuning fast-path read queries, safe data-modelling decisions, RLS policy performance, and reliable maintenance routines.

Quick Start

Audit your Supabase/Postgres instance using the included rules to identify top bottlenecks and apply recommended rewrites.

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 Postgres queries in Supabase?

Optimize Supabase Postgres queries by applying concrete rewrite rules across eight priority categories including query performance, indexing, connection management, and schema design. The skill identifies bottlenecks and provides actionable checks to improve query execution.

What are the best practices for Supabase RLS policy performance?

Supabase RLS policy performance best practices involve auditing row-level security rules for table scan inefficiencies and applying proper indexing strategies. The skill provides specific rewrite rules and performance metrics to optimize secure data access patterns.

When should I use partitioning in Supabase Postgres?

Use partitioning in Supabase Postgres for large datasets and multi-tenant data models to improve query speed and maintenance. The skill provides schema design guidance and concrete SQL examples for implementing safe data partitioning strategies.

How do I audit my Supabase database for performance bottlenecks?

Audit your Supabase database by applying included rules to identify top bottlenecks across queries, indexes, schemas, and server settings. The skill consolidates production-grade best practices to produce actionable checks and performance metrics.

Does this skill cover connection management and concurrency locking?

Yes, this skill covers connection management and concurrency locking within its eight priority categories. It provides guidance for tuning fast-path read queries, managing locks, and ensuring reliable maintenance routines in real-world Supabase applications.