supabase-postgres-best-practices

Apply Supabase Postgres best-practice rules to SQL, schema, and configuration decisions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It solves slow or unreliable Postgres performance by providing actionable, Supabase-maintained best practices for query speed, indexing, schema design, connection management, and RLS safety.

Core Features & Use Cases

  • Postgres performance rulebook across priorities: Helps you apply targeted fixes ranked by impact, from critical query/index issues to advanced features.
  • Incorrect vs. correct SQL patterns: Uses anti-pattern-first guidance so you can spot what hurts performance and rewrite it safely.
  • Operational guidance for tuning & diagnostics: Covers query plan analysis (EXPLAIN ANALYZE), monitoring (pg_stat_statements), and maintenance (VACUUM/ANALYZE), plus connection pooling/limits and concurrency/locking.

Quick Start

Ask the skill to review and optimize your SQL query and explain which best-practice rule(s) apply based on the query pattern and expected performance outcome.

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 in Supabase, you can apply best-practice rules for query speed and indexing. This skill provides anti-pattern-first guidance, showing incorrect vs. correct SQL rewrites to fix performance bottlenecks.

How do I design safe RLS policies in Postgres?

Designing safe RLS policies in Postgres requires applying Supabase best practices for Row Level Security. This skill guides you through RLS policy design by highlighting incorrect patterns and providing correct SQL rewrites to ensure data safety.

What is the best way to analyze a Postgres query plan with EXPLAIN?

Analyzing a Postgres query plan with EXPLAIN involves running EXPLAIN ANALYZE to inspect execution paths. This skill helps you interpret query plans and use pg_stat_statements to identify and resolve performance issues.

How do I fix Postgres connection pool limits in Supabase?

Fixing Postgres connection pool limits in Supabase requires applying best practices for connection management. This skill provides operational guidance on connection pooling and limits to improve database reliability under load.

When do I need to run VACUUM and ANALYZE for Postgres maintenance?

You need to run VACUUM and ANALYZE for Postgres maintenance when managing database bloat and statistics. This skill covers operational maintenance tasks, guiding you on when to execute these commands to maintain query performance.

Does this skill help with Postgres schema design and concurrency locking?

Yes, this skill helps with Postgres schema design and concurrency locking patterns. It applies Supabase best-practice rules to your schema decisions and provides guidance on managing locking and concurrency for reliable performance.