← ClaudeAtlas

migguard-schemalisted

Replays the DDL in a migration folder in filename order and builds a snapshot of the schema as it is now: tables, columns with type, nullability and default, primary keys, unique constraints, indexes, foreign keys and enums. Writes JSON, a markdown summary and a Mermaid ER diagram, and lists every statement it could not model instead of guessing. Use when the user says "what does the schema look like right now", "draw the ERD from my migrations", "snapshot the schema", "what tables do we have", "what did the schema look like at migration 0005", or "document our database".
vivekbhange-hub/migration-guard-skill · ★ 0 · API & Backend · score 75
Install: claude install-skill vivekbhange-hub/migration-guard-skill
# migguard-schema: the schema as the migrations leave it Nobody reads forty migration files to learn what `orders` looks like. This skill replays them with `ddl_schema.py` and gives the result as data (for `migguard-diff`), as a summary, and as a diagram. It reads files only; it never touches a database, so it describes what the migrations say, which is not always what production has (manual fixes, drift). Say that when it matters. ## Inputs - A migration folder or list of `.sql` files: Flyway (`V1__x.sql`), Prisma (`migrations/<ts>/migration.sql`), Knex or Rails output that is plain SQL, a `schema.sql`, or sqlmigrate/`--sql` output from Django and Alembic. Python and Ruby migration files are ignored; get their SQL first. - The engine, PostgreSQL (default) or MySQL. - Optionally a point in time: "as of migration 0005" becomes `--until 0005`. - Commands below say `python3`; on Windows use `python` (or `py -3`). ## Outputs - `docs/schema/schema.json`: snapshot, input for `migguard-diff`. - `docs/schema/schema.md`: tables, columns, constraints, enums, and a "Not understood" section. - `docs/schema/erd.mmd`: Mermaid `erDiagram`, ready to paste into a README or a Mermaid viewer. - A short answer in chat to the question the user actually asked. ## Steps 1. **Confirm authorization.** The migrations belong to the user's project or the user has permission to read them. Do not ask for production credentials; this skill never needs them. 2. **Find the migrations** and the