Communitygithub.com

PhuongDeveloper/landingpage

Supabase が管理する PostgreSQL のベストプラクティスガイドです。テーブルやカラムの作成・変更から、マイグレーション、RLS ポリシー、インデックス、クエリ最適化まで、あらゆるデータベース操作に先立って参照することを推奨します。また、スロークエリや高 CPU、タイムアウトなどの診断時にも役立ちます。

landingpage とは?

このスキルは、Supabase が管理する PostgreSQL 向けの包括的なベストプラクティス集です。テーブル・カラムの設計、マイグレーション、RLS ポリシー、インデックス、トリガー、データベース関数、キュー、スケジュールジョブ、ベクトル検索、データ復元など、データベースに関するあらゆる作業の前にロードすべきガイドラインを提供します。8つのカテゴリ(クエリパフォーマンス、接続管理、セキュリティ/RLS、スキーマ設計、並行性/ロック、データアクセスパターン、監視/診断、高度な機能)に分類され、各ルールは実際のSQL例(誤った例と正しい例)を使って解説されています。特に、1カラムの変更や単一クエリであっても、このルールを適用することで、パフォーマンス、セキュリティ、保守性の向上が期待できます。CLIやコードエディタ上で直接参照できるマークダウンファイル群として提供されており、PostgreSQL の公式ドキュメントや Supabase のドキュメントへのリンクも含まれています。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/PhuongDeveloper/landingpage/tree/HEAD/.agents/skills/supabase-postgres-best-practices

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Supabase Postgres ベストプラクティス

Supabase が管理する Postgres 向け包括的なパフォーマンス最適化ガイド。8つのカテゴリにわたるルールで構成され、インパクトの優先順位に従って自動クエリ最適化とスキーマ設計をガイドします。

適用タイミング

以下のような場合にガイドラインを参照してください:

  • SQL クエリの作成やスキーマ設計時
  • インデックスの実装やクエリ最適化時
  • データベースパフォーマンスの問題調査時
  • コネクションプーリングやスケーリング設定時
  • Postgres 固有機能の最適化時
  • Row-Level Security(RLS)の実装時

ルールカテゴリ(優先度順)

優先度カテゴリ影響度プレフィックス
1クエリパフォーマンス致命的query-
2接続管理致命的conn-
3セキュリティ / RLS致命的security-
4スキーマ設計高schema-
5並行性 / ロック中〜高lock-
6データアクセスパターン中data-
7監視 / 診断低〜中monitor-
8高度な機能低advanced-

使い方

詳細な説明と SQL 例については、個別のルールファイルを参照してください:

references/query-missing-indexes.md
references/query-partial-indexes.md
references/_sections.md

各ルールファイルには以下が含まれます:

  • なぜ重要かについての簡潔な説明
  • 誤った SQL 例とその解説
  • 正しい SQL 例とその解説
  • オプションの EXPLAIN 出力またはメトリクス
  • 追加のコンテキストと参考情報
  • Supabase 固有の注意点(該当する場合)

参考リンク

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

PhuongDeveloper/landingpage

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

PhuongDeveloper/landingpage

Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, declarative schemas, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector); debugging and troubleshooting errors or unexpected behavior on Supabase projects (HTTP errors, Postgres errors, RLS surprises, permission denied, schema cache issues, timeouts, Edge Function crashes, Realtime drops, Storage failures) and reading or querying logs (Logs Explorer, ClickHouse).

PhuongDeveloper/landingpage

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

PhuongDeveloper/landingpage

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

関連スキル