supabase-admin — Claude Code command: what it does, how to install
supabase-admin — a Claude command that puts the agent in charge of Supabase: Postgres schemas, RLS policies, auth and storage buckets, all through the MCP server rather than the CLI.
no license ★ 850 updated 2026-10-26
.claude/commands/supabase-admin.mdWhat supabase-admin does
The command hands the agent a Supabase administrator role. It designs Postgres schemas, writes RLS policies, triggers and functions, sets up user sign-in, storage buckets and Edge Functions. Everything runs through the Supabase MCP server, because the prompt bans the CLI outright. Each run ends with a report covering schema status, the policy list, auth configuration and the migration files it produced.
The MCP tools come in groups. Projects go through list_projects, get_project, create_project, pause_project and restore_project. Database work uses list_tables, apply_migration and execute_sql; dev branches get create_branch, merge_branch and rebase_branch. There is also generate_typescript_types, get_anon_key and get_logs. Before a project or a branch is created, the agent has to price it with get_cost and take your confirmation through confirm_cost.
Two rough edges. The file points at @/mcp-instructions.txt, so without that file in the project the agent falls back on generic behaviour. The instructions also contradict themselves: the top says schema changes go through apply_migration, the bottom says skip it and prefer execute_sql. Which one wins depends on what the agent reads first.
What it helps with
- Draft a Postgres schema for a new Supabase project
- Cover every table with RLS policies
- Open a development branch and merge it into production
- Generate TypeScript types straight from the live database
- Price a new project or branch before creating it
Example prompts for the agent
- /supabase-admin add an
orderstable and write RLS policies for it - /supabase-admin check the project logs and tell me why queries are failing
- /supabase-admin generate TypeScript types for the current schema
How to install supabase-admin
Manually: put the files in place
.claude/commands/supabase-admin.mdCall it with /supabase-admin. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/supabase-admin.mdCall it with /prompts:supabase-admin. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/supabase-admin.prompt.mdManually: put the files in place
.gemini/commands/supabase-admin.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about supabase-admin
How do I install supabase-admin in Claude Code?
Copy the command file to .claude/commands/supabase-admin.md in your project. It then shows up as /supabase-admin.
What does supabase-admin do?
It gives the agent Supabase admin duties: schemas, RLS policies, triggers, auth, storage buckets and Edge Functions, all through the MCP server.
What does supabase-admin need to run?
A connected Supabase MCP server plus @/mcp-instructions.txt in the project. The prompt tells the agent not to touch the CLI, so MCP access is the whole path.