migrate

Installation
SKILL.md

/claude-db:migrate

Migration-safety lint, owned by module db-migration-safety (M22, axis performance) via the db-migration-safety / MSA checks. Default mode is read-only: it analyzes and explains, it does not run the migration.

$ARGUMENTS has two forms:

  • single-file lint<migration-file|migration-dir> [flags]: parse and classify an existing migration (below).
  • diff mode<from-schema> <to-schema> [flags]: two schema paths. Run node scripts/schema-diff.mjs --from <from-schema> --to <to-schema> to generate the up/down migration, then classify the generated migration exactly as in single-file mode.

If no argument is given, ask for one (or point at the project's migration directory).

Diff mode (<from-schema> <to-schema>)

  1. Run node scripts/schema-diff.mjs --from <A> --to <B> to produce the up and down migration; schema-diff.mjs flags destructive steps.
  2. Present the generated up/down migration to the user, with the plain-language summary of each step.
  3. Route every step schema-diff.mjs flagged destructive (DROP TABLE/COLUMN, type narrowing) through the data-loss handshake below before anything is written.
  4. Then classify the generated migration through the same lock/rewrite/reversibility analysis as single-file mode.
Installs
57
GitHub Stars
19
First Seen
Jun 17, 2026
migrate — hainrixz/claude-db