supabase-postgres-best-practices

Apply Postgres optimization rules for SQL, indexes, partitions, and RLS policies in Supabase projects.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Yoriichi-Dang/portfolio --skill supabase-postgres-best-practices-yoriichi-dang
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: supabase-postgres-best-practices
Source: https://github.com/Yoriichi-Dang/portfolio/tree/main/.agents/skills/supabase-postgres-best-practices
Command: npx skills add https://github.com/Yoriichi-Dang/portfolio --skill supabase-postgres-best-practices-yoriichi-dang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill aggregates and applies best-practice guidelines for PostgreSQL optimization in Supabase projects, helping teams reduce query times and improve reliability.

Core Features & Use Cases

  • Systematic performance guidance: provides categorized rules across 8 categories (query performance, connection management, security, etc.) with clear explanations and examples.
  • Reference-driven optimization: links to a comprehensive set of reference files to tailor tuning for specific workloads.
  • Use Case: a developer reviews slow SQL, adds missing indexes, partitions, or RLS policies to improve performance in a production tenant.

Quick Start

Use this skill to review a slow query and apply a recommended optimization from references/query-missing-indexes.md.

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, apply best-practice rules across categories like query performance and connection management, using example SQL snippets and on-demand reference files for tuning guidance.

How do I write efficient RLS policies in Supabase without hurting performance?▼

Write efficient RLS policies in Supabase by following structured best-practice security rules that provide clear explanations and example SQL snippets to ensure row-level security maintains query reliability and speed.

What indexes are missing when my Supabase Postgres query is slow?▼

Identify missing indexes for slow Supabase Postgres queries by reviewing SQL against optimization rules and loading specific documentation from the references directory to apply the correct indexing strategy.

Can I use these Postgres best practices for partitioning tables in Supabase?▼

Yes, you can apply these Postgres best practices to partition tables in Supabase, as the skill provides systematic performance guidance covering partitioning alongside SQL tuning and RLS policy configuration.

When should I not add an index to a Postgres table?▼

You should carefully evaluate adding an index to a Postgres table by checking the categorized optimization rules and reference files, ensuring the tuning strategy matches your specific workload constraints.