Skip to content
Back to skills

Migration Safety

ASecurity

Use when adding or changing a database migration or raw DDL. Lock-aware changes, batched backfills, generated SQL read, lost data named; a risky change gets variants to choose from.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 11, 2026
ai-agentssqldatabase

Security analysis

A100/100

Scanned November 16, 2026

npx -y skills add mvbsoft/keel --skill migration-safety --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Migration Safety?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Migration Safety
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mvbsoft-migration-safety/badge)](https://www.skillsdirectory.com/skills/mvbsoft-migration-safety)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: migration-safety
description: Use when adding or changing a database migration or raw DDL. Lock-aware changes, batched backfills, generated SQL read, lost data named; a risky change gets variants to choose from.
---

# Migration safety

Before merging any schema change:

- **Risky change:** renaming, dropping or retyping a column or table that has data, a new `NOT NULL`
  column without a default on an existing table, moving data between tables, a mass `UPDATE` or
  `DELETE` (the full list: "When to ask" there): before writing it, follow
  `${CLAUDE_PLUGIN_ROOT}/skills/_shared/risky-changes.md` (the variants to offer, the backup
  question, when to ask twice, where the pick is written).
- **Locks:** avoid long exclusive locks on busy tables. In PostgreSQL create indexes `CONCURRENTLY`
  (outside a transaction); add a column nullable, backfill, then add `NOT NULL` with a validated
  constraint.
- **Backfills:** in batches, outside the schema migration, idempotent and resumable; never one huge
  `UPDATE` holding a lock.
- **Undo:** follow the project: down migrations where it writes them; otherwise say how a bad
  release is fixed (one more migration forward, a restore from a backup).
- **Read the SQL:** look at the DDL the tool generates (dry-run or SQL output) and confirm there is no
  unintended table rewrite and no rename generated as drop + add.
- **Data loss:** any drop or destructive change says what data disappears and how to restore it.

keel never runs migrations on its own; only test databases are used in verification.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.