🛠️ Supabase Automation
Supabaseのデータベース操作、テーブル管理、プロジェクト設定、
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Automate Supabase database queries, table management, project administration, storage, edge functions, and SQL execution via Rube MCP (Composio). Always search tools first for current schemas.
🇯🇵 日本人クリエイター向け解説
Supabaseのデータベース操作、テーブル管理、プロジェクト設定、
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o supabase-automation.zip https://jpskill.com/download/3553.zip && unzip -o supabase-automation.zip && rm supabase-automation.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/3553.zip -OutFile "$d\supabase-automation.zip"; Expand-Archive "$d\supabase-automation.zip" -DestinationPath $d -Force; ri "$d\supabase-automation.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
supabase-automation.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
supabase-automationフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › Supabase Automation を使って、最小構成のサンプルコードを示して
- › Supabase Automation の主な使い方と注意点を教えて
- › Supabase Automation を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Rube MCP を介した Supabase の自動化
Composio の Supabase ツールキットを通じて、データベースクエリ、テーブルスキーマ検査、SQL 実行、プロジェクトおよび組織管理、ストレージバケット、エッジ関数、サービスヘルス監視など、Supabase の操作を自動化します。
前提条件
- Rube MCP が接続されている必要があります (
RUBE_SEARCH_TOOLSが利用可能) - ツールキット
supabaseを使用したRUBE_MANAGE_CONNECTIONSによるアクティブな Supabase 接続 - 現在のツールスキーマを取得するために、常に最初に
RUBE_SEARCH_TOOLSを呼び出してください
セットアップ
Rube MCP の取得: クライアント設定で https://rube.app/mcp を MCP サーバーとして追加します。API キーは不要です。エンドポイントを追加するだけで機能します。
RUBE_SEARCH_TOOLSが応答することを確認して、Rube MCP が利用可能であることを確認します- ツールキット
supabaseを使用してRUBE_MANAGE_CONNECTIONSを呼び出します - 接続が ACTIVE でない場合は、返された認証リンクに従って Supabase 認証を完了します
- ワークフローを実行する前に、接続ステータスが ACTIVE と表示されていることを確認します
コアワークフロー
1. データベーステーブルのクエリと管理
使用する状況: ユーザーがテーブルからデータを読み取ったり、スキーマを検査したり、CRUD 操作を実行したりする場合
ツールシーケンス:
SUPABASE_LIST_ALL_PROJECTS- ターゲットプロジェクトを見つけるためにプロジェクトをリストアップします [前提条件]SUPABASE_LIST_TABLES- データベース内のすべてのテーブルとビューをリストアップします [前提条件]SUPABASE_GET_TABLE_SCHEMAS- 詳細な列型、制約、リレーションシップを取得します [書き込みの前提条件]SUPABASE_SELECT_FROM_TABLE- フィルタリング、ソート、ページネーションを使用して行をクエリします [読み取りに必須]SUPABASE_BETA_RUN_SQL_QUERY- 複雑なクエリ、挿入、更新、削除のために任意の SQL を実行します [書き込みに必須]
SELECT_FROM_TABLE の主要なパラメータ:
project_ref: 20文字の小文字のプロジェクト参照table: クエリするテーブルまたはビューの名前select: カンマ区切りの列リスト (ネストされた選択やprofile->avatar_urlのような JSON パスをサポート)filters:column、operator、valueを持つフィルターオブジェクトの配列order:created_at.descのようなソート式limit: 返す最大行数 (最小 1)offset: ページネーションのためにスキップする行数
PostgREST フィルター演算子:
eq,neq: 等しい / 等しくないgt,gte,lt,lte: 比較演算子like,ilike: パターンマッチング (大文字小文字を区別する / 区別しない)is: IS チェック (null, true, false の場合)in: 値のリストに含まれるcs,cd: 含む / 含まれる (配列)fts,plfts,phfts,wfts: 全文検索のバリアント
RUN_SQL_QUERY の主要なパラメータ:
ref: プロジェクト参照 (20文字の小文字、パターン^[a-z]{20}$)query: 有効な PostgreSQL SQL ステートメントread_only: 読み取り専用トランザクションを強制するブール値 (SELECT に安全)
落とし穴:
project_refは正確に20文字の小文字 (a-z のみ、数字やハイフンなし) である必要がありますSELECT_FROM_TABLEは読み取り専用です。INSERT、UPDATE、DELETE 操作にはRUN_SQL_QUERYを使用してください- PostgreSQL の配列列 (text[], integer[]) の場合、JSON 配列構文
'["item1", "item2"]'ではなく、ARRAY['item1', 'item2']または'{"item1", "item2"}'構文を使用してください - 大文字小文字を区別する SQL 識別子は、クエリ内で二重引用符で囲む必要があります
- 複雑な DDL 操作はタイムアウトする可能性があります (~60秒の制限)。より小さなクエリに分割してください
- エラー 42P01 "relation does not exist" は、通常、引用符で囲まれていない大文字小文字を区別する識別子を意味します
- エラー 42883 "function does not exist" は、非標準のヘルパーを呼び出していることを意味します。
information_schemaクエリを優先してください
2. プロジェクトと組織の管理
使用する状況: ユーザーがプロジェクトをリストアップしたり、設定を検査したり、組織を管理したりする場合
ツールシーケンス:
SUPABASE_LIST_ALL_ORGANIZATIONS- すべての組織 (ID と名前) をリストアップします [必須]SUPABASE_GETS_INFORMATION_ABOUT_THE_ORGANIZATION- スラッグで詳細な組織情報を取得します [オプション]SUPABASE_LIST_MEMBERS_OF_AN_ORGANIZATION- 役割と MFA ステータスを持つ組織メンバーをリストアップします [オプション]SUPABASE_LIST_ALL_PROJECTS- メタデータを持つすべてのプロジェクトをリストアップします [必須]SUPABASE_GETS_PROJECT_S_POSTGRES_CONFIG- データベース設定を取得します [オプション]SUPABASE_GETS_PROJECT_S_AUTH_CONFIG- 認証設定を取得します [オプション]SUPABASE_GET_PROJECT_API_KEYS- API キーを取得します (機密情報です。慎重に扱ってください) [オプション]SUPABASE_GETS_PROJECT_S_SERVICE_HEALTH_STATUS- サービスヘルスをチェックします [オプション]
主要なパラメータ:
ref: プロジェクト固有のツールのプロジェクト参照slug: 組織ツールの組織スラッグ (URL フレンドリーな識別子)services: ヘルスチェックのためのサービスの配列:auth、db、db_postgres_user、pg_bouncer、pooler、realtime、rest、storage
落とし穴:
LIST_ALL_ORGANIZATIONSはidとslugの両方を返しますが、LIST_MEMBERS_OF_AN_ORGANIZATIONはidではなくslugを期待しますGET_PROJECT_API_KEYSはライブシークレットを返します。キーの完全な値をログに記録したり、表示したり、永続化したりしないでくださいGETS_PROJECT_S_SERVICE_HEALTH_STATUSには空でないservices配列が必要です。空の配列はinvalid_requestエラーを引き起こします- 設定ツールは、トークンに必要なスコープがない場合、401/403 を返すことがあります。ワークフロー全体を失敗させるのではなく、適切に処理してください
3. データベーススキーマの検査
使用する状況: ユーザーがテーブル構造、列、制約を理解したり、型を生成したりする場合
ツールシーケンス:
SUPABASE_LIST_ALL_PROJECTS- ターゲットプロジェクトを見つけます [前提条件]SUPABASE_LIST_TABLES- メタデータを持つすべてのテーブルとビューを列挙します [必須]SUPABASE_GET_TABLE_SCHEMAS- 特定のテーブルの詳細なスキーマを取得します [必須]SUPABASE_GENERATE_TYPE_SCRIPT_TYPES- スキーマから TypeScript 型を生成します [オプション]
LIST_TABLES の主要なパラメータ:
project_ref: プロジェクト参照schemas: 検索するスキーマ名の配列 (例:["public"])。すべての非システムスキーマの場合は省略しますinclude_views: テーブルとともにビューを含める (デフォルトは true)include_metadata: 行数推定とサイズを含める (デフォルトは true)include_system_schemas: pg_catalog、information_schema などを含める (デフォルトは false)
GET_TABLE_SCHEMAS の主要なパラメータ:
- `projec
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Supabase Automation via Rube MCP
Automate Supabase operations including database queries, table schema inspection, SQL execution, project and organization management, storage buckets, edge functions, and service health monitoring through Composio's Supabase toolkit.
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active Supabase connection via
RUBE_MANAGE_CONNECTIONSwith toolkitsupabase - Always call
RUBE_SEARCH_TOOLSfirst to get current tool schemas
Setup
Get Rube MCP: Add https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
- Verify Rube MCP is available by confirming
RUBE_SEARCH_TOOLSresponds - Call
RUBE_MANAGE_CONNECTIONSwith toolkitsupabase - If connection is not ACTIVE, follow the returned auth link to complete Supabase authentication
- Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. Query and Manage Database Tables
When to use: User wants to read data from tables, inspect schemas, or perform CRUD operations
Tool sequence:
SUPABASE_LIST_ALL_PROJECTS- List projects to find the target project_ref [Prerequisite]SUPABASE_LIST_TABLES- List all tables and views in the database [Prerequisite]SUPABASE_GET_TABLE_SCHEMAS- Get detailed column types, constraints, and relationships [Prerequisite for writes]SUPABASE_SELECT_FROM_TABLE- Query rows with filtering, sorting, and pagination [Required for reads]SUPABASE_BETA_RUN_SQL_QUERY- Execute arbitrary SQL for complex queries, inserts, updates, or deletes [Required for writes]
Key parameters for SELECT_FROM_TABLE:
project_ref: 20-character lowercase project referencetable: Table or view name to queryselect: Comma-separated column list (supports nested selections and JSON paths likeprofile->avatar_url)filters: Array of filter objects withcolumn,operator,valueorder: Sort expression likecreated_at.desclimit: Max rows to return (minimum 1)offset: Rows to skip for pagination
PostgREST filter operators:
eq,neq: Equal / not equalgt,gte,lt,lte: Comparison operatorslike,ilike: Pattern matching (case-sensitive / insensitive)is: IS check (for null, true, false)in: In a list of valuescs,cd: Contains / contained by (arrays)fts,plfts,phfts,wfts: Full-text search variants
Key parameters for RUN_SQL_QUERY:
ref: Project reference (20 lowercase letters, pattern^[a-z]{20}$)query: Valid PostgreSQL SQL statementread_only: Boolean to force read-only transaction (safer for SELECTs)
Pitfalls:
project_refmust be exactly 20 lowercase letters (a-z only, no numbers or hyphens)SELECT_FROM_TABLEis read-only; useRUN_SQL_QUERYfor INSERT, UPDATE, DELETE operations- For PostgreSQL array columns (text[], integer[]), use
ARRAY['item1', 'item2']or'{"item1", "item2"}'syntax, NOT JSON array syntax'["item1", "item2"]' - SQL identifiers that are case-sensitive must be double-quoted in queries
- Complex DDL operations may timeout (~60 second limit); break into smaller queries
- ERROR 42P01 "relation does not exist" usually means unquoted case-sensitive identifiers
- ERROR 42883 "function does not exist" means you are calling non-standard helpers; prefer information_schema queries
2. Manage Projects and Organizations
When to use: User wants to list projects, inspect configurations, or manage organizations
Tool sequence:
SUPABASE_LIST_ALL_ORGANIZATIONS- List all organizations (IDs and names) [Required]SUPABASE_GETS_INFORMATION_ABOUT_THE_ORGANIZATION- Get detailed org info by slug [Optional]SUPABASE_LIST_MEMBERS_OF_AN_ORGANIZATION- List org members with roles and MFA status [Optional]SUPABASE_LIST_ALL_PROJECTS- List all projects with metadata [Required]SUPABASE_GETS_PROJECT_S_POSTGRES_CONFIG- Get database configuration [Optional]SUPABASE_GETS_PROJECT_S_AUTH_CONFIG- Get authentication configuration [Optional]SUPABASE_GET_PROJECT_API_KEYS- Get API keys (sensitive -- handle carefully) [Optional]SUPABASE_GETS_PROJECT_S_SERVICE_HEALTH_STATUS- Check service health [Optional]
Key parameters:
ref: Project reference for project-specific toolsslug: Organization slug (URL-friendly identifier) for org toolsservices: Array of services for health check:auth,db,db_postgres_user,pg_bouncer,pooler,realtime,rest,storage
Pitfalls:
LIST_ALL_ORGANIZATIONSreturns bothidandslug;LIST_MEMBERS_OF_AN_ORGANIZATIONexpectsslug, notidGET_PROJECT_API_KEYSreturns live secrets -- NEVER log, display, or persist full key valuesGETS_PROJECT_S_SERVICE_HEALTH_STATUSrequires a non-emptyservicesarray; empty array causes invalid_request error- Config tools may return 401/403 if token lacks required scope; handle gracefully rather than failing the whole workflow
3. Inspect Database Schema
When to use: User wants to understand table structure, columns, constraints, or generate types
Tool sequence:
SUPABASE_LIST_ALL_PROJECTS- Find the target project [Prerequisite]SUPABASE_LIST_TABLES- Enumerate all tables and views with metadata [Required]SUPABASE_GET_TABLE_SCHEMAS- Get detailed schema for specific tables [Required]SUPABASE_GENERATE_TYPE_SCRIPT_TYPES- Generate TypeScript types from schema [Optional]
Key parameters for LIST_TABLES:
project_ref: Project referenceschemas: Array of schema names to search (e.g.,["public"]); omit for all non-system schemasinclude_views: Include views alongside tables (default true)include_metadata: Include row count estimates and sizes (default true)include_system_schemas: Include pg_catalog, information_schema, etc. (default false)
Key parameters for GET_TABLE_SCHEMAS:
project_ref: Project referencetable_names: Array of table names (max 20 per request); supports schema prefix likepublic.users,auth.usersinclude_relationships: Include foreign key info (default true)include_indexes: Include index info (default true)exclude_null_values: Cleaner output by hiding null fields (default true)
Key parameters for GENERATE_TYPE_SCRIPT_TYPES:
ref: Project referenceincluded_schemas: Comma-separated schema names (default"public")
Pitfalls:
- Table names without schema prefix assume
publicschema row_countandsize_bytesfrom LIST_TABLES may be null for views or recently created tables; treat as unknown, not zero- GET_TABLE_SCHEMAS has a max of 20 tables per request; batch if needed
- TypeScript types include all tables in specified schemas; cannot filter individual tables
4. Manage Edge Functions
When to use: User wants to list, inspect, or work with Supabase Edge Functions
Tool sequence:
SUPABASE_LIST_ALL_PROJECTS- Find the project reference [Prerequisite]SUPABASE_LIST_ALL_FUNCTIONS- List all edge functions with metadata [Required]SUPABASE_RETRIEVE_A_FUNCTION- Get detailed info for a specific function [Optional]
Key parameters:
ref: Project reference- Function slug for RETRIEVE_A_FUNCTION
Pitfalls:
LIST_ALL_FUNCTIONSreturns metadata only, not function code or logscreated_atandupdated_atmay be epoch milliseconds; convert to human-readable timestamps- These tools cannot create or deploy edge functions; they are read-only inspection tools
- Permission errors may occur without org/project admin rights
5. Manage Storage Buckets
When to use: User wants to list storage buckets or manage file storage
Tool sequence:
SUPABASE_LIST_ALL_PROJECTS- Find the project reference [Prerequisite]SUPABASE_LISTS_ALL_BUCKETS- List all storage buckets [Required]
Key parameters:
ref: Project reference
Pitfalls:
LISTS_ALL_BUCKETSreturns bucket list only, not bucket contents or access policies- For file uploads,
SUPABASE_RESUMABLE_UPLOAD_SIGN_OPTIONS_WITH_IDhandles CORS preflight for TUS resumable uploads only - Direct file operations may require using
proxy_executewith the Supabase storage API
Common Patterns
ID Resolution
- Project reference:
SUPABASE_LIST_ALL_PROJECTS-- extractreffield (20 lowercase letters) - Organization slug:
SUPABASE_LIST_ALL_ORGANIZATIONS-- useslug(notid) for downstream org tools - Table names:
SUPABASE_LIST_TABLES-- enumerate available tables before querying - Schema discovery:
SUPABASE_GET_TABLE_SCHEMAS-- inspect columns and constraints before writes
Pagination
SUPABASE_SELECT_FROM_TABLE: Usesoffset+limitpagination. Increment offset by limit until fewer rows than limit are returned.SUPABASE_LIST_ALL_PROJECTS: May paginate for large accounts; follow cursors/pages until exhausted.SUPABASE_LIST_TABLES: May paginate for large databases.
SQL Best Practices
- Always use
SUPABASE_GET_TABLE_SCHEMASorSUPABASE_LIST_TABLESbefore writing SQL - Use
read_only: truefor SELECT queries to prevent accidental mutations - Quote case-sensitive identifiers:
SELECT * FROM "MyTable"notSELECT * FROM MyTable - Use PostgreSQL array syntax for array columns:
ARRAY['a', 'b']not['a', 'b'] - Break complex DDL into smaller statements to avoid timeouts
Known Pitfalls
ID Formats
- Project references are exactly 20 lowercase letters (a-z): pattern
^[a-z]{20}$ - Organization identifiers come as both
id(UUID) andslug(URL-friendly string); tools vary in which they accept LIST_MEMBERS_OF_AN_ORGANIZATIONrequiresslug, notid
SQL Execution
BETA_RUN_SQL_QUERYhas ~60 second timeout for complex operations- PostgreSQL array syntax required:
ARRAY['item']or'{"item"}', NOT JSON syntax'["item"]' - Case-sensitive identifiers must be double-quoted in SQL
- ERROR 42P01: relation does not exist (check quoting and schema prefix)
- ERROR 42883: function does not exist (use information_schema instead of custom helpers)
Sensitive Data
GET_PROJECT_API_KEYSreturns service-role keys -- NEVER expose full values- Auth config tools exclude secrets but may still contain sensitive configuration
- Always mask or truncate API keys in output
Schema Metadata
row_countandsize_bytesfromLIST_TABLEScan be null; do not treat as zero- System schemas are excluded by default; set
include_system_schemas: trueto see them - Views appear alongside tables unless
include_views: false
Rate Limits and Permissions
- Enrichment tools (API keys, configs) may return 401/403 without proper scopes; skip gracefully
- Large table listings may require pagination
GETS_PROJECT_S_SERVICE_HEALTH_STATUSfails with emptyservicesarray -- always specify at least one
Quick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| List organizations | SUPABASE_LIST_ALL_ORGANIZATIONS |
(none) |
| Get org info | SUPABASE_GETS_INFORMATION_ABOUT_THE_ORGANIZATION |
slug |
| List org members | SUPABASE_LIST_MEMBERS_OF_AN_ORGANIZATION |
slug |
| List projects | SUPABASE_LIST_ALL_PROJECTS |
(none) |
| List tables | SUPABASE_LIST_TABLES |
project_ref, schemas |
| Get table schemas | SUPABASE_GET_TABLE_SCHEMAS |
project_ref, table_names |
| Query table | SUPABASE_SELECT_FROM_TABLE |
project_ref, table, select, filters |
| Run SQL | SUPABASE_BETA_RUN_SQL_QUERY |
ref, query, read_only |
| Generate TS types | SUPABASE_GENERATE_TYPE_SCRIPT_TYPES |
ref, included_schemas |
| Postgres config | SUPABASE_GETS_PROJECT_S_POSTGRES_CONFIG |
ref |
| Auth config | SUPABASE_GETS_PROJECT_S_AUTH_CONFIG |
ref |
| Get API keys | SUPABASE_GET_PROJECT_API_KEYS |
ref |
| Service health | SUPABASE_GETS_PROJECT_S_SERVICE_HEALTH_STATUS |
ref, services |
| List edge functions | SUPABASE_LIST_ALL_FUNCTIONS |
ref |
| Get edge function | SUPABASE_RETRIEVE_A_FUNCTION |
ref, function slug |
| List storage buckets | SUPABASE_LISTS_ALL_BUCKETS |
ref |
| List DB branches | SUPABASE_LIST_ALL_DATABASE_BRANCHES |
ref |
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.