data-contract-migrations
/data-contract-migrations
Design and verify data contracts, schema changes, migrations, rollbacks, backfills, compatibility windows, tenant isolation, and API-to-database field mapping. Use when changing database schema, event payloads, persisted documents, analytics tables, multi-tenant data boundaries, or any user-visible data contract where silent fallback or undeclared fields would be dangerous.
- Author
- majiayu000 ↗
- Repository
- spellbook ↗
- Licence
- MIT
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Design and verify data contracts, schema changes, migrations, rollbacks, backfills, compatibility windows, tenant isolation, and API-to-database field mapping. Use when changing database schema, event payloads, persisted documents, analytics tables, multi-tenant data boundaries, or any user-visible data contract where silent fallback or undeclared fields would be dangerous.
Original author description
Design and verify data contracts, schema changes, migrations, rollbacks, backfills, compatibility windows, tenant isolation, and API-to-database field mapping. Use when changing database schema, event payloads, persisted documents, analytics tables, multi-tenant data boundaries, or any user-visible data contract where silent fallback or undeclared fields would be dangerous.
How it works
- Purpose
- Preflight
- Migration Design
- Required Checks
- Output Shape
SKILL.md preview
--- name: data-contract-migrations description: Design and verify data contracts, schema changes, migrations, rollbacks, backfills, compatibility windows, tenant isolation, and API-to-database field mapping. Use when changing database schema, event payloads, persisted documents, analytics tables, multi-tenant data boundaries, or any user-visible data contract where silent fallback or undeclared fields would be dangerous. --- # Data Contract Migrations ## Purpose Use this skill when data shape changes can break reads, writes, reports, tenants, or integrations. The goal is an explicit compatibility and migration plan, not just a SQL diff. ## Preflight Gather these facts before proposing changes: 1. Current schema, models, serializers, API contracts, and persisted samples. 2. Writers and readers of each field. 3. Migration tool and rollback support. 4. Data volume, tenant boundaries, and backfill cost. 5. Required zero-downtime or maintenance-window constraints. 6. Existing tests or fixtures that prove compatibility. If the current data does not contain a field, treat it as absent. Do not invent fallback fields. ## Migration Design Use expand-migrate-contract for production systems: 1. Expand: add nullable columns, new tables, new enum values, or versioned payloads without breaking old readers. 2. Dual-write or adapter: write both old and new forms when needed. 3. Backfill: migrate historical data with batching, checkpoints, and retry behavior. 4. Read switch: move readers to the new contract after verification. 5. Contract: remove old fields only after the compatibility window and rollback risk pass. For small systems, a direct migration is acceptable only when downtime, rollback, and data loss risks are explicitly low. ## Required Checks Every plan must include: - Forward migration command. - Rollback or roll-forward recovery command. - Backfill idempotency and resume behavior. - Data validation query before and after. - Tenant isolation check when tenants exist. - API/serializer compatibility test. - Observability for migration progress and failure. ## Output Shape ```text contract_change: affected_readers_writers: migration_strategy: backfill_plan: rollback_or_recovery: tenant_and_security_checks: verification_queries: test_commands: release_gate: ``` Raise errors for missing critical data rather than warning and falling back to incomplete output.
Files in this package (2)
- SKILL.md 2 KB
- agents/openai.yaml 1 KB
Versions
The database has no other skills named data-contract-migrations.
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 343edf5a3175 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Similar skills
- 90database-migrations
Plans and reviews schema and data changes (migrations, backfills, constraints, indexes, policies) for compatibility, lock risk, and rollback, and reports DB-push status explicitly. Use when a change touches schema, migrations, seeds, backfills, or RLS and policies. - 90database-migrations
Design and verify schema migrations, bounded backfills and deployment compatibility for databases. Use when adding constraints or indexes, changing column types, evolving schemas or recovering failed migrations; distinguish reversible application rollback from data restoration. - 100database-migrations
Plans and writes zero-downtime database schema migrations (expand/contract, safe indexes, batched backfills, rollback). Use when adding, renaming or dropping columns or tables, changing types or constraints, adding indexes, or backfilling data on a live database. - 90database-testing
Exercise data-access code, migrations, and transactions against the real database engine so constraints, rollbacks, and schema changes are proven rather than assumed. Use when tests for queries or migrations run on SQLite while production runs Postgres. - 100reviewing-migration-and-data-safety
Reviews schema migrations and data changes for safety: backward compatibility with the running app (expand/migrate/contract), table locks from NOT NULL/index/FK on large tables, unbatched backfills, missing dual-write during transitions, irreversible or destructive DDL, and… - 90safe-database-migrations
Use when schema evolution, backfills, production migrations or data retention changes. Plan and execute backward-compatible data changes with reversible checkpoints. Do not use when ephemeral development database reset with no preserved data.