---
name: supabase-essentials
description: Ground rules for using Supabase through the Supabase MCP server, covering picking the right organization and project, preferring a development branch or project, reading the schema before SQL, and getting explicit approval for anything that changes data, schema or cost. Use when the user asks for anything in Supabase and no more specific Supabase skill fits.
---

# Working with Supabase

## Which project

- `list_organizations` and `get_organization`, then `list_projects` and `get_project`. Ask which project when there are several, and say whether it looks like production.
- `get_project_url` and `get_publishable_keys` give the API URL and the public (anon or publishable) keys for app config. Never ask for or print a service-role key.
- Prefer working on a development branch, see `list_branches`, or a dev project over production.

## Read before you write

- `list_tables` shows schemas, tables and columns; `list_extensions` and `list_migrations` show what is installed and applied.
- `execute_sql` runs any SQL. Use it for SELECT queries freely, with LIMITs. Any SQL that changes data needs the same approval as a write.
- `search_docs` answers Supabase how-to questions from the official docs.

## Changes need a yes

- Schema changes go through `apply_migration`, with a clear name, so they are tracked; do not use `execute_sql` for DDL.
- `apply_migration`, data-changing `execute_sql`, `deploy_edge_function`, `create_edge_function_secret`, `update_storage_config`, and any branch or project change need the user's explicit yes on the exact SQL or change, naming the project.
- Creating a project or branch costs money. Show the price from `get_cost`, and call `confirm_cost` only after the user accepts it.
- `pause_project`, `restore_project`, `delete_branch` and `reset_branch` are disruptive; say what will be lost.
