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

関連スキル

performance-review
anthropic
自己評価、マネージャーテンプレート、キャリブレーション準備を含むパフォーマンスレビューを構成します。レビューシーズンが始まり、自己評価が必要なときに使用します。
tao-port-huggingface-model
nvidia
HuggingFaceのコンピュータビジョンモデルをNVIDIA TAO Toolkitエコシステム(tao-core設定、tao-pytorchトレーナー、tao-deploy TensorRTパイプライン)に統合します。使用…
firecrawl-search
firecrawl
Web検索とオプションのコンテンツスクレイピング。検索結果をJSONで返し、オプションでページ全体のコンテンツも取得可能。
writing-clickhouse-queries
posthog
PostHogのプロダクトコードにおいて、パフォーマンスの高いClickHouseクエリを作成するためのガイド。HogQLクエリランナーの作成や、新製品向けのClickHouseテーブルの設計などに使用します。
wp-plugin-development
firecrawl
WordPressプラグイン開発時に使用:アーキテクチャとフック、アクティベーション/ディアクティベーション/アンインストール、管理UIと設定API、データストレージ、cron/タスク、セキュリティ…
peekaboo
firecrawl
Peekaboo CLIを使用してmacOSのUIをキャプチャし、自動化します。
to-prd
mattpocock
現在の会話コンテキストをPRDに変換し、プロジェクトの課題トラッカーに公開します。ユーザーが現在のコンテキストからPRDを作成したい場合に使用します。
developmentdocumentproject-management
relay-e2e-test
facebook
Relay向けのMarkdown駆動のE2Eテストを作成・実行します。フィクスチャ形式、サーバー/クライアントコードパターン、インタラクションDSL、スナップショット、テスト実行をカバーします。