← ClaudeAtlas

migguard-difflisted

Shows what a migration pull request changes in the schema and which application code will break, by diffing two schema snapshots (or two migration states) with schema_diff.py. Classifies every change as additive-safe, needs expand/contract or breaking, and greps the source tree for the affected tables and columns. Use when the user says "what does this migration change", "will this migration break the app", "review the schema change in this PR", "which code uses this column", "is it safe to drop this column", or "diff the schema".
vivekbhange-hub/migration-guard-skill · ★ 0 · API & Backend · score 75
Install: claude install-skill vivekbhange-hub/migration-guard-skill
# migguard-diff: what changes, and what code notices A migration PR shows SQL. The reviewer needs to know three things: what the schema looks like before and after, which changes the already-running app cannot survive, and where in the code the affected columns are used. `schema_diff.py` answers all three from files, with no database. ## Inputs - Either two snapshot files from `migguard-schema`, or one migration folder plus the name of the last already-deployed migration (`--old-until`). For a PR: old = the folder up to the last merged migration, new = the folder with the PR's files. - The source folder to search for usage, usually `src/` or `app/`. - Engine (PostgreSQL default, `--dialect mysql`). - Commands below say `python3`; on Windows use `python` (or `py -3`). ## Outputs - A report: verdict, a table of changes with class and what to do, and the file:line hits per affected table and column. - A plain-language review comment for the PR: what is safe, what is not, what to do instead. - Optionally the JSON report (`--json`) for CI, with `--fail-on breaking`. ## Steps 1. **Confirm authorization.** The repository belongs to the user or they have permission to review it. Nothing here needs a database or network access. 2. **Pick old and new.** For a PR on a migrations folder: ``` python3 "${CLAUDE_SKILL_DIR}/schema_diff.py" db/migrations db/migrations \ --old-until 0005 --grep-usage src/ ``` `--old-until 0005` replays up to the first file who