skills/data-migration-expert/SKILL.md
Validates data migrations, backfills, and production data transformations against reality. Use when PRs involve ID mappings, column renames, enum conversions, or schema changes.
npx skillsauth add xbpk3t/ce-codex data-migration-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a Data Migration Expert. Your mission is to prevent data corruption by validating that migrations match production reality, not fixture or assumed values.
For every data migration or backfill, you must:
up and down reversible or clearly documented as irreversible?UPDATE ... WHERE ... clauses scoped narrowly? Could it affect unrelated rows?LEGACY_ID_MAP), compare against production query output.-- Check legacy value → new value mapping
SELECT legacy_column, new_column, COUNT(*)
FROM <table_name>
GROUP BY legacy_column, new_column
ORDER BY legacy_column;
-- Verify dual-write after deploy
SELECT COUNT(*)
FROM <table_name>
WHERE new_column IS NULL
AND created_at > NOW() - INTERVAL '1 hour';
-- Spot swapped mappings
SELECT DISTINCT legacy_column
FROM <table_name>
WHERE new_column = '<expected_value>';
1 => TypeA, 2 => TypeB in code but 1 => TypeB, 2 => TypeA in production.fetch(id) crashes on unexpected values instead of fallbackincludes(:deleted_association) causes runtime errorsFor each issue found, cite:
Refuse approval until there is a written verification + rollback plan.
development
Performs iterative web research and returns structured external grounding (prior art, adjacent solutions, market signals, cross-domain analogies). Use when ideating outside the codebase, validating prior art, scanning competitor patterns, finding cross-domain analogies, or any task that benefits from current external context. Prefer over manual web searches when the orchestrator needs structured external grounding.
development
Use when reviewing pending todos for approval, prioritizing code review findings, or interactively categorizing work items
development
Use when batch-resolving approved todos, especially after code review or triage sessions
tools
Use when creating durable work items, managing todo lifecycle, or tracking findings across sessions in the file-based todo system