migrate-create
What it does
This skill creates a new numbered database migration with a forward file and an undo file. It is for developers making changes to a database schema in an organised way.
When to use it
- ✓When you need to add a table, column or index to a database.
- ✓When you want a matching undo file created for each change.
- ✓When you want the next migration number chosen for you.
Skill link
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-migrations/skills/migrate-create/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Create a migration that adds a due date column to the tasks table, with its undo file.”
5 new skills a week. 1 minute to read.
How it works
The skill finds the highest existing number, adds one and picks a template based on the start of the name, such as create, add or drop. It writes the forward and undo SQL files and records the migration.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Migrate Create
Generate a new database migration with sequential numbering and up/down SQL file pair.
When to use
When you need to create a new database migration for schema changes such as creating tables, adding columns, creating indexes, or modifying constraints.
Steps
- Determine next number -- use
Globto scan the migrations directory for existing migration files and find the highest number, then increment by 1 (zero-pad to 3 digits) - Select template -- based on the
<name>, choose the appropriate SQL template:- Names starting with
create_-> CREATE TABLE template - Names starting with
add_-> ALTER TABLE ADD COLUMN template - Names starting with
drop_-> DROP with safety checks - Names containing
index-> CREATE INDEX template - Other -> generic migration template with placeholder comments
- Names starting with
- Generate up migration -- write
NNN_<name>.up.sqlwith the appropriate SQL using IF NOT EXISTS for idempotency - Generate down migration -- write
NNN_<name>.down.sqlwith the reverse operation using IF EXISTS - Search past patterns -- call
mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search(ReasoningBank-routed; don't pass anamespaceargument — pattern-* tools ignore it). - Store metadata -- call
mcp__plugin_ruflo-core_ruflo__memory_store --namespace migrationsto record the migration with number, name, status (pending), and file paths. Thememory_*tool family routes by namespace;agentdb_hierarchical-*does NOT (it routes by tierworking|episodic|semantic), so usememory_*here. See ruflo-agentdb ADR-0001 §"Namespace convention". - Report -- display: migration number, file paths created, template used, any similar past migrations found
CLI alternative
npx @claude-flow/cli@latest memory store --namespace migrations --key "migration-NNN_NAME" --value '{"number": NNN, "name": "NAME", "status": "pending"}'
FAQ
How is the template chosen?
The start of the name decides it. Names starting with create, add or drop get their own template, and names containing index get an index template.
Does it run the migration?
The description covers creating the files and recording metadata. It does not say the migration is applied.
Does it check the SQL?
The separate migrate validate skill checks pending migrations for safety.
Details
Original description by the author
Create a new sequentially numbered database migration with up/down SQL files
repo: ruvnet/ruflo
Popularity
- GitHub stars
- 81k
- Ranking position
- #1658
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
agent-adaptive-coordinator
81kHelps your agent split and rebalance a group of AI agents as the workload changes, choosing a layout that fits the task.
agent-agent
81kTeaches your agent to turn a big goal into an ordered plan of actions, and to replan when conditions change.
agent-agentic-payments
81kHelps your agent manage spending mandates for AI shopping, with spend caps, time windows, merchant rules and signed approvals.
agent-analyze-code-quality
81kHelps your agent review code for quality, finding code smells, technical debt and refactoring ideas without changing the files.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.