Generate Migration

🏢Official
by getsentry · vlatest · Repository

Helps with code generation, migration as part of agent workflows workflows.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add generate-migration npx -- -y @trustedskills/generate-migration
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "generate-migration": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/generate-migration"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill generates database migration files to help AI agents manage schema changes in codebases. It automates the creation of SQL or ORM-specific migration scripts based on desired structural updates, ensuring version control consistency without manual file editing.

When to use it

  • You need to add a new column to an existing table and want the agent to produce the correct ALTER TABLE statement.
  • Your team requires automated rollback capabilities for database changes during rapid feature iteration.
  • You are refactoring data models and need the AI to generate migration scripts that safely transform legacy schemas.
  • You want to standardize migration syntax across a project by having an agent enforce specific formatting rules.

Key capabilities

  • Generates SQL migration files tailored to specific database engines (e.g., PostgreSQL, MySQL).
  • Creates ORM-specific migrations for frameworks like Django, Rails, or Prisma.
  • Produces both forward and backward (rollback) migration scripts automatically.
  • Supports complex schema operations such as renaming tables, adding indexes, and altering data types.

Example prompts

  • "Create a migration script to add a user_email column to the profiles table with a default value of 'pending'."
  • "Generate a rollback migration for the last commit that renamed the orders table to customer_orders."
  • "Write a Prisma migration to update the status field in the tasks table from an integer to a string enum."

Tips & gotchas

Ensure your AI agent knows the specific database dialect or ORM version you are using, as syntax varies significantly between them. Always review generated migrations before applying them to production environments to prevent data loss.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
getsentry
Installs
42

🏢 Official

Published by the company or team that built the technology.