Postgres Best Practices

作者: Supabase

來自 Supabase 的 Postgres 效能優化與最佳實踐。在撰寫、審查或最佳化 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

相關技能

hsb-ip-create-top
nvidia
從已驗證的HOLOLINK_def.svh檔案建立或說明固定格式的HSB FPGA_top.sv包裝器。請勿用於def產生或驗證。
debug-issue-with-datadog
langfuse
透過結合 Datadog(APM、日誌、指標)與 Langfuse 儲存庫,對使用者回報的問題、Linear 工單或事件報告進行除錯,以找出根本原因。使用…
google-agents-cli-deploy
google
當使用者想要「部署代理程式」、「部署我的ADK代理程式」、「設定CI/CD」、「設定機密」、「疑難排解部署」,或需要關於Agent Runtime、Cloud Run或GKE部署目標的指引時,應使用此技能。涵蓋部署工作流程、服務帳戶、回滾及生產基礎架構。屬於Google ADK(代理程式開發套件)技能套件的一部分。請勿用於API程式碼模式(請使用google-agents-cli-adk-code)、評估(請使用google-agents-cli-eval)或...
developmentdevops
notseer
sentry
高精度錯誤檢測。每份報告都是確鑿證據,而非猜測。能準確找出邏輯錯誤、空值處理缺陷、非同步問題及邊界情況。
release-go-live-binary-build-matrix
pytorch
當 PyTorch 版本正式發佈時,更新 tools/scripts/generate_binary_build_matrix.py。將 CURRENT_STABLE_VERSION 推進至新的穩定版本,並提升…
wix-cli-dashboard-page
wix
用於建置管理後台、管理頁面、CRUD操作或儀表板設定UI時使用。觸發詞包括儀表板、管理面板、資料…
hf-cloud-aws-context-discovery
huggingface
在任何AWS任務開始時,發現用戶的本地AWS上下文(活躍設定檔、區域、帳戶ID、呼叫者身份)。在任何其他AWS操作之前使用此技能…
extension-user-approval
caffeinelabs
基於審核的使用者管理。
securityproject-managementcommunication