Skip to content

Database Migration Guide

Plan and write schema/data migrations with rollback and zero-downtime patterns

Repository
wshobson/agents
Stars
42,095
Licence
MIT
Files
2 files

What it does

When installed, the agent gets guidance and code patterns for changing a database safely: creating tables, adding or renaming columns, converting column types, transforming data, and writing rollback ('down') steps. It covers Sequelize, TypeORM and Prisma examples and staged approaches meant to avoid downtime. It mainly shapes the code the agent writes for you; the skill itself does not run anything against a database.

Great for

  • Backend developers changing a schema in an app that uses Sequelize, TypeORM or Prisma
  • Teams planning a zero-downtime column rename or type change
  • Engineers who want rollback-ready migration files written for them

Skip it if

  • Running migrations directly against production without review, since the examples modify live data and the agent could apply them incorrectly
  • Databases or ORMs outside the covered examples, where the patterns may not transfer
  • Anyone expecting a guaranteed-safe migration: the examples are illustrative and some (such as the type-change and address-split examples) can lose data or are slow on large tables

Try asking

  • “Write a Sequelize migration that adds a non-null status column with a default to the users table”
  • “Plan a zero-downtime rename of the name column to full_name in three steps”
  • “Create a TypeORM migration to change age from string to integer safely”
  • “Help me write a rollback for a migration that splits address_string into street, city and state”
Step-by-step guide: how to use Database Migration GuideInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 2 original files, the MIT licence and an attribution note.

    database-migration.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip database-migration.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip database-migration.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Test every migration and its down step on a copy of production data before running it live
  • Ask the agent to review data-loss risks and lock times for your table size before applying changes
  • Keep the zero-downtime multi-step approach for large tables and verify each step deploys cleanly

What's inside

  • references/details.md
  • SKILL.md

Redistributed unmodified from wshobson/agents under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.