Supabase automation

From Zidong-LLC/BIBLIOTECA · View interactive version

Supabase automation is an AI agent skill from the GitHub repository Zidong-LLC/BIBLIOTECA. 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.

How to use this skill

Skill file

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

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.

  1. Verify Rube MCP is available by confirming RUBE_SEARCH_TOOLS responds
  2. Call RUBE_MANAGE_CONNECTIONS with toolkit supabase
  3. If connection is not ACTIVE, follow the returned auth link to complete Supabase authentication
  4. 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:

  1. SUPABASE_LIST_ALL_PROJECTS - List projects to find the target project_ref [Prerequisite]
  2. SUPABASE_LIST_TABLES - List all tables and views in the database [Prerequisite]
  3. SUPABASE_GET_TABLE_SCHEMAS - Get detailed column types, constraints, and relationships [Prerequisite for writes]
  4. SUPABASE_SELECT_FROM_TABLE - Query rows with filtering, sorting, and pagination [Required for reads]
  5. SUPABASE_BETA_RUN_SQL_QUERY - Execute arbitrary SQL for complex queries, inserts, updates, or deletes [Required for writes]

Key parameters for SELECT_FROM_TABLE:

PostgREST filter operators:

Key parameters for RUN_SQL_QUERY:

Pitfalls:

2. Manage Projects and Organizations

When to use: User wants to list projects, inspect configurations, or manage organizations

Tool sequence:

  1. SUPABASE_LIST_ALL_ORGANIZATIONS - List all organizations (IDs and names) [Required]
  2. SUPABASE_GETS_INFORMATION_ABOUT_THE_ORGANIZATION - Get detailed org info by slug [Optional]
  3. SUPABASE_LIST_MEMBERS_OF_AN_ORGANIZATION - List org members with roles and MFA status [Optional]
  4. SUPABASE_LIST_ALL_PROJECTS - List all projects with metadata [Required]
  5. SUPABASE_GETS_PROJECT_S_POSTGRES_CONFIG - Get database configuration [Optional]
  6. SUPABASE_GETS_PROJECT_S_AUTH_CONFIG - Get authentication configuration [Optional]
  7. SUPABASE_GET_PROJECT_API_KEYS - Get API keys (sensitive -- handle carefully) [Optional]
  8. SUPABASE_GETS_PROJECT_S_SERVICE_HEALTH_STATUS - Check service health [Optional]

Key parameters:

Pitfalls:

3. Inspect Database Schema

When to use: User wants to understand table structure, columns, constraints, or generate types

Tool sequence:

  1. SUPABASE_LIST_ALL_PROJECTS - Find the target project [Prerequisite]
  2. SUPABASE_LIST_TABLES - Enumerate all tables and views with metadata [Required]
  3. SUPABASE_GET_TABLE_SCHEMAS - Get detailed schema for specific tables [Required]
  4. SUPABASE_GENERATE_TYPE_SCRIPT_TYPES - Generate TypeScript types from schema [Optional]

Key parameters for LIST_TABLES:

Key parameters for GET_TABLE_SCHEMAS:

Key parameters for GENERATE_TYPE_SCRIPT_TYPES:

Pitfalls:

4. Manage Edge Functions

When to use: User wants to list, inspect, or work with Supabase Edge Functions

Tool sequence:

  1. SUPABASE_LIST_ALL_PROJECTS - Find the project reference [Prerequisite]
  2. SUPABASE_LIST_ALL_FUNCTIONS - List all edge functions with metadata [Required]
  3. SUPABASE_RETRIEVE_A_FUNCTION - Get detailed info for a specific function [Optional]

Key parameters:

Pitfalls:

5. Manage Storage Buckets

When to use: User wants to list storage buckets or manage file storage

Tool sequence:

  1. SUPABASE_LIST_ALL_PROJECTS - Find the project reference [Prerequisite]
  2. SUPABASE_LISTS_ALL_BUCKETS - List all storage buckets [Required]

Key parameters:

Pitfalls:

Common Patterns

ID Resolution

Pagination

SQL Best Practices

Known Pitfalls

ID Formats

SQL Execution

Sensitive Data

Schema Metadata

Rate Limits and Permissions

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.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.