Data Migration Scripts
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.
Run in terminal (recommended)
claude mcp add data-migration-scripts npx -- -y @trustedskills/data-migration-scripts
Or manually add to ~/.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, andDROPstatements 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_attimestamp column to theuserstable with a default value of the current time." - "Write an idempotent SQL script to migrate email addresses from a
VARCHAR(50)field to a normalizedTEXTformat in a MySQL database." - "Create a migration and rollback pair for splitting a monolithic
orderstable into separateorder_itemsandorder_headerstables 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 Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.