---
title: "Best agent skills for database migrations: 5 compared (2026)"
canonical_url: https://cookiesforai.app/best/best-agent-skills-for-database-migrations
last_updated: 2026-10-01
type: article
summary: "database-migration from wshobson/agents is the best agent skill for safe migrations in Sequelize, TypeORM and Prisma apps; Supabase's Postgres Best Practices is the pick for SQL migrations on any Postgres."
---

# Best agent skills for writing database migrations safely

Updated 2026-10-01. First published 2026-10-01.

The best agent skill for writing database migrations safely in a Node.js app is database-migration from wshobson/agents: its Sequelize, TypeORM and Prisma templates each carry an undo step, and it shows zero-downtime renames and type changes. For SQL migrations on any Postgres, pick Supabase's Postgres Best Practices. We compared 5 skills on how directly they cover safe migrations, which stacks they fit, the agents their publishers document, and license. Facts checked on 2026-10-01.

| Name | Best for | Made by | License | Notes | Checked |
|---|---|---|---|---|---|
| [Database migration](https://cookiesforai.app/skills/wshobson/database-migration) | Zero-downtime migrations with rollbacks in Sequelize, TypeORM or Prisma | Seth Hobson | MIT | 40,142 stars | 2026-10-02 |
| [Postgres Best Practices](https://cookiesforai.app/skills/supabase/supabase-postgres-best-practices) | Safe SQL, constraints and locking on any Postgres | Supabase | MIT | 2,671 stars | 2026-10-02 |
| [Neon Postgres](https://cookiesforai.app/skills/neondatabase/neon-postgres) | Rehearsing a migration on a branch of production data on Neon | Neon | Apache-2.0 | 98 stars | 2026-10-02 |
| [Supabase](https://cookiesforai.app/skills/supabase/supabase) | Creating and committing migrations with the Supabase CLI | Supabase | MIT | 2,671 stars | 2026-10-02 |
| [Prisma upgrade to v7](https://cookiesforai.app/skills/prisma/prisma-upgrade-v7) | Upgrading a project from Prisma ORM 6 to 7 | Prisma | MIT | 68 stars | 2026-10-02 |

## database-migration: zero-downtime patterns for Node.js ORMs

database-migration is an agent skill in Seth Hobson's wshobson/agents marketplace for writing schema and data migrations in Node.js projects that use Sequelize, TypeORM or Prisma. It is the only skill here written for the migration job alone. Its strength is that each template pairs the command that runs a migration with the one that undoes it, and it shows zero-downtime patterns: a column rename in three steps across two deploys, a type change through a temporary column, a transaction that rolls back on error, and a checkpoint that copies the table to a backup and restores it if a check fails. Its limit is that some examples are not safe on large tables as written: the address split reads every row and updates them one at a time, and the type-change example drops the old column inside the same migration. Nothing covers Django, Rails, Alembic or Go tools. The folder last changed on 2026-05-22, the oldest of the five. See [Database migration](/skills/wshobson/database-migration).

## Postgres Best Practices: SQL rules for any Postgres

Postgres Best Practices, skill name supabase-postgres-best-practices, is Supabase's rule set for Postgres running anywhere, for teams that write SQL migrations by hand or review what an ORM generates. Its description tells the agent to load it before any change to tables, columns, migrations, RLS policies or indexes, even a one-column change. Its strength is concrete SQL: 31 rule files, each with an incorrect and a correct example. One shows how to add constraints so a migration can run twice without failing, since Postgres has no ADD CONSTRAINT IF NOT EXISTS; another keeps transactions short to avoid lock contention. Its limit for this job is that it is a general Postgres guide: none of its rules is about zero-downtime releases, backfills or rollback plans, and it does nothing for MySQL or SQLite. The supabase/agent-skills repository had 2,671 GitHub stars on 2026-10-01. MIT. See [Postgres Best Practices](/skills/supabase/supabase-postgres-best-practices).

## neon-postgres: test the migration on a copy of production

neon-postgres is Neon's agent skill for Postgres hosted on Neon, for teams who want to try every migration on real data before it reaches production. Its strength is the safest test setup of the five: the agent runs each migration first on a branch of production, a copy-on-write clone with its own compute, and always over the direct connection rather than the pooled one. It explains the misleading errors a pooled connection causes during migrations, such as Prisma Migrate's `prepared statement "s0" already exists`, none of which mention pooling. The migrations themselves stay in your ORM, and query or index questions go to a separate postgres-best-practices skill. Its limit is that most of this assumes Neon: elsewhere only the pooled versus direct advice carries over, and branch actions need the Neon CLI or the Neon MCP server. neondatabase/agent-skills had 97 GitHub stars on 2026-10-01; the folder last changed on 2026-09-23. See [Neon Postgres](/skills/neondatabase/neon-postgres).

## Supabase: migrations through the Supabase CLI

The Supabase skill is Supabase's own agent skill for any Supabase task, including schema changes, for projects whose database lives on Supabase. Its strength for migrations is a clear workflow per project type. In declarative projects the agent edits supabase/schemas/ and generates the migration. In imperative projects it iterates with execute_sql or `supabase db query`, runs the advisors, then writes one clean migration with `supabase db pull`. It warns against apply_migration while iterating, because each call writes a history entry and later diffs come out empty or conflicting, and it creates new files with `supabase migration new` instead of inventing file names. Its limit is that it teaches Supabase's tooling, not migration safety in general: there is nothing on zero-downtime renames or backfills, and `supabase db advisors` needs CLI v2.81.3 or newer. The folder last changed on 2026-09-28. MIT, from the repository's LICENSE file. See [Supabase](/skills/supabase/supabase).

## prisma-upgrade-v7: when the migration is a version upgrade

prisma-upgrade-v7 is Prisma's agent skill for moving an existing project from Prisma ORM 6 to 7, for teams whose migration is an ORM upgrade rather than a schema change. Its strength is order: ten steps from package updates through the new prisma-client generator with an explicit output path, prisma.config.ts, a driver adapter such as @prisma/adapter-pg, and explicit environment loading, with each breaking change rated critical or high and given its own reference file. It stops MongoDB projects at the start, because Prisma 7 has no MongoDB connector. Its limit is that it does not help write schema migrations; prisma migrate appears only as a command to run after the upgrade, and Prisma's README says new projects now default to Prisma ORM 8. It needs Node.js 20.19.0 and TypeScript 5.4.0 or newer. prisma/skills had 68 GitHub stars on 2026-10-01, and the folder changed on 2026-09-29, the newest of the five. See [Prisma upgrade to v7](/skills/prisma/prisma-upgrade-v7).

## wshobson's database-migrations plugin holds commands, not skills

wshobson/agents also has a separate plugin folder, [plugins/database-migrations](https://github.com/wshobson/agents/tree/main/plugins/database-migrations), whose name is easy to confuse with the skill above. On 2026-10-01 it held no skills. It holds two agents, database-admin and database-optimizer, and two commands, sql-migrations and migration-observability. The sql-migrations command goes further on safety than any skill in our table: it covers the expand and contract pattern, `CREATE INDEX CONCURRENTLY`, backfills in batches of 10,000 rows, constraints added as NOT VALID, and Flyway and Alembic examples for PostgreSQL, MySQL and SQL Server. You get it by installing the database-migrations plugin from the wshobson/agents marketplace; the folder has Claude Code and Codex plugin manifests. Because there is no SKILL.md in it, it is not in our table.

## Convex: two migration skills we have not listed yet

Convex publishes two migration skills in [get-convex/agent-skills](https://github.com/get-convex/agent-skills), which had 62 GitHub stars on 2026-10-01 and is Apache-2.0. It is Convex's own account, so the skills meet our listing rule; we have not added them yet.

- [convex-migrate](https://github.com/get-convex/agent-skills/tree/main/skills/convex-migrate) is a short four-step pattern: add the new field as optional, backfill with @convex-dev/migrations, verify every row, then make the field required.
- [convex-migrate-rehearse](https://github.com/get-convex/agent-skills/tree/main/skills/convex-migrate-rehearse) runs the same change first on a preview deployment seeded with a production snapshot and keeps the snapshot as the rollback, with a warning that restoring it loses data written after it was taken. Preview deployments need a Preview Deploy Key, which the skill notes is a paid-tier feature.

For a Convex app, these fit better than anything in our table.

## What AI assistants answered

In our [October 2026 field study](/research/ai-assistants-field-study-october-2026) we asked "Find me an agent skill for writing database migrations safely." on 2026-10-01, and each engine answered differently. ChatGPT named migration-safety and database-migrations skills from two repositories. Google AI Mode named two community database-migrations skills. Grok named write-safe-migrations and database-migrations. Gemini named no third-party skill and offered to build one. Perplexity was not run on this question. The answers changed with the engine, so a skill named once is no sign that it is the right one for your stack.

## How we compared

We read the SKILL.md and folder of each of the 5 skills on GitHub on 2026-10-01, plus the rule file list of Postgres Best Practices, the contents of wshobson's database-migrations plugin and both Convex skills. We ranked by four criteria in this order: how directly the skill covers safe migrations (rollback, zero downtime, testing before production), how many stacks it fits, which agents the publisher documents, and license. Stars and last-change dates come from the GitHub API on the same day. We did not run any migration with these skills and did not measure the quality of what agents wrote with them.

## How to choose

- If your app uses Sequelize, TypeORM or Prisma and you need a rename or type change without downtime, start with database-migration, and split its type-change example across two deploys the way it already splits renames.
- If you write SQL migrations for Postgres, add Postgres Best Practices on top of whichever skill you pick; it works on any host.
- If your database is on Neon or Supabase, add that vendor's skill: neon-postgres to rehearse on a branch and run over the direct connection, the Supabase skill to create and commit migrations with the Supabase CLI.
- If you are upgrading from Prisma 6 to 7, use prisma-upgrade-v7, and stop if the project uses MongoDB.
- If your backend is Convex, use convex-migrate-rehearse from get-convex/agent-skills.

## Questions people ask

### What is the best agent skill for writing database migrations safely?

For Node.js apps on Sequelize, TypeORM or Prisma, database-migration from wshobson/agents: every template has a down step, and it shows zero-downtime renames and type changes. For hand-written SQL on Postgres, add Supabase's Postgres Best Practices. On Neon, neon-postgres has the agent test each migration on a branch of production data first.

### Does the database-migrations plugin in wshobson/agents contain a skill?

No. On 2026-10-01 the plugins/database-migrations folder held two agents (database-admin and database-optimizer) and two commands (sql-migrations and migration-observability), and no SKILL.md. The skill is database-migration, in the separate framework-migration plugin of the same repository.

### Do these migration skills work in Codex, Cursor or GitHub Copilot?

Yes, through the skills CLI, and the publishers name more. wshobson/agents documents Claude Code, Codex, Cursor, OpenCode, Antigravity CLI, GitHub Copilot and Pi. Supabase names Claude Code, GitHub Copilot, Cursor and Cline. Neon documents Claude Code, Cursor, Kimi Code CLI and Pi. Prisma points to the skills CLI for any agent that reads SKILL.md files.


## Sources

- [database-migration SKILL.md (wshobson/agents)](https://github.com/wshobson/agents/blob/main/plugins/framework-migration/skills/database-migration/SKILL.md)
- [database-migrations plugin folder (wshobson/agents)](https://github.com/wshobson/agents/tree/main/plugins/database-migrations)
- [supabase-postgres-best-practices SKILL.md and rule files](https://github.com/supabase/agent-skills/tree/main/skills/supabase-postgres-best-practices)
- [supabase SKILL.md](https://github.com/supabase/agent-skills/blob/main/skills/supabase/SKILL.md)
- [neon-postgres SKILL.md](https://github.com/neondatabase/agent-skills/blob/main/skills/neon-postgres/SKILL.md)
- [prisma-upgrade-v7 SKILL.md](https://github.com/prisma/skills/blob/main/prisma-upgrade-v7/SKILL.md)
- [convex-migrate and convex-migrate-rehearse (get-convex/agent-skills)](https://github.com/get-convex/agent-skills/tree/main/skills)
