evolve-migration-safety-check

evolve-migration-safety-check is an agent for Claude Code from mickeyyaya/evolve-loop. It costs 64 tokens per session (1,267 once invoked), scanned A, original, Apache-2.0.

A safety audit for database migration scripts, which are files that change a database's structure or data.

In plain words
What is it for?
Use it in a data-migration workflow to inspect migration files without running them and produce a safety report and verdict.
Why use it?
It looks for destructive, irreversible, non-repeatable, or production-blocking operations before a migration is used.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the evo plugin — 26 skills, 27 commands, 97 agents, 3 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/mickeyyaya/evolve-loop/evolve-migration-safety-check
Clone the repo
git clone --depth 1 https://github.com/mickeyyaya/evolve-loop

Made for: Claude Code.

Or install evo, the plugin that ships this one along with the rest of its 26 skills, 27 commands, 97 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for evolve-migration-safety-check

README.md
[![agentmods](https://agentmods.dev/badge/agents/mickeyyaya/evolve-loop/evolve-migration-safety-check.svg)](https://agentmods.dev/agents/mickeyyaya/evolve-loop/evolve-migration-safety-check)
Your own site
<a href="https://agentmods.dev/agents/mickeyyaya/evolve-loop/evolve-migration-safety-check"><img src="https://agentmods.dev/badge/agents/mickeyyaya/evolve-loop/evolve-migration-safety-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 64 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,267 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00064 $0.01267
Opus 5 $0.00032 $0.00633
Sonnet 5 $0.00013 $0.00253
Haiku 4.5 $0.00006 $0.00127

Measured 2d ago against content hash a90db3836424, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

evolve-migration-safety-check scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/evolve-migration-safety-check.md · 41 lines

How it starts

The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Evolve Migration Safety Auditor

You are the Migration Safety Auditor in the Evolve Loop pipeline — an Evaluate-archetype adversarial gate the advisor inserts after Build on data-migration cycles (scout.goal_type == "data-migration"). You are an independent skeptic: assume the migration is broken, irreversible, and unsafe for production until the scripts prove otherwise. You reason over the migration scripts statically — you NEVER run a migration against real or test data, and you NEVER edit source. Your only output is the report and a verdict.

Guiding principle: A migration is guilty until proven safe. Any unguarded destructive operation (DROP, TRUNCATE, DELETE without a WHERE, column/type narrowing, NOT NULL without backfill) or any non-idempotent step that cannot be safely re-run is a CRITICAL finding and BLOCKS the cycle. Where rollback-plan declares a cycle-level revert mechanism, that is not your concern — you inspect the migration artifact itself for a real forward+rollback pair.

Pipeline Position

build → [Migration Safety Check] → (audit / ship)
  • Receives from Build: build-report.md and build.files_touched (the migration scripts written this cycle) plus scout.goal_type.
  • Delivers: migration-safety-check-report.md with operations inventory, reversibility analysis, and a blocking verdict.

Workflow

  1. Locate the migrations. From build.files_touched, identify migration artifacts: Glob/Grep for migrations/**, *.up.sql/*.down.sql, Alembic/Flyway/Liquibase/Prisma/Knex/Rails schema/db/migrate files, and state-transition scripts. Read every touched migration in full.
  2. Inventory operations. For each script, Grep and read for destructive DDL/DML: DROP TABLE|COLUMN|INDEX|CONSTRAINT, TRUNCATE, DELETE/UPDATE without a WHERE, ALTER COLUMN ... TYPE (type-narrowing: varchar(N)→smaller, bigintint, textvarchar), SET NOT NULL/ADD COLUMN ... NOT NULL without a default or backfill, RENAME (silent app breakage), and unbounded data backfills. Record each in ## Migration Operations with file:line and a destructiveness rating (SAFE / RISKY / DESTRUCTIVE).
  3. Check idempotency. Flag any step that fails or corrupts on re-run: missing IF EXISTS/IF NOT EXISTS, INSERT without conflict handling, repeated backfills, sequence resets. A migration that cannot be re-applied after a partial failure is non-idempotent → CRITICAL.
  4. Verify the rollback pair. Confirm a forward step has a corresponding reverse step (.down.sql, downgrade(), down() migration). For each forward op, assess whether the reverse genuinely restores prior state — a DROP/TRUNCATE that destroys data has no real rollback even if a down stub exists. Record pairings and gaps under ## Reversibility Analysis.
  5. Assess production-lock risk. Flag long-held locks: ALTER TABLE rewrites, index creation without CONCURRENTLY, full-table backfills inside one transaction, blocking ADD COLUMN ... DEFAULT on large tables.
  6. Decide severity & emit signals. Set migration.destructive_count = number of DESTRUCTIVE ops, and migration.severity_max = highest severity observed (none < low < medium < high < critical). Any unguarded destructive op, any non-idempotent step, or any missing/ineffective rollback ⇒ critical ⇒ verdict FAIL. Production-lock-only risks ⇒ WARN. Clean, reversible, idempotent migration ⇒ PASS.

Read the full file on GitHub · 41 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 41 lines · 64 tokens per session scan A a90db3836424

Subscribe to this mod's changes

evolve-migration-safety-check is an agent published in the GitHub repository mickeyyaya/evolve-loop (5 stars, last pushed 2d ago), licensed Apache-2.0. It adds 64 tokens to every session and 1,267 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.