Postgres Best Practices

Postgres-Performanceoptimierung und Best Practices von Supabase. Nutzen Sie diese Fähigkeit beim Schreiben, Überprüfen oder Optimieren von Postgres-Abfragen, Schema-Designs oder Datenbankkonfigurationen.

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

Verwandte Skills

encore-go-infrastructure
encoredev
Infrastruktur mit Encore Go deklarieren.
official
render-deploy
firecrawl
Anwendungen auf Render bereitstellen, indem Codebasen analysiert, render.yaml-Blueprints generiert und Dashboard-Deeplinks bereitgestellt werden. Verwenden, wenn der Benutzer bereitstellen möchte,…
official
ncbi-datasets-skill
openai
Submit compact NCBI Datasets v2 requests for assembly, genome, taxonomy, and related metadata endpoints. Use when a user wants concise NCBI Datasets summaries;…
official
mapbox-android-patterns
mapbox
Offizielle Integrationsmuster für das Mapbox Maps SDK auf Android. Behandelt Installation, Hinzufügen von Markierungen, Benutzerstandort, benutzerdefinierte Daten, Stile, Kamerasteuerung und…
official
programmatic-seo
sentry
When the user wants to create SEO-driven pages at scale using templates and data. Also use when the user mentions "programmatic SEO," "template pages," "pages…
official
improving-streamlit-design
streamlit
Verbesserung des visuellen Designs in Streamlit-Apps. Verwenden Sie dies beim Verfeinern von Apps mit Symbolen, Badges, Abständen oder Textstilen. Behandelt Material-Symbole, Badge-Syntax, Trennlinien…
official
resemble-detect
github
Deepfake detection and media safety — detect AI-generated audio, images, video, and text, trace synthesis sources, apply watermarks, verify speaker identity,…
official
owasp-docker
microsoft
Wissensdatenbank zu den Top 6 OWASP-Docker-Sicherheitslücken zur Identifizierung, Bewertung und Behebung von Sicherheitsrisiken in containerisierten Docker-Umgebungen – Bereitgestellt von…
official