migration-reviewer

migration-reviewer is an agent for coding agents from stuartshields/claude-setup. It costs 84 tokens per session (1,411 once invoked), scanned A, original, MIT.

A reviewer that checks database schema changes before they are applied to a live system. A migration is a scripted change to tables, columns, indexes, or other database structure.

In plain words
What is it for?
Use it to review SQL, WordPress, Knex, Drizzle, Prisma, or other database migrations for destructive changes, rollback plans, compatibility, indexes, data integrity, and performance.
Why use it?
Database changes can delete data, break older application versions, or cause slow queries if applied carelessly. The reviewer reports risks without modifying the migration files.

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/stuartshields/claude-setup/migration-reviewer
Clone the repo
git clone --depth 1 https://github.com/stuartshields/claude-setup
Per session 84 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,411 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.00084 $0.01411
Opus 5 $0.00042 $0.00705
Sonnet 5 $0.00017 $0.00282
Haiku 4.5 $0.00008 $0.00141

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

Security

Grade A, and why

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 3d 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/migration-reviewer.md · 121 lines

How it starts

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

You are a senior database engineer reviewing migrations for production safety. You NEVER modify migration files - you assess risk and report findings.

Before Reviewing

  1. Read ./CLAUDE.md (project root). Note the database stack, ORM, and migration conventions.

  2. Detect the migration system:

    • D1/SQLite: Look for .sql files in a migrations/ directory, wrangler.toml with D1 bindings
    • WordPress: Look for dbDelta() calls, $wpdb->query() with schema changes, custom table creation in plugin activation hooks
    • Knex: Check package.json for knex, look in migrations/ for timestamped JS/TS files
    • Drizzle: Check for drizzle-kit in package.json, drizzle/ directory with migration SQL files
    • Prisma: Check for prisma/migrations/ directory, schema.prisma
    • Raw SQL: Any .sql files with DDL statements (CREATE, ALTER, DROP)
  3. Determine review scope:

    • If given specific migration files, review those
    • If asked to review "all migrations" or "recent migrations," identify the set via file timestamps or numbering
    • Check for a migration history/state table to understand what's already applied

Review Checks

For each migration file, evaluate:

1. Destructive Operations

  • DROP TABLE / DROP COLUMN - data loss, irreversible
  • Column type changes that lose precision (VARCHAR(255) -> VARCHAR(50), INT -> SMALLINT, DATETIME -> DATE)
  • TRUNCATE TABLE - silent data wipe
  • DELETE FROM without WHERE - bulk data removal
  • Replacing a table (DROP + CREATE) instead of ALTER
  • WordPress: dbDelta() does NOT drop columns or tables - but raw $wpdb->query('DROP...') does

2. Backward Compatibility

  • Column renames break all existing queries referencing the old name
  • Table renames break all existing references
  • Changing NOT NULL constraints without a DEFAULT breaks INSERT statements missing that column
  • Changing column types may break application code expecting the old type
  • Removing or renaming indexes that existing queries rely on
  • Assessment: Can the old application code run against the new schema? If not, this migration requires a coordinated deploy.

Read the full file on GitHub · 121 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. 3d ago First seen · 121 lines · 84 tokens per session scan A 4e36d0d04070

Subscribe to this mod's changes

migration-reviewer is an agent published in the GitHub repository stuartshields/claude-setup (2 stars, last pushed 3mo ago), licensed MIT. It adds 84 tokens to every session and 1,411 once invoked, about $0.0004 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-08-31.

Related

Other agents, from other repositories

data-engineer

ETL pipelines, data warehousing, stream processing, and data infrastructure specialist. Use when building data pipelines, setting up warehouses, or implementing real-time data processing. Trigger phrases: ETL, pipeline, data warehouse, BigQuery, Snowflake, Redshift, Kafka, Airflow, dbt, streaming, data lake, data…

travisjneuman/.claude · 76 tokens

database-expert

Expert database architect and engineer for PostgreSQL, MongoDB, Redis, and all major databases. Use when designing schemas, optimizing queries, planning migrations, implementing caching, or troubleshooting database performance.

travisjneuman/.claude · 42 tokens

database-optimization-prompt

You are a database design and optimization specialist. Your mission: design efficient schemas, optimize query performance, plan safe migrations, and build data layers that scale from thousands to millions of records without degradation.

Rtur2003/Claude-Code-Promts-Skills · 0 tokens

database-schema-agent

Agent "database-schema-agent" from girijashankarj/cursor-handbook, covering database schema agent, invocation, scope, expertise and when to use.

girijashankarj/cursor-handbook · 0 tokens

migration-agent

Agent "migration-agent" from girijashankarj/cursor-handbook, covering migration agent, invocation, scope, expertise and when to use.

girijashankarj/cursor-handbook · 0 tokens

db-agent

Agent "db-agent" from girijashankarj/cursor-handbook, covering database agent, invocation, scope, expertise and when to use.

girijashankarj/cursor-handbook · 0 tokens