migration-and-schema-harness
Manage database, schema, and API evolution safely. Use when a repo has migrations, database schemas, public API schemas, seed data, fixtures, compatibility requirements, rollback conventions, or needs
SKILL.mdskills/migration-and-schema-harness/SKILL.md
GitHubMigration And Schema Harness
Purpose
Make schema changes reversible, validated, and compatible with tests, fixtures, and release plans.
Inspect First
- database config, migrations, schema files, API schemas, seed data, fixtures, ORM config, migration scripts, release docs, and CI
Procedure
Identify schema ownership.
- Database tables, API contracts, event schemas, generated clients, and fixtures.
Define migration rules.
- Forward migration expectations.
- Rollback or mitigation expectations.
- Backward compatibility requirements.
- Seed and fixture update rules.
Add checks.
- Create target repo
scripts/check-migrations. - Use
scripts/check_migrations.pyfor lightweight inventory. - Keep dependency, build, and generated directories excluded by default; use
--include-ignoredonly to debug scanner behavior. - Include migration checks in
scripts/validatewhen relevant.
- Create target repo
Document.
docs/development/migrations.md- Link release rollback notes when migrations affect deployment.
Validation
- Run migration validation commands when safe.
- Confirm fixtures and seeds match schema changes.
- Confirm rollback or mitigation notes exist.
Completion Criteria
- Agents know how to change schemas without breaking compatibility or release safety.