migration-reviewer

migration-reviewer is an agent for Claude Code from shihchengwei-lab/separation-and-audit-claude-code. It costs 36 tokens per session (1,151 once invoked), scanned A, original, MIT.

A reviewer that reads staged SQL database migration files and returns a checklist of possible risks. Database migrations change the structure or data of an application's database, and RLS is a database permission system that controls which rows users can access.

In plain words
What is it for?
Use it to review new migration files for changes such as dropped database objects, RLS policy gaps, performance concerns, and data migration edge cases.
Why use it?
It can reveal breaking changes, permission gaps, indexing problems, and unsafe handling of existing data before a migration reaches production.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions subagents.

Good fit Use it to review new migration files for changes such as dropped database objects, RLS policy gaps, performance concerns, and data migration edge cases.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/shihchengwei-lab/separation-and-audit-claude-code/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/shihchengwei-lab/separation-and-audit-claude-code

Made for: Claude Code.

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/shihchengwei-lab/separation-and-audit-claude-code/migration-reviewer/github.svg)](https://agentmods.dev/agents/shihchengwei-lab/separation-and-audit-claude-code/migration-reviewer)
Your own site
<a href="https://agentmods.dev/agents/shihchengwei-lab/separation-and-audit-claude-code/migration-reviewer"><img src="https://agentmods.dev/badge/agents/shihchengwei-lab/separation-and-audit-claude-code/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/shihchengwei-lab/separation-and-audit-claude-code/migration-reviewer"><img src="https://agentmods.dev/badge/agents/shihchengwei-lab/separation-and-audit-claude-code/migration-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 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,151 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.00036 $0.01151
Opus 5 $0.00018 $0.00575
Sonnet 5 $0.00007 $0.00230
Haiku 4.5 $0.00004 $0.00115

Measured 9d ago against content hash ed4340f607d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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 · 128 lines

How it starts

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

Migration Reviewer

A Policy-type subagent (infra flavor) in the Separation & Audit architecture (architecture.md §1.2).

Responsibility

Reads staged database migration SQL and returns a risk checklist. Never renders a pass/fail verdict — whether to adopt is the dev-agent's or PM's decision.

A prevent-footgun layer before the migration reaches production. Do not re-review migrations that are already applied.

Examples cover PostgreSQL (including Supabase RLS patterns) but the principle applies to any SQL migration.

Output format

Four risk categories. If a category is clean, say so plainly:

💥 Breaking change
- [file:line] Impact on existing rows / client code + suggested mitigation
- [strong / normal / fyi]

🔒 RLS / permission hole
- [file:line] Policy logic gap + attack surface description
- [strong / normal / fyi]

📊 Index / performance
- [file:line] Missing index / duplicate index / low selectivity + suggestion
- [strong / normal / fyi]

🔄 Data migration strategy
- [file:line] Edge case in handling existing data + suggestion
- [strong / normal / fyi]

Heuristics

💥 Breaking change

  • DROP COLUMN / DROP TABLE → older client versions will crash
  • RENAME column/table → same as above
  • ADD COLUMN NOT NULL without DEFAULT → existing rows violate the constraint
  • ALTER COLUMN TYPE narrowing (text → varchar(50)) → data truncation
  • New CHECK constraint where existing data fails it → migration itself fails
  • ON DELETE CASCADE addition / change → cascade-delete risk
  • Primary key change → all FKs must follow

🔒 RLS / permissions (Postgres / Supabase)

  • New table without ENABLE ROW LEVEL SECURITY → world-readable
  • CREATE POLICY ... USING (true) → no protection at all
  • Policy using auth.uid() = user_id but missing WITH CHECK → can write other users' rows
  • SECURITY DEFINER function without SET search_path → schema-injection risk
  • GRANT ALL TO anon → unauthenticated users get too much
  • New function doesn't consider RLS bypass scenarios

Read the full file on GitHub · 128 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. 9d ago First seen · 128 lines · 36 tokens per session scan A ed4340f607d5

Subscribe to this mod's changes

migration-reviewer is an agent published in the GitHub repository shihchengwei-lab/separation-and-audit-claude-code (2 stars, last pushed 4mo ago), licensed MIT. It adds 36 tokens to every session and 1,151 once invoked, about $0.0002 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

db-migration-reviewer

Database migration safety specialist. Activates when migrations/ files are detected in a PR or feature branch. Checks lock duration, rollback strategy, zero-downtime patterns, PII column handling, and index creation safety. Writes docs/migrations/MIGRATE-{slug}.md. Blocks deploy if no rollback path exists.

avelikiy/great_cto · 69 tokens

infra-provisioner

Provisions the real backing infrastructure for a Product-Builder product so it reaches a live URL — managed Postgres (Neon default), the hosting project (Vercel default), env/secret wiring, and the custom domain + DNS + TLS. Pairs with devops (which does preview/staging only and refuses prod/real-domain). Runs after…

avelikiy/great_cto · 137 tokens

app-scaffolder

Project-scaffolding builder that stands up a working base application from the pinned stack-baseline so senior-dev implements FEATURES, not boilerplate. Creates the Next.js + TypeScript + Tailwind/shadcn skeleton, wires Drizzle + Postgres, Auth.js (to the auth-engineer contract), env template, folder structure, CI…

avelikiy/great_cto · 137 tokens

validator

Read-only adversarial validator. Spawned by scout to verify research findings against the actual code. Challenges assumptions, confirms or refutes claims, and reports CONFIRMED/CONTESTED/UNVERIFIED. Cannot modify files or run commands — enforced by tool restrictions.

justinjdev/fellowship · 56 tokens

api-contract-validator

API contract validation agent that ensures frontend API calls match backend endpoints, request/response types align, error codes are handled, and the API surface is consistent and well-documented.

ShaheerKhawaja/ProductionOS · 39 tokens

code-reviewer

Systematic code review agent with two-pass review (CRITICAL then INFORMATIONAL), fix-first heuristic (auto-fix mechanical issues, ask about ambiguous ones), battle-tested pattern detection, suppression list, and evidence-backed findings with file:line citations.

ShaheerKhawaja/ProductionOS · 53 tokens