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

관련 스킬

encore-testing
encoredev
Encore.ts에서 Vitest로 API와 서비스를 테스트합니다.
search-company-knowledge
openai
회사 지식 베이스(Confluence, Jira, 내부 문서)를 검색하여 내부 개념, 프로세스 및 기술 세부 사항을 찾고 설명합니다. 에이전트가...
signals-scout-data-pipelines
posthog
PostHog 데이터 파이프라인용 시그널 스카우트 — CDP 대상 및 변환, 배치 내보내기, hog 플로우. 전송 실패, 성능 저하 등을 감시합니다.
wds-docs
wix
Wix 디자인 시스템 컴포넌트 참조. @wix/design-system으로 UI를 구축하거나, 컴포넌트를 선택하거나, props와 예제를 확인할 때 사용합니다. "what…"에서 트리거됩니다.
implementing-llms-litgpt
firecrawl
Lightning AI의 LitGPT를 사용하여 20개 이상의 사전 학습된 아키텍처(Llama, Gemma, Phi, Qwen, Mistral)로 LLM을 구현하고 훈련합니다. 깔끔한 모델이 필요할 때 사용하세요…
release-audit
nvidia
Warp 릴리스 감사 보고서를 생성합니다 (사전 릴리스 또는 RC, 버전 문자열과 헤드 참조에서 자동 감지).
add-dataverse
microsoft
Dataverse 테이블을 생성된 TypeScript 모델 및 서비스와 함께 Power Apps 코드 앱에 추가합니다. 새 Dataverse 테이블을 만들 수도 있습니다. 다음에 연결할 때 사용합니다...
firecrawl-search
firecrawl
전체 페이지 콘텐츠 추출과 함께 웹 검색을 수행하고, Firecrawl의 연구 논문 색인으로 라우팅합니다. 사용자가 웹 검색이나 찾기를 요청할 때마다 이 스킬을 사용하세요.