supabase-postgres-best-practices

Apply PostgreSQL performance best practices for Supabase-backed applications.

Updated Jul 12, 2025
One-click install
npx skills add https://github.com/contatomaycon/underchat --skill supabase-postgres-best-practices-contatomaycon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-postgres-best-practices
Source: https://github.com/contatomaycon/underchat/tree/main/.agents/skills/supabase-postgres-best-practices
Command: npx skills add https://github.com/contatomaycon/underchat --skill supabase-postgres-best-practices-contatomaycon

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.

Core Features & Use Cases

  • A catalog of performance rules across 8 categories (Query Performance, Connection Management, Security & RLS, Schema Design, Concurrency & Locking, Data Access Patterns, Monitoring & Diagnostics, Advanced Features), each with explanations and examples.
  • Practical use cases include tuning indexes, reducing lock contention, and ensuring scalable deployments for Supabase-based apps.
  • Use Case: During code reviews, migrations, and automated tooling to enforce best practices across projects.

Quick Start

Read SKILL.md to learn the main rules and consult references/ for topic-specific guidance, then apply the recommendations to your Postgres setup.

Frequently Asked Questions about supabase-postgres-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for PostgreSQL query optimization in Supabase?

PostgreSQL query optimization in Supabase involves applying rules across eight categories including query performance, connection management, and schema design. Use this skill during code reviews, migrations, and deployments to enforce tuning practices like index optimization and lock contention reduction.

How do I tune indexes and improve schema design for a Supabase-backed application?

Tuning indexes and improving schema design requires applying specific performance rules with SQL examples and metrics. This skill provides a catalog of rules for data access patterns and schema design to guide automated optimization and ensure scalable Supabase deployments.

Does this skill cover Row Level Security and connection management for Supabase Postgres?

Yes, it covers Row Level Security and connection management. The skill includes a catalog of performance rules across security, RLS, and concurrency to ensure scalable and secure data access patterns for Supabase-based applications.

What is the best way to monitor Postgres performance and reduce lock contention in Supabase?

Monitoring Postgres performance and reducing lock contention involves applying rules from the monitoring, diagnostics, and concurrency categories. This skill provides explanations and SQL examples to identify bottlenecks and enforce best practices across your database configuration.

Can I use this skill for automated tooling and database migrations?

Yes, you can use this skill for automated tooling and database migrations. It provides a catalog of rules with metrics and references designed to guide automated optimization, enforce best practices, and validate schema changes during project deployments.

When should I not use these Supabase Postgres performance rules?

You should not use these rules if your application does not use Supabase or PostgreSQL. The skill is specifically scoped to Supabase-backed applications and requires applying rules across categories like query performance, concurrency, and advanced features tailored to that environment.