Data Migration Scripts

🌐Community
by aj-geddes · vlatest · Repository

Helps with data, 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 data-migration-scripts npx -- -y @trustedskills/data-migration-scripts
2

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

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

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

About This Skill

The data-migration-scripts skill provides AI agents with the ability to generate, execute, and manage database migration scripts for various SQL dialects. It automates the creation of complex schema changes, data transformations, and rollback procedures to ensure safe transitions between database versions.

When to use it

  • Automating routine database updates in CI/CD pipelines to reduce manual deployment errors.
  • Generating idempotent migration scripts that can be safely re-run without causing duplicate data entries.
  • Creating comprehensive rollback strategies to revert schema changes if a migration fails during production deployment.
  • Standardizing SQL syntax across different environments (e.g., MySQL, PostgreSQL) for consistent application behavior.

Key capabilities

  • Generates valid SQL CREATE, ALTER, and DROP statements tailored to specific database engines.
  • Produces data transformation logic for migrating records between incompatible table structures.
  • Creates transactional blocks to ensure atomicity during critical migration steps.
  • Outputs detailed rollback scripts to reverse changes instantly upon failure detection.

Example prompts

  • "Generate a PostgreSQL migration script to add a created_at timestamp column to the users table with a default value of the current time."
  • "Write an idempotent SQL script to migrate email addresses from a VARCHAR(50) field to a normalized TEXT format in a MySQL database."
  • "Create a migration and rollback pair for splitting a monolithic orders table into separate order_items and order_headers tables while preserving historical data integrity."

Tips & gotchas

Ensure your AI agent specifies the target SQL dialect (e.g., PostgreSQL, MySQL) in the prompt, as syntax varies significantly between engines. Always review generated scripts in a staging environment before applying them to production databases to verify data consistency and performance impact.

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
aj-geddes
Installs
96

🌐 Community

Passed automated security scans.