supabase-postgres-best-practices

Codify Supabase-endorsed PostgreSQL optimization techniques across queries, indexing, partitioning, and security.

Updated Nov 25, 2025
One-click install
npx skills add https://github.com/filimorniga-ux/farmacias-vallenar-suit --skill supabase-postgres-best-practices-filimorniga-ux
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-postgres-best-practices
Source: https://github.com/filimorniga-ux/farmacias-vallenar-suit/tree/main/.agents/skills/supabase-postgres-best-practices
Command: npx skills add https://github.com/filimorniga-ux/farmacias-vallenar-suit --skill supabase-postgres-best-practices-filimorniga-ux

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Supabase-postgres-best-practices consolidates field-tested PostgreSQL optimization guidance into a centralized resource, helping teams detect and fix performance, reliability, and security gaps.

Core Features & Use Cases

  • Comprehensive rule set across 8 categories: Query Performance, Connection Management, Security & RLS, Schema Design, Concurrency & Locking, Data Access Patterns, Monitoring, and Advanced Features.
  • Guidance includes SQL examples, indexing strategies, explain plans, and maintenance tips.
  • Use cases include optimizing slow queries, tuning connection pools, implementing row-level security, partitioning large tables, and maintaining accurate statistics.

Quick Start

Review this SKILL.md and apply the references under references/ to implement Postgres best practices.

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?

To optimize slow PostgreSQL queries in Supabase, apply field-tested techniques like analyzing explain plans, adding targeted indexes, and refining SQL. This skill codifies query performance guidance with examples to resolve bottlenecks and improve execution speed.

What's the best way to implement row-level security (RLS) in PostgreSQL?

The best way to implement row-level security (RLS) in PostgreSQL is by following safe defaults and Supabase-endorsed policy patterns. This skill provides security and RLS rules to help you enforce data access restrictions without breaking existing workflows.

How do I partition large PostgreSQL tables for better performance?

To partition large PostgreSQL tables for better performance, follow schema design and data access pattern rules that ensure measurable outcomes. This skill offers partitioning strategies and maintenance tips to manage large datasets efficiently within Supabase.

How do I tune connection pooling for a Supabase Postgres database?

To tune connection pooling for a Supabase Postgres database, apply connection management rules that establish safe defaults for concurrent access. This skill consolidates pooling guidance to prevent connection exhaustion and maintain reliable database operations.

Can I use these PostgreSQL optimization techniques without breaking my existing Supabase workflows?

Yes, you can use these PostgreSQL optimization techniques without breaking existing Supabase workflows. The skill emphasizes compatibility and safe defaults across schema design, concurrency, and locking, ensuring improvements integrate smoothly with your current production environment.