Postgres Best Practicesbởi Supabase

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

npx skills add https://github.com/supabase/agent-skills --skill supabase-postgres-best-practices

Supabase Postgres Best Practices

Comprehensive performance optimization guide for Postgres, maintained by Supabase. Contains rules across 8 categories, prioritized by impact to guide automated query optimization and schema design.

When to Apply

Reference these guidelines when:

  • Writing SQL queries or designing schemas
  • Implementing indexes or query optimization
  • Reviewing database performance issues
  • Configuring connection pooling or scaling
  • Optimizing for Postgres-specific features
  • Working with Row-Level Security (RLS)

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Query PerformanceCRITICALquery-
2Connection ManagementCRITICALconn-
3Security & RLSCRITICALsecurity-
4Schema DesignHIGHschema-
5Concurrency & LockingMEDIUM-HIGHlock-
6Data Access PatternsMEDIUMdata-
7Monitoring & DiagnosticsLOW-MEDIUMmonitor-
8Advanced FeaturesLOWadvanced-

How to Use

Read individual rule files for detailed explanations and SQL examples:

references/query-missing-indexes.md
references/query-partial-indexes.md
references/_sections.md

Each rule file contains:

  • Brief explanation of why it matters
  • Incorrect SQL example with explanation
  • Correct SQL example with explanation
  • Optional EXPLAIN output or metrics
  • Additional context and references
  • Supabase-specific notes (when applicable)

References

Skills liên quan

minecraft-plugin-development
by github
Use this skill when building or modifying Minecraft server plugins for Paper, Spigot, or Bukkit, including plugin.yml setup, commands, listeners, schedulers,…
swift-mcp-server-generator
by github
Generate complete, production-ready MCP server projects in Swift with the official SDK. Scaffolds full project structure with Package.swift, source files organized by capability (Tools, Resources, Prompts), and unit tests Includes templates for main.swift with ServiceLifecycle integration, Server.swift configuration, and handler implementations for tools, resources, and prompts Provides example tool definitions (greet, calculate) and resource/prompt handlers with proper error handling and...
setup-api-key
by runwayml
Guide users through obtaining and configuring a Runway API key
fix-security-vulnerability
by sentry
Analyze and propose fixes for Dependabot security alerts
azure-prepare
by microsoft
Prepare Azure applications for deployment with infrastructure-as-code, configuration, and containerization. Generates Bicep or Terraform infrastructure code, azure.yaml configuration, and Dockerfiles based on application type and deployment target Requires mandatory plan-first workflow: analyze workspace, gather requirements, select recipe (AZD, AZCLI, Bicep, or Terraform), design architecture, then execute only after user approval Covers new app creation, modernization, and updates; routes...
mcpc
by apify
Use mcpc CLI to interact with MCP servers - call tools, read resources, get prompts. Use this when working with Model Context Protocol servers, calling MCP…
automate-github-issues
by google-labs-code
Set up automated GitHub issue triage and resolution using parallel Jules coding agents
eval-result-interpreter
by microsoft
Analyzes Copilot Studio evaluation CSV results using Microsoft's Triage & Improvement Playbook. Returns a SHIP / ITERATE / BLOCK verdict with root cause…