Postgres Best Practices

작성자: Supabase

Postgres 성능 최적화 및 Supabase의 모범 사례입니다. Postgres 쿼리, 스키마 설계 또는 데이터베이스 구성을 작성, 검토 또는 최적화할 때 이 스킬을 사용하세요.

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

관련 스킬

signoz-docs
signoz
사용자가 SigNoz 계측, OpenTelemetry 설정, 쿼리, 대시보드, 알림, 문제 해결, 자체 호스팅 등에 대해 물을 때마다 이 스킬을 먼저 사용하세요.
official
finding-sessions-to-watch
posthog
사용자가 "녹화본을 보고 싶지만 어떤 걸 봐야 할지 모르겠다"는 상태에서 시청할 가치가 있는 짧고 유용한 세션 목록을 제공하도록 안내합니다. 사용자가 어떤 것을 물어볼 때 사용하세요.
official
pinecone:assistant
pinecone-io
Pinecone Assistant를 생성, 관리하고 대화하며 문서 Q&A 및 인용을 처리합니다. 모든 어시스턴트 작업(생성, 업로드, 동기화, 채팅, 컨텍스트 등)을 수행합니다.
official
jetson-speculative-decoding
nvidia
TPOT이 병목일 때 Jetson vLLM 서버에 EAGLE-3 또는 드래프트 모델 추측 디코딩을 추가합니다.
official
wp-wpcli-and-ops
wordpress
WordPress 운영 및 자동화
official
claimable-postgres
neondatabase
Neon의 Claimable Postgres(pg.new)로 즉시 Postgres 데이터베이스를 생성하여 빠른 로컬 개발, 데모, 프로토타이핑 및 테스트 환경에 사용하세요.
official
fluid-pr-guide
microsoft
Fluid Framework에서 PR 제목, PR 설명 또는 PR 본문을 작성, 초안 작성 또는 검토할 때 사용합니다. 제목 스타일, 본문 템플릿 등을 제공합니다.
official
google-drive-api
anthropic
Google Drive에서 파일을 검색, 읽기, 생성, 업데이트, 내보내기 및 공유합니다. 사용자가 Drive에서 파일을 찾거나, Google 문서나 시트를 읽으려고 할 때 사용하세요.
official