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.
npx agentmods add agents/mickeyyaya/evolve-loop/evolve-migration-safety-checkgit clone --depth 1 https://github.com/mickeyyaya/evolve-loopWrote 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.
[](https://agentmods.dev/agents/mickeyyaya/evolve-loop/evolve-migration-safety-check)<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>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.
| Model | Per session | Once 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 |
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.
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.mdandbuild.files_touched(the migration scripts written this cycle) plusscout.goal_type. - Delivers:
migration-safety-check-report.mdwith operations inventory, reversibility analysis, and a blocking verdict.
Workflow
- Locate the migrations. From
build.files_touched, identify migration artifacts:Glob/Grepformigrations/**,*.up.sql/*.down.sql, Alembic/Flyway/Liquibase/Prisma/Knex/Railsschema/db/migratefiles, and state-transition scripts. Read every touched migration in full. - Inventory operations. For each script,
Grepand read for destructive DDL/DML:DROP TABLE|COLUMN|INDEX|CONSTRAINT,TRUNCATE,DELETE/UPDATEwithout aWHERE,ALTER COLUMN ... TYPE(type-narrowing:varchar(N)→smaller,bigint→int,text→varchar),SET NOT NULL/ADD COLUMN ... NOT NULLwithout 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). - Check idempotency. Flag any step that fails or corrupts on re-run: missing
IF EXISTS/IF NOT EXISTS,INSERTwithout conflict handling, repeated backfills, sequence resets. A migration that cannot be re-applied after a partial failure is non-idempotent → CRITICAL. - 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 adownstub exists. Record pairings and gaps under ## Reversibility Analysis. - Assess production-lock risk. Flag long-held locks:
ALTER TABLErewrites, index creation withoutCONCURRENTLY, full-table backfills inside one transaction, blockingADD COLUMN ... DEFAULTon large tables. - Decide severity & emit signals. Set
migration.destructive_count= number of DESTRUCTIVE ops, andmigration.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.
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.
- 2d ago First seen · 41 lines · 64 tokens per session scan A a90db3836424
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.
Other agents, from other repositories
data-analyst
Analyzes database server configuration and host secrets hygiene findings for a single host bundle.
peer-sql-reviewer
Stage 1 peer code reviewer focused on schema correctness, query quality, and migration safety.
team-database-reviewer
Stage 2 reviewer focused on schema design, query plans, migration strategy, and indexing.
database-architect
PostgreSQL schema design, migrations, indexes, and query optimization.
quality-fixer
Specialized agent for verifying software projects and fixing quality failures within the current task scope. Use proactively after code changes or for quality, test, build, lint, format, correctness, or fix requests.
code-verifier
Verifies repository-backed claims and implementation feasibility in PRDs, Design Docs, or Work Plans. Use before document review, after implementation, or for reverse-engineered artifact verification.