migrate-create
できること
このスキルは、順方向のファイルと取り消し用のファイルを持つ、新しい番号付きのデータベースマイグレーションを作成します。データベースのスキーマを整理された方法で変更する開発者向けです。
使う場面
- ✓データベースにテーブル、列、インデックスを追加する必要があるとき。
- ✓各変更に対応する取り消し用ファイルを作りたいとき。
- ✓次のマイグレーション番号を自動で選んでほしいとき。
スキルのリンク
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-migrations/skills/migrate-create/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“tasks テーブルに期限の列を追加するマイグレーションを、その取り消し用ファイルとともに作ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは既存の最も大きい番号を見つけ、1を加えて、名前の先頭(create、add、drop など)に基づいてテンプレートを選びます。順方向と取り消しの SQL ファイルを書き込み、そのマイグレーションを記録します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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"}'
よくある質問
テンプレートはどのように選ばれますか?
名前の先頭が決め手です。create、add、drop で始まる名前にはそれぞれのテンプレートが、index を含む名前にはインデックスのテンプレートが使われます。
マイグレーションを実行しますか?
説明では、ファイルの作成とメタデータの記録が扱われています。マイグレーションが適用されるとは書かれていません。
SQL を確認しますか?
いいえ。別の migrate validate スキルが、保留中のマイグレーションの安全性を確認します。
詳細
作者による元の説明
Create a new sequentially numbered database migration with up/down SQL files
repo: ruvnet/ruflo
人気
- GitHubのスター
- 81k
- ランキング
- #1658
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
agent-adaptive-coordinator
81k作業量の変化に合わせて、エージェントのグループを分割し、再配分する手助けをします。作業に合った配置を選びます。
agent-agent
81k大きな目標を順番に並んだ行動計画にし、状況が変わったときに計画を立て直す方法をエージェントに教えます。
agent-agentic-payments
81kAIの買い物のために、支出の上限、期間、販売店のルール、署名付きの承認を含む支出の委任を管理する手助けをします。
agent-analyze-code-quality
81kコードの品質を確認し、コードの臭い、技術的負債、リファクタリングの案を見つける手助けをします。ファイルは変更しません。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。