Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

supabase-migration-deep-dive

Skill by jeremylongshore

Guides database migrations with the Supabase CLI, covering new migration files, zero-downtime schema changes, backfills, rollbacks and TypeScript type generation. Built for developers who change Supabase schemas across environments.

  • Score 76
  • 3k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install supabase-migration-deep-dive

Built from the published package, never by AI.

git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.claude/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/supabase-migration-deep-dive ~/.claude/skills/supabase-migration-deep-dive

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install supabase-migration-deep-dive in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill covers the lifecycle of Supabase migrations, which are timestamped SQL files managed by the Supabase CLI. It shows how to create a migration with npx supabase migration new, test it with a local reset, and promote it to a remote project with db push. It also covers adding RLS policies, indexes and triggers in the same file, and regenerating TypeScript types with supabase gen types.

It includes zero-downtime patterns such as adding nullable columns with defaults, building indexes with CREATE INDEX CONCURRENTLY, and two-phase column renames. It also covers batch backfills using createClient from @supabase/supabase-js, schema versioning with migration list and db diff, and three rollback strategies. It is aimed at developers who manage schema changes across dev, staging and production.

Written from the project's SKILL.md and checked against it.

What it can do

  • Create migrationsCreates timestamped SQL migration files with npx supabase migration new.
  • Zero-downtime changesCovers safe column additions, two-phase renames and concurrent index creation.
  • Batch backfillsShows SDK-based row updates with progress logging and rate limiting.
  • Schema versioningUses migration list and db diff to compare migration state across environments.
  • Rollback strategiesDescribes compensating migrations, migration repair and feature-flagged schema changes.
  • Type generationRegenerates TypeScript types with supabase gen types after schema changes.
  • Migration promotionPromotes migrations from local to staging to production with db push.

What you need

  • Supabase CLI installed
  • @supabase/supabase-js v2 or later
  • Local Supabase running via npx supabase start
  • Understanding of PostgreSQL DDL and transaction behavior

Try asking

  • Create a migration that adds a tags column to my projects table
  • Plan a zero-downtime rename of a column in my Supabase database
  • Write a batch backfill for a new column with progress logging

Good to know

  • Running npx supabase db reset is destructive, as the source notes.
  • CREATE INDEX CONCURRENTLY needs a -- supabase:disable-transaction comment at the top of the migration file.
  • Applied migrations should not be modified; the source advises creating new migrations instead.

Security check

B
  • Allowed to use Write, Edit without limitsIn SKILL.md

Checked automatically: skills/.curated/supabase-migration-deep-dive/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: ReadWriteEditBash(npx supabase:*)Bash(supabase:*)Bash(psql:*)

Alternatives to supabase-migration-deep-dive

All alternatives →
hugging-face-datasetssickn33
94

Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.

AAA Skill 50k
db-repairgarrytan
94

Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.

AAA Skill 34k
alloydb-basicsgoogle
94

Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.

AAA Skill 26k
clickhouse-logs-queriessupabase
94

Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.

AAA Skill 116k
fix-slow-queriespaperclipai
94

Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.

AAA Skill 119k
prisma-8prisma
94

Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.

AAA Skill 48k

Compare with hugging-face-datasets, db-repair or alloydb-basics

supabase-migration-deep-dive: common questions

How do I avoid table locks when changing a Supabase schema?

The source says adding a nullable column with a default does not lock the table on Postgres 11+. It recommends building indexes with CREATE INDEX CONCURRENTLY and doing renames or type changes in two phases.

What should I do when db diff shows unexpected changes?

The source says this usually comes from manual SQL Editor changes. Running supabase db pull captures those changes as a migration.

How do I fix TypeScript types that do not match the new schema?

The source says to delete database.types.ts and regenerate it from --local or --linked using supabase gen types typescript.

How do I install supabase-migration-deep-dive?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is supabase-migration-deep-dive free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is supabase-migration-deep-dive safe to use?

It scores 76 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit without limits). Review the code before you install. How grades work.

What are alternatives to supabase-migration-deep-dive?

Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.

supabase-migration-deep-dive Install

Add to stack

Loading.