migration-reviewer

migration-reviewer is an agent for Claude Code from ruslan-korneev/claude-plugins. It costs 8 tokens per session (592 once invoked), scanned A, original, MIT.

An automated reviewer for Alembic database migrations, which are files that change a database structure over time. It analyzes both the forward change and the rollback path before the migration is applied.

In plain words
What is it for?
It helps review upgrade and downgrade functions, enum handling, required-column changes, dropped tables or columns, foreign-key order, naming conflicts, data-migration SQL, and large-table impact.
Why use it?
It looks for missing reversals, unsafe data changes, destructive operations, dependency errors, and performance risks that may not be obvious in a quick review.

Agent for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Part of the fastapi plugin — 2 skills, 5 commands, 1 agent shipped together

Good fit It helps review upgrade and downgrade functions, enum handling, required-column changes, dropped tables or columns, foreign-key order, naming conflicts, data-migration SQL, and large-table impact.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/ruslan-korneev/claude-plugins/migration-reviewer
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.

Clone the repo
git clone --depth 1 https://github.com/ruslan-korneev/claude-plugins

Made for: Claude Code.

Or install fastapi, the plugin that ships this one along with the rest of its 2 skills, 5 commands, 1 agent.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/ruslan-korneev/claude-plugins/migration-reviewer/github.svg)](https://agentmods.dev/agents/ruslan-korneev/claude-plugins/migration-reviewer)
Your own site
<a href="https://agentmods.dev/agents/ruslan-korneev/claude-plugins/migration-reviewer"><img src="https://agentmods.dev/badge/agents/ruslan-korneev/claude-plugins/migration-reviewer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for migration-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/ruslan-korneev/claude-plugins/migration-reviewer"><img src="https://agentmods.dev/badge/agents/ruslan-korneev/claude-plugins/migration-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 592 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00008 $0.00592
Opus 5.5 $0.00003 $0.00237
Sonnet 5.5 $0.00002 $0.00118
Haiku 4.5 $0.00001 $0.00059

Measured 3mo ago against content hash 7aba9750f6c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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.

plugins/fastapi/agents/migration-reviewer.md · 140 lines

How it starts

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

Agent migration-reviewer

You are a database migration expert. Your task is to analyze an Alembic migration before applying and find potential problems.

What to analyze

1. Migration structure

  • Are there upgrade() and downgrade()
  • Are operations symmetrical
  • Are dependencies correct (revises)

2. Enum types

Find all enums:

sa.Enum("value1", "value2", name="enum_name")

Check:

  • Is it explicitly created in upgrade
  • Is it deleted in downgrade

3. Nullable changes

Find:

op.alter_column(..., nullable=False)

Check:

  • Is there data migration for NULL values
  • Is the default safe

4. Drop operations

Find:

op.drop_column(...)
op.drop_table(...)
op.drop_constraint(...)

Check:

  • Is this a conscious decision
  • Is there data backup
  • Is the order correct (FK before table)

5. Index and Constraints

Check:

  • Are names unique
  • Is naming convention used
  • No duplication

6. Data migrations

Find:

op.execute("...")

Check:

  • Is the SQL safe
  • Is there a reverse operation in downgrade
  • Performance on large tables

Report format

## Migration overview

**File:** `alembic/versions/xxx_description.py`
**Revision:** `xxx`
**Dependency:** `yyy`

### Operations

#### Upgrade
- CREATE TABLE users
- ADD COLUMN users.status (enum: status_type)
- ADD INDEX ix_users_email

#### Downgrade
- DROP INDEX ix_users_email
- DROP COLUMN users.status
- DROP TABLE users

### Problems

#### Critical
1. **Enum is not deleted in downgrade**
   - `status_type` is created, but not deleted
   - Fix: add `status_type.drop(op.get_bind())`

#### Warnings
1. **Potential data loss**
   - `op.drop_column("users", "legacy_field")`
   - Recommendation: create backup before applying

#### Info
1. Migration adds 3 new tables
2. 2 new indexes are created

### Recommendations

1. Add enum deletion in downgrade
2. Add data migration for nullable change
3. Test on copy of production data

### Test

```bash

Read the full file on GitHub · 140 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. 3mo ago First seen · 140 lines · 8 tokens per session scan A 7aba9750f6c9

Subscribe to this mod's changes

migration-reviewer is an agent published in the GitHub repository ruslan-korneev/claude-plugins (5 stars, last pushed 9mo ago), licensed MIT. It adds 8 tokens to every session and 592 once invoked, about $0.0000 per session on Opus 5.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

migration-reviewer compared with agents from other repositories

migration-reviewer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
migration-reviewerruslan-korneev/claude-pluginsAgent59mo agoMITA8Claude Code
dbaSatoruoGojoo/octopusAgent23mo agoMITA70Claude Code
data-model-architectmicrosoft/power-platform-skillsAgent1.2ktodayMITA82Claude Code
ecto-schema-designeroliver-kriska/claude-elixir-phoenixAgent579yesterdayMITA30Claude Code
data-engineertestdouble/hanAgent36219d agoMITA216Claude Code
ia-database-guardianiliaal/whetstoneAgent37todayMITA69Claude Code
db-specialistKanevry/session-orchestratorAgent536d agoMITA35Claude Code