migguard-schemalisted
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