CR

create-migration

Automates the creation of migration files across diverse SQL dialects using a centralized script.

Install

mkdir -p .claude/skills/create-migration-c9s && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14706" && unzip -o skill.zip -d .claude/skills/create-migration-c9s && rm skill.zip

Installs to .claude/skills/create-migration-c9s

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Create new SQL migration files for multiple database dialects (sqlite3, mysql, postgres, tidb, redshift, clickhouse)
116 charsno explicit “when” trigger
Beginner

Key capabilities

  • Create SQL migration files for multiple database dialects
  • List newly created migration files
  • Remind users to edit migration files for dialect-specific syntax
  • Support sqlite3, mysql, postgres, tidb, redshift, and clickhouse dialects
  • Generate migration files based on a provided name

How it works

The skill runs a wrapper script or a rockhopper command for each configured database dialect to generate SQL migration files.

Inputs & outputs

You give it
migration_name (e.g., 'add_users_table')
You get back
New SQL migration files for configured dialects and a list of created files

When to use create-migration

  • Scaffolding new SQL migrations
  • Syncing migrations across multiple DB engines
  • Creating boilerplate migration files

About this skill

Create new migration files named $ARGUMENTS for all configured database dialects.

Run the wrapper script:

bash scripts/create-migration.sh $ARGUMENTS

If the script is not found, fall back to finding all rockhopper_*.yaml config files and running rockhopper --config <config> create --type sql $ARGUMENTS for each.

After creation, list the newly created files and remind the user to edit all migration files since each dialect may need different SQL syntax. OLAP dialects diverge the most — e.g. ClickHouse tables need a MergeTree() / ORDER BY engine clause instead of a primary key, use Int64/String/DateTime types, and have no AUTO_INCREMENT.

Migration file format reference

-- @package packagename
-- +up
CREATE TABLE example (id INT PRIMARY KEY);

-- +down
DROP TABLE example;

For multi-statement blocks, use -- +begin / -- +end. Use -- !txn to disable transaction wrapping.

When not to use it

  • When only a single database dialect is used
  • When no new migration files are needed
  • When the user does not want to edit migration files manually

Limitations

  • Requires manual editing of generated migration files for dialect-specific SQL syntax
  • OLAP dialects like ClickHouse require specific engine clauses and data types

How it compares

This skill automates the creation of boilerplate migration files across multiple database types, reducing manual setup for polyglot persistence.

Compared to similar skills

create-migration side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
create-migration (this skill)01moReviewBeginner
drizzle-orm322moNo flagsIntermediate
database-design66moReviewIntermediate
database-schema-designer66moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry