← All workflows
Database / Workflow kit

Review a Postgres migration

A migration review that identifies the affected queries and a repeatable staging check.

Install the skills

From the project you want to work in, use Node.js 22.20 or later, npm and Git. Run the block below to copy the selected skills into .claude/skills/. Existing copies with the same names can be replaced.

Project terminal
npx --yes skills@1.10.0 add supabase/agent-skills@c9be0e931b7930f7d02126d04774d904c381e7d7 --skill supabase-postgres-best-practices supabase --agent claude-code --copy --yes

Start Claude Code in that project and enter /skills to check the installed names.

Try it on your project

Bring along · A SQL migration, its rollback strategy and a development dataset that reflects the relevant access patterns.

  1. Read the migration with its calling code and identify which roles and queries it changes.
  2. Check index coverage, lock behavior and row access using the Postgres guidance. In a Supabase project, inspect the client and Auth assumptions too.
  3. Prepare comparison queries and rehearse the migration in a disposable database. Keep hosted MCP inspection read-only.
Starter prompt
Review this migration against its calling code. Flag lock or access risks with line references. Give me a staging rehearsal and rollback check. If I supply schema output, use it. Keep the database unchanged during review.

Check the result

The review names the affected role and query. The proposed rehearsal includes a baseline, the changed behavior and a rollback observation.

Optional connections

You can supply the same context as a local file or pasted excerpt. To connect a service, run its command in the project and check its status with /mcp inside Claude Code.

Supabase development database

Inspect a development schema alongside the migration under review. Replace YOUR_DEV_PROJECT_REF with your development project reference before running. Sign in through /mcp. The URL requests read-only access and limits the tool groups.

Terminal
claude mcp add --scope local --transport http supabase-dev "https://mcp.supabase.com/mcp?project_ref=YOUR_DEV_PROJECT_REF&read_only=true&features=database,docs"

Provider setup →