migration-safety

Plan database, API, and library migrations with rollback strategies and zero-downtime techniques.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/astroville/sprout --skill migration-safety-astroville
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: migration-safety
Source: https://github.com/astroville/sprout/tree/main/.claude/skills/migration-safety
Command: npx skills add https://github.com/astroville/sprout --skill migration-safety-astroville

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Migrations to production systems carry the risk of data loss, broken clients, and extended downtime. This Skill provides structured guidance for planning and executing schema, data, API, and library migrations with tested rollback paths and monitoring plans. ## Core Features & Use Cases - Zero-Downtime Patterns: Apply expand-contract, blue-green, and feature flag strategies to keep systems running during structural changes. - Rollback Planning: Enforce documented rollback procedures with triggers, data recovery steps, timelines, and verification for every migration. - Database Safety Rules: Distinguish backwards-compatible schema changes from unsafe operations, manage locks, and design idempotent batched data transformations. - Use Case: A platform engineer renaming a heavily used database column follows the expand-contract sequence — add the new column, backfill data, update code, then drop the old column — with a tested rollback script and abort criteria defined before execution. ## Quick Start Ask the assistant to review your planned database migration and produce a rollback plan with monitoring thresholds using the migration-safety guidance.

Frequently Asked Questions about migration-safety

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate a database schema without downtime?▼

Use the expand-contract pattern: add the new structure alongside the old one, migrate data and consumers, then remove the old structure after a soak period. Every schema change must be backwards-compatible with currently deployed application code.

How to rename a database column safely in production?▼

Never rename directly. Add a new column, backfill the data, update application code to use it, deploy, then drop the old column in a later migration after confirming nothing references it.

What is the expand-contract migration pattern?▼

Expand-contract is a three-phase migration: expand by adding the new structure alongside the old, migrate data and traffic to it, then contract by removing the old structure after verification. The expand phase preserves a fallback if anything fails.

When should I abort a running database migration?▼

Abort when error rates exceed 2x baseline for over 5 minutes, P99 latency exceeds 3x baseline, unresolved deadlocks occur, validation checks fail on a sample batch, or disk usage approaches capacity limits.

How long should an API deprecation period last?▼

Internal APIs need a minimum of two sprint cycles between deprecation notice and removal. External APIs require at least three months, preferably six, with Deprecation and Sunset headers sent during the transition.

Can I skip major versions when upgrading a library?▼

No. Upgrade sequentially through each major version, with each step as a separate commit with passing tests. For significant API changes, introduce an adapter layer or compatibility shim with a defined removal deadline.