Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

migrate-create — Claude Code skill for SQL migrations

Creates sequential up/down SQL migration pairs for database schema changes. Use it when adding tables, columns, indexes, or constraints.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ruvnet/ruflo --skill migrate-create -a claude-code
Open on GitHub

What migrate-create does

The skill scans existing migration files, finds the next number, and pads it to 3 digits. It then writes NNN_<name>.up.sql alongside NNN_<name>.down.sql. Forward SQL uses IF NOT EXISTS; rollback SQL uses IF EXISTS.

Its template follows the migration name: create_ selects a table template, add_ adds a column, drop_ prepares guarded removal, and names containing index create an index. Other names receive a general SQL template with placeholder comments. Naming the migration after the intended action matters here.

It searches for related earlier migrations with mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search, then records the new migration through mcp__plugin_ruflo-core_ruflo__memory_store in the migrations namespace. The final report includes the number, file paths, selected template, and related results.

What it helps with

  • create paired up and down SQL files
  • assign the next migration number
  • choose a table or index SQL template
  • write a reverse database operation
  • record migration metadata for the agent

Example prompts for the agent

  • Create a migration named `create_users`.
  • Make a migration called `add_email_to_users`.
  • Create the `create_orders_index` migration.

How to install migrate-create

1Skills CLI (Vercel)

npx skills add ruvnet/ruflo --skill migrate-create -a claude-code

2Manually: put the files in place

~/.claude/skills/migrate-create/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/migrate-create/

From the same set104

The whole set →
ruflo ruvnet This skill adds multi-agent orchestration, memory, routing, and MCP tools to a project. Use it for swarm tasks and multi-step workflows. Claude Code CX Codex Cursor +1 4,000installs Swarm Orchestration ruvnet Skill for managing agent swarms with parallel execution, dynamic topology, and automatic load balancing. Use when a single agent is not enough and you need to orchestrate specialists of different types. Claude Code CX Codex Cursor +1 2,100installs github-project-management ruvnet Turns issue triage and board upkeep into gh and ruv-swarm calls: labels, subtasks, duplicate lookup. Useful when the tracker holds more tickets than order. Claude Code CX Codex Cursor +1 1,400installs github-workflow-automation ruvnet Automates GitHub Actions with AI agent coordination. Generates optimised pipelines, manages pull requests, analyzes failed runs, and deploys updates with risk assessment. Claude Code CX Codex Cursor +1 1,300installs github-code-review ruvnet Runs a swarm of specialized AI agents to inspect GitHub pull requests for security, performance, and architecture issues. Claude Code CX Codex Cursor +1 1,300installs stream-chain ruvnet Chains sequential agent steps together using streaming JSON flow and provides ready-to-run pipelines. Claude Code CX Codex Cursor +1 1,200installs flow-nexus-swarm ruvnet Deploy cloud-based AI agent swarms and define event-driven workflows with message queues. Use it to coordinate tasks, inspect runs, and scale a swarm. Claude Code CX Codex Cursor +1 1,200installs performance-analysis ruvnet Detects bottlenecks in Claude Flow swarms, profiles agent operations, and generates reports with actionable optimization recommendations. Claude Code CX Codex Cursor +1 1,200installs

Similar

okx-dex-market okx Read-only DEX skill version 4.6.6 for querying token liquidity, holder clusters, whale signals, wallet PnL, and sniper bundles. Claude Code CX Codex Cursor +1 19,100installs quant-analyst sickn33 A quant skill for the agent: financial models, strategy backtests and risk metrics, built on pandas, numpy and scipy. Claude Code CX Codex Cursor +1 942installs genomic-coordinates K-Dense-AI Converts genomic coordinates between BED, VCF, and GTF formats, and normalises variant representations. Useful when reconciling coordinate systems, indels, and assembly contigs. Claude Code CX Codex Cursor +1 939installs xlsx official anthropics Creates, reads, edits, and converts spreadsheet files. Use it when the requested deliverable is an Excel workbook or another tabular file. Claude Code Claude.ai 187,223installs google-agents-cli-observability official Google This skill guides you through tracing and monitoring AI agents, including ADK agents. Use it when you need to inspect agent execution or monitor a deployed agent. Claude Code CX Codex Cursor +1 509,900installs caveman-evidence-review JuliusBrussee A read-only skill reviews Caveman Cloud evidence on LLM spend, traces, and routing. Use it to see where a project’s model budget goes. Claude Code CX Codex Cursor +1 103,500installs migration JuliusBrussee Enforces reversible, compatibility-safe transitions for schema, data, and API updates. Useful whenever data loss or rollout downtime is unacceptable. Claude Code CX Codex Cursor +1 102,900installs performance-optimization addyosmani An agent skill that measures before it changes code: Core Web Vitals budgets, N+1 queries, missing indexes and slow endpoints. Claude Code CX Codex Cursor +1 64,500installs

Questions about migrate-create

How do I install migrate-create in Claude Code?

Run this command twice: npx skills add ruvnet/ruflo --skill migrate-create -a claude-code. The skill file is placed at ~/.claude/skills/migrate-create/SKILL.md.

What does migrate-create do?

It generates a sequential database migration as matching up and down SQL files. The SQL template is selected from the migration name and covers tables, columns, removals, and indexes.

How does migrate-create store migration details?

It calls mcp__plugin_ruflo-core_ruflo__memory_store with the migrations namespace. The stored record includes the number, name, pending status, and file paths.

Source text

SKILL.md · MIT
---
name: migrate-create
description: Create a new sequentially numbered database migration with up/down SQL files
argument-hint: "<name>"
allowed-tools: Read Write Glob Bash mcp__plugin_ruflo-core_ruflo__memory_store mcp__plugin_ruflo-core_ruflo__memory_search mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search
---

# 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

1. **Determine next number** -- use `Glob` to scan the migrations directory for existing migration files and find the highest number, then increment by 1 (zero-pad to 3 digits)
2. **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
3. **Generate up migration** -- write `NNN_<name>.up.sql` with the appropriate SQL using IF NOT EXISTS for idempotency
4. **Generate down migration** -- write `NNN_<name>.down.sql` with the reverse operation using IF EXISTS
5. **Search past patterns** -- call `mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search` (ReasoningBank-routed; **don't** pass a `namespace` argument — pattern-* tools ignore it).
6. **Store metadata** -- call `mcp__plugin_ruflo-core_ruflo__memory_store --namespace migrations` to record the migration with number, name, status (pending), and file paths. The `memory_*` tool family routes by namespace; `agentdb_hierarchical-*` does NOT (it routes by tier `working|episodic|semantic`), so use `memory_*` here. See [ruflo-agentdb ADR-0001 §"Namespace convention"](../../../ruflo-agentdb/docs/adrs/0001-agentdb-optimization.md).
7. **Report** -- display: migration number, file paths created, template used, any similar past migrations found

## CLI alternative

```bash
npx @claude-flow/cli@latest memory store --namespace migrations --key "migration-NNN_NAME" --value '{"number": NNN, "name": "NAME", "status": "pending"}'
```

© ruvnet · MIT · ruvnet/ruflo

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor