database-migrations

Detect migration contracts and outline safe apply, rollback, and recovery plans.

1|1|Updated May 3, 2026
One-click install
npx skills add https://github.com/matt-riley/agent-skills --skill database-migrations-matt-riley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/matt-riley/agent-skills/tree/main/skills/database-migrations
Command: npx skills add https://github.com/matt-riley/agent-skills --skill database-migrations-matt-riley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Managing persistent schema changes is error-prone without a standardized migration workflow. This skill helps teams safely coordinate creation, application, inspection, and recovery of database migrations by respecting the repository's migration contract and tooling.

Core Features & Use Cases

  • Detect and interpret the repo's migration contract (reversible up/down vs forward-only) and guide the correct workflow.
  • Provide safe scaffolding for new migrations, including apply, status, and recovery steps, while avoiding dangerous manual edits.
  • Coordinate with downstream artifacts and environment-specific constraints to maintain schema-state consistency across development, CI, and production.

Quick Start

Identify the repository’s migration contract, then scaffold and apply a migration using the project’s tooling to ensure safe state across environments.

Frequently Asked Questions about database-migrations

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

FAQPage Schema
How do I safely apply database schema migrations across different environments?

To safely apply database schema migrations across environments, you must identify the repository's migration contract, then scaffold and apply changes using the project's tooling while enforcing status checks and cross-environment safety constraints.

What is the difference between reversible and forward-only database migration workflows?

Reversible database migration workflows support both up and down scripts for rollback, while forward-only workflows do not. This workflow detects the repo's contract and outlines a safe apply or recovery plan tailored to either approach.

How do I create a safe rollback and recovery plan for database migrations?

Create a safe rollback and recovery plan by locating migration entrypoints, respecting the repo's tooling, and enforcing proper validation. The plan applies recovery steps when reversible rollback is supported or outlines forward-only alternatives.

How do I prevent dangerous manual edits when scaffolding new database schema changes?

Prevent dangerous manual edits to database schema changes by using safe scaffolding generated through the repository's migration contract. This ensures proper validation, apply steps, and status checks are respected across development, CI, and production.

Does this workflow support my project's existing database migration tooling?

Yes, this workflow supports your existing database migration tooling by detecting and interpreting the repository's specific migration contract. It guides the correct workflow based on your tool's capabilities, including status checks and cross-environment safety.