Migration Guard
Asks before Claude touches migrations or runs destructive DB commands, with the risk and the line it found.
Illustration. Actual results depend on the mod, terminal and environment.
Install
Installation is unusual; follow the original author’s instructions
Read the author’s instructions ↗What it accesses
Based on the author’s documentation, checked when listed; use claude plugin validate to check for yourself.
Reads
YesReads pending Write/Edit/Bash/PowerShell/Monitor/MCP tool-call arguments and the session cwd.
Writes files
YesWrites Q&A history into the mod store Claude Code provides (keepHistory can disable it).
Runs commands
NoneNetwork
NoneIntroduction
Migration Guard is a Claude Code function-hooks mod that asks before Claude writes or edits migration files, or runs destructive database commands through Bash, PowerShell, Monitor, or MCP, showing risk level and the matched line.
- Coverage: common ORMs and migrators (Prisma, TypeORM, Rails, Django, Alembic, Supabase, Drizzle, and more), plus direct SQL such as
psql/dropdb. - Choices: deny, allow once, or allow for this file; optional 15-minute batch allow for ordinary migration files (high risk still asks).
- History:
/migration-guardshows recent Q&A (up to 300, secrets masked);off/ononly work when you type them. - Access: the author says it only reads the pending tool-call arguments, keeps history in Claude Code's store, and does not read disk, use the network, or run external commands.
Install by git clone into ~/.claude/skills/migration-guard (no marketplace). Needs Claude Code 2.1.287+. Rule-based; not a backup. Preview is illustrative.
Who it is for
- People who let Claude work on DB-heavy repos and want a confirm step before risky migrations
Requirements
- Claude Code ≥ 2.1.287
- Install by cloning into ~/.claude/skills/migration-guard; no marketplace.
- Rule-based; cannot catch every risk and does not replace backups.