write-migration

Generate reversible Drizzle migrations for the Flintmere PostgreSQL schema.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Author a Drizzle DB migration for Flintmere. Use when a schema change has been planned and needs a safe, reversible migration committed to the repo. Produces the migration SQL, an up/down round-trip check, and a rollback plan. Operates at Autonomy Level 1 — the user confirms before any migration is generated and never applies it inside this skill.

Core Features & Use Cases

  • Safe, reversible migrations: each plan is designed to be undoable with a clear down path.
  • Scoped changes: one schema concern per migration and strict separation of planning, not applying.
  • Audit-ready output: regression-ready plan with required metadata and file locations.

Quick Start

Describe the planned schema change and request a reversible migration plan.

Frequently Asked Questions about write-migration

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

FAQPage Schema
How do I create a reversible Drizzle migration for a planned PostgreSQL schema change?

To create a reversible Drizzle migration, describe the planned PostgreSQL schema change and request a migration plan. The skill generates up/down SQL paths, an up/down round-trip check, and rollback documentation without applying the changes.

What is the safest way to plan an additive database schema change without direct execution?

The safest way to plan an additive schema change is using an autonomy level that requires explicit user confirmation before generating migration files. This ensures the migration plan is complete, self-contained, and ready for staging without applying changes directly.

Does this Drizzle migration generator apply changes directly to the database?

No, this Drizzle migration generator does not apply changes directly to the database. It strictly separates migration planning from execution, requiring explicit user validation before writing any migration files to the repository for staging.

How do I document a rollback path for a transforming PostgreSQL schema change?

To document a rollback path for a transforming schema change, generate a reversible migration plan that includes down SQL scripts and rollback documentation. This ensures the database schema change has an auditable, undoable down path.

When do I need a separate migration file for each schema concern in PostgreSQL?

You need a separate migration file for each schema concern when planning an additive or transforming database change. Scoping one concern per migration ensures strict separation of planning, maintains an audit trail, and keeps the rollback plan self-contained.

What are the limitations of generating Drizzle migrations for untested schema modifications?

A key limitation is that generated Drizzle migrations require explicit user validation before writing files, meaning untested schema modifications cannot be auto-applied. The output is regression-ready for staging and review but requires manual execution downstream.