supabase-postgres-best-practices

Apply Supabase Postgres best practices to optimize queries, schemas, and configurations.

Updated Dec 28, 2023
One-click install
npx skills add https://github.com/Immanuel-Detmold/cafe --skill supabase-postgres-best-practices-immanuel-detmold
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-postgres-best-practices
Source: https://github.com/Immanuel-Detmold/cafe/tree/main/.agents/skills/supabase-postgres-best-practices
Command: npx skills add https://github.com/Immanuel-Detmold/cafe --skill supabase-postgres-best-practices-immanuel-detmold

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Supabase Postgres Best Practices consolidates proven performance guidance for Postgres databases to reduce slow queries and misconfigurations.

Core Features & Use Cases

Core features include 8 priority categories (Query Performance, Connection Management, Security & RLS, Schema Design, Concurrency & Locking, Data Access Patterns, Monitoring & Diagnostics, Advanced Features) with explicit incorrect/correct SQL examples and authoritative references; It also supports adoption by developers, DBAs, and automated agents to implement, review, and automate optimizations.

Quick Start

Read SKILL.md to begin applying these best practices in your Postgres deployments.

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 targeted index strategies and query plan analysis. This Skill automates applying best practices across eight priority categories, including query performance and schema design, using explicit correct and incorrect SQL examples to resolve database bottlenecks.

What are the best practices for configuring RLS policies in Supabase?

Best practices for configuring RLS policies in Supabase involve structuring security rules to prevent performance degradation. This Skill provides explicit incorrect and correct SQL examples for Security and RLS, ensuring your row-level security configurations maintain optimal query throughput.

Does this Supabase Postgres optimization guidance work for automated DBA workflows?

Yes, this Supabase Postgres optimization guidance supports automated DBA workflows. It targets developers, DBAs, and AI-assisted workflows by providing eight priority rule categories with query plan guidance and links to official references for automated tooling implementation.

What's the best way to manage database connections and concurrency in Supabase Postgres?

The best way to manage database connections and concurrency in Supabase Postgres is applying specific connection management and locking rules. This Skill consolidates proven guidance across these categories, providing explicit SQL examples to prevent misconfigurations and concurrency issues.

Why does my Supabase schema design cause query performance issues?

Your Supabase schema design causes query performance issues when it violates established data access patterns and indexing strategies. This Skill addresses schema design misconfigurations by automating the application of Postgres best practices with explicit incorrect and correct SQL examples.