supabase-postgres-best-practices

Apply Supabase-maintained Postgres best-practice rules to optimize queries and schemas.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/BrunoAlpezdev/lluvia-de-ideas --skill supabase-postgres-best-practices-brunoalpezdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-postgres-best-practices
Source: https://github.com/BrunoAlpezdev/lluvia-de-ideas/tree/main/.agents/skills/supabase-postgres-best-practices
Command: npx skills add https://github.com/BrunoAlpezdev/lluvia-de-ideas --skill supabase-postgres-best-practices-brunoalpezdev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you prevent slow queries, inefficient schemas, and risky database configurations by applying Supabase-maintained Postgres performance and best-practice rules.

Core Features & Use Cases

  • Postgres performance optimization rules: Covers query performance, connection management, indexing strategies, and maintenance practices with prioritized guidance.
  • Schema and indexing best practices: Includes guidance on composite, covering, partial, and correct index types, plus foreign key indexing and partitioning.
  • Safety and RLS recommendations: Provides patterns for least-privilege access and performant Row Level Security (RLS) policies.

Quick Start

Ask your AI to review your SQL and database design using the supabase-postgres-best-practices ruleset and return the highest-impact fixes with corrected SQL examples.

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?

To optimize slow Postgres queries, you can apply Supabase-maintained performance rules that analyze your SQL using EXPLAIN ANALYZE. This ruleset identifies inefficient execution plans and returns the highest-impact fixes with corrected SQL examples.

What is the best way to design indexes for Postgres pagination issues?

Designing indexes for Postgres pagination requires using the correct index types like composite, covering, and partial indexes. This ruleset provides specific guidance on indexing strategies and foreign key indexing to resolve pagination bottlenecks.

How do I implement performant Row Level Security (RLS) policies?

Implementing performant RLS involves applying least-privilege access patterns to secure your data. This ruleset provides specific safety recommendations for designing RLS policies that maintain database security without degrading query performance.

How do I tune connection pooling for a real-world Postgres system?

Tuning connection pooling for Postgres involves applying configuration best practices for real-world system stability. This ruleset includes connection management guidance to ensure your database handles concurrent connections efficiently.

What are the best practices for Postgres schema design and data types?

Postgres schema design best practices include defining proper constraints and selecting appropriate data types to prevent inefficient schemas. This ruleset applies Supabase-maintained rules to improve your database configuration and structural integrity.

When should I use partitioning instead of standard indexing in Postgres?

Partitioning in Postgres is recommended for managing large datasets when standard indexing strategies become insufficient. This ruleset includes guidance on partitioning and correct index types to help you scale your database effectively.