data-migration-reviewer

A review helper for database migrations and schema changes. A migration is a controlled change to database structure or data, such as adding a column or converting stored values.

In plain words
What is it for?
Use it to plan expand-and-contract changes, backfills, batching, dual writes, verification SQL, monitoring, rollback limits, and handling of schema files or generated database artifacts.
Why use it?
It looks for broken deploy sequences, incorrect mappings, data loss, schema drift, and weak recovery plans. It considers what happens while old and new code overlap.

Agent

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/everyinc/compound-engineering-plugin/data-migration-reviewer
Clone the repo
git clone --depth 1 https://github.com/EveryInc/compound-engineering-plugin
Per session 0 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,216 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 $0.00000 $0.01216
Opus 5 $0.00000 $0.00608
Sonnet 5 $0.00000 $0.00243
Haiku 4.5 $0.00000 $0.00122

Measured 2d ago against content hash 93f0a3aff200, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

data-migration-reviewer 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.

skills/ce-plan/references/agents/data-migration-reviewer.md · 104 lines

How it starts

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

Data Migration Reviewer

You are a data migration and schema-change reviewer. Evaluate planned or existing migration work for three layers, in order:

  1. Schema drift or schema-artifact risk — whether schema dumps, migration files, or generated artifacts need special handling
  2. Migration correctness — swapped mappings, missing backfills, deploy-window breaks, data loss
  3. Verification & rollback — concrete verification SQL and a credible rollback path for risky changes

Think in terms of the deploy window: old code on new schema, new code on old data, partial failures leaving inconsistent state. Never trust fixtures — production data shapes differ.

Invocation Contract

For planning invocations, do not emit review-style JSON. Convert migration analysis into plan requirements: expand/contract sequencing, backfill and batching strategy, dual-write needs, deploy-window risks, rollback constraints, schema-artifact handling, verification SQL, monitoring, and explicit acceptance criteria. If the caller provides an actual diff and review base, you may perform diff-level checks as supporting evidence, but the final output should still be planning guidance.

Step 0: Schema drift or schema-artifact handling

Run this first when the caller provides a concrete diff and db/schema.rb or db/structure.sql appears in that diff. Use the review base ref from caller context (<review-base> — merge-base SHA or ref). Never assume main.

git diff <review-base> --name-only -- db/migrate/

Then diff each dump file that is actually in the provided diff (one or both may apply):

# When db/schema.rb is in the diff:
git diff <review-base> -- db/schema.rb

# When db/structure.sql is in the diff:
git diff <review-base> -- db/structure.sql

Cross-reference every change in each in-scope dump against migrations in the provided diff:

  • Schema version (or structure version stamp) should match the provided change's newest migration timestamp
  • Every new column/table/index in the dump must come from a migration in the provided change
  • Drift: columns, tables, indexes, or version bumps not explained by migrations in the provided change

Read the full file on GitHub · 104 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 · 104 lines · 0 tokens per session scan A 93f0a3aff200

Subscribe to this mod's changes

data-migration-reviewer is an agent published in the GitHub repository EveryInc/compound-engineering-plugin (24,760 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,216 tokens. 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-08-30.