Postgres Best Practices
作者: Supabase
來自 Supabase 的 Postgres 效能優化與最佳實踐。在撰寫、審查或最佳化 Postgres 查詢、資料表設計或資料庫配置時,請使用此技能。
npx skills add https://github.com/supabase/agent-skills --skill supabase-postgres-best-practicesSupabase 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
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Query Performance | CRITICAL | query- |
| 2 | Connection Management | CRITICAL | conn- |
| 3 | Security & RLS | CRITICAL | security- |
| 4 | Schema Design | HIGH | schema- |
| 5 | Concurrency & Locking | MEDIUM-HIGH | lock- |
| 6 | Data Access Patterns | MEDIUM | data- |
| 7 | Monitoring & Diagnostics | LOW-MEDIUM | monitor- |
| 8 | Advanced Features | LOW | advanced- |
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
相關技能
instrument-product-analytics
posthog
Use this skill to add product analytics events (capture calls) that track meaningful user actions in new or changed code. Use it after implementing features or reviewing PRs to ensure key user behaviors are captured. If PostHog is not yet installed, this skill also covers initial SDK setup. Supports any framework or language.
official
create-branch
sentry
依照 Sentry 命名慣例建立 Git 分支。當被要求「建立分支」、「新分支」、「開始一個分支」、「製作一個分支」、「切換到一個新…」時使用。
official
ingestion-pipeline-doctor-nodejs
posthog
Quick reference for PostHog's ingestion pipeline framework and its convention-checking agents.
official
vercel-functions
vercel
Vercel Functions 專家指導 — 無伺服器函式、邊緣函式、Fluid Compute、串流、Cron 工作與執行時期設定。用於設定時…
official
openai-docs
firecrawl
當使用者詢問如何使用OpenAI產品或API進行開發,且需要附有引用的最新官方文件時使用(例如:Codex、Responses API、…)
official
skypilot-multi-cloud-orchestration
firecrawl
針對機器學習工作負載的多雲編排,具備自動成本優化功能。當您需要跨多個雲端執行訓練或批次作業、利用…時使用。
official
grill-me
flutter
持續追問使用者的計畫或設計,直到達成共識,並逐一釐清決策樹的每個分支。適用於使用者想要…
official
compose
factory-ai
用於droid-control工作流程的背景知識——不直接調用。通過Remotion進行視頻組裝——標題卡、佈局、轉場、特效及展示……
official