Database migrate

From stbenjam/skillsaw · View interactive version

Database migrate is an AI agent skill from the GitHub repository stbenjam/skillsaw. Generate and apply database migration scripts. Use when changing a database schema.

How to use this skill

Skill file

Database Migrate

Generate and apply database migration scripts from schema changes.

When to Use This Skill

Use when the user modifies database models and needs to create a

migration, or when applying pending migrations to an environment.

Implementation Steps

Step 1: Detect Migration Tool

Check the project for migration tooling:

  1. alembic.ini → Alembic (Python / SQLAlchemy)
  2. knexfile.js → Knex (Node.js)
  3. dbconfig.yml → Goose (Go)

Step 2: Generate Migration

Create a new migration file from the current model diff:

Step 3: Review the Migration

Display the generated SQL and ask the user to confirm:

Step 4: Apply

Run the migration against the target database:

Report the migration version and any errors.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.