migration-review

migration-review is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 94 tokens per session (1,388 once invoked), scanned A, original, Apache-2.0.

A review checklist for database schema and data changes. A migration is a controlled change to tables, columns, indexes, constraints, or stored data.

In plain words
What is it for?
It helps review migrations, backfills, renamed or removed columns, indexes, constraints, and compatibility between old and new application versions.
Why use it?
It exposes data loss, long write-blocking locks, changes that cannot be undone, and deployment-order failures before they reach production.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps review migrations, backfills, renamed or removed columns, indexes, constraints, and compatibility between old and new application versions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmj-90/gaffer/migration-review
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.

Any agent
npx skills add tmj-90/gaffer --skill migration-review
Clone the repo
git clone --depth 1 https://github.com/tmj-90/gaffer

Made for: Claude Code, Codex.

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-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmj-90/gaffer/migration-review/github.svg)](https://agentmods.dev/skills/tmj-90/gaffer/migration-review)
Your own site
<a href="https://agentmods.dev/skills/tmj-90/gaffer/migration-review"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/migration-review/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-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/tmj-90/gaffer/migration-review"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/migration-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,388 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.00094 $0.01388
Opus 5.5 $0.00038 $0.00555
Sonnet 5.5 $0.00019 $0.00278
Haiku 4.5 $0.00009 $0.00139

Measured 16d ago against content hash edbec0a0e80f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

migration-review 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 16d 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.

runner/skills/migration-review/SKILL.md · 88 lines

How it starts

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

Migration review lens

A schema change is the one part of a deploy a redeploy cannot undo. For every migration ask three questions: what happens on the live database while it runs (locks, rewrites, duration); what happens mid-rollout, when old and new code both run against one schema; and how do we get back. A finding is a concrete defect: a named statement, the lock or data loss it causes, and the safe form.

Steps

  1. Inventory every schema and data change: migration files, ORM model or schema changes that generate migrations (read the generated SQL — Prisma and some ORMs turn a rename into drop + add), seed and backfill scripts, queries that assume the new shape. Call search_lore for the engine and version, the migration tool, deploy order and any online-migration rules.
  2. Simulate the rollout (expand → migrate → contract). Old code keeps running against the new schema until rollout completes; new code may run against the old schema if the migration runs after deploy. Every combination must work: a dropped or renamed column old code still reads breaks the deploy; a NOT NULL column without a default breaks old inserts; an ORM that selects every mapped column fails on a dropped one.
  3. Check locks and rewrites for the engine in use (checklist below). On PostgreSQL remember the lock queue: an ALTER TABLE waiting for its ACCESS EXCLUSIVE lock behind a long query blocks every query after it — DDL on a busy table needs a short lock_timeout (with retry) so it fails fast instead of queueing.
  4. Check reversibility. A working down that does not destroy data, or a documented forward-fix. Destructive steps (drop column/table, delete rows, narrowing a type) are in a later deploy than the code change that stopped using them, and data is copied or archived first.
  5. Check data integrity. Constraints match the model's validations (NOT NULL, unique, foreign keys with a deliberate ON DELETE); backfills are idempotent, batched, resumable and outside the schema transaction; enum/status additions are additive; the migration works on a table that already has rows, including rows that violate the new constraint.
  6. Check the tests. If an AC depends on existing data surviving (a rename, a type change, a backfill), a test applies the migration to a database seeded with old-shape rows and asserts the data afterwards — an empty-database migration run proves only that the SQL parses (the test-quality-review skill).
  7. Rate each finding. Blocking: data loss; a table-rewriting or long-locking statement on a table the app writes during deploy; a deploy-order break; an irreversible destructive step without a preceding phase; a constraint that fails on existing rows. Should-fix: a missing constraint the model assumes; an unbatched backfill on a large table. Note: a missing index for a new query (the sql-query-performance skill), unless that query becomes unbounded on a table that grows with user input (then it is blocking under performance-review); naming and style. Only blocking and should-fix justify RECOMMEND CHANGES.
  8. Record each finding with record_ac_evidence (evidence_type: manual_note: statement, hazard, safe form), then let the review-ticket verdict carry the result.

Read the full file on GitHub · 88 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. 16d ago Changed · +21 lines edbec0a0e80f
  2. 19d ago First seen · 67 lines · 94 tokens per session scan A ab73fda4a863

Subscribe to this mod's changes

migration-review is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 17d ago), licensed Apache-2.0. It adds 94 tokens to every session and 1,388 once invoked, about $0.0004 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-09-28.

Related

Other skills, from other repositories

test-audit

Audit test suites for T1-T4 violations using AST analysis, mock detection, and multi-stage synthesis. Invoke when user asks to audit tests, check test quality, find mock violations, review test effectiveness, or inspect test suites for over-mocking. Triggers automatic rewrites when quality gates fail.

QBall-Inc/the-bulwark · 0 tokens

code-review

Comprehensive code review with distinct aspect based sections. Use when reviewing code, checking for security issues, finding type safety problems, auditing code quality, or when user asks to review code, PRs or changes. Three-phase workflow runs static tools, LLM judgment, and writes diagnostic log.

QBall-Inc/the-bulwark · 61 tokens

spec-drift-check

Audits a WP brief for drift against current code — extracts claims, verifies each, emits PROCEED/STOP verdict. Use when starting a new WP, before consuming a spec as binding, or when a doc references paths/lines/functions.

QBall-Inc/the-bulwark · 54 tokens

besimple-broccoli-blind

Non-interactive wrapper: plan-sketch -> auto-pick recommended options -> plan-write -> plan-critique-loop -> implement-from-plan -> claude-simplify-wrapper -> dedup -> code-review-loop. No PR creation and no Linear comments.

besimple-oss/broccoli · 58 tokens

code-review-loop

Iterative review+fix loop for BASESHA..HEAD: generate findings, apply accepted fixes, run checks, commit, and re-review up to 3 iterations or until clean.

besimple-oss/broccoli · 40 tokens

dedup

Dedupe-only pass for BASESHA..HEAD: remove duplicate code introduced by the diff or reuse existing shared utils; applies changes + commits.

besimple-oss/broccoli · 32 tokens