migrate-validate
できること
このスキルは、まだ適用されていないデータベースのマイグレーションファイルをレビューし、よくある安全上の問題を探します。ライブのデータベースを変更する前に、ミスを見つけたい開発者向けです。
使う場面
- ✓保留中のマイグレーションがあり、適用の前に確認したいとき。
- ✓マイグレーションがテーブルや列を削除するため、安全性のレビューが必要なとき。
- ✓リリースの工程の一部として、命名と安全性のチェックがほしいとき。
スキルのリンク
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-migrations/skills/migrate-validate/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“適用する前に、保留中のデータベースマイグレーションに危険な変更がないか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは未適用のマイグレーションファイルを見つけ、その SQL を読み、外部キーの参照先、新しく必須になった列の既定値、取り消しの完全性、破壊的な操作、安全な表現、テーブル名の付け方を確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Migrate Validate
Validate all pending database migrations for correctness, safety, and adherence to best practices.
When to use
Before applying migrations to catch issues early -- foreign key references to non-existent tables, missing rollback SQL, destructive operations without safeguards, and naming convention violations.
Steps
- Find pending migrations -- use
Globto list all migration files, cross-reference with applied history viamcp__plugin_ruflo-core_ruflo__memory_search --namespace migrations(ormemory_list) to identify pending ones. Thememory_*tool family routes by namespace;agentdb_hierarchical-*does NOT (it routes by tier), so usememory_*here. - Parse SQL -- use
Readto load each pending.up.sqland.down.sqlfile and parse the SQL statements - Check foreign keys -- verify that all REFERENCES targets exist in the current schema or in prior migrations (both applied and pending)
- Check NOT NULL defaults -- verify that any ADD COLUMN with NOT NULL has a DEFAULT value
- Check rollback completeness -- verify every CREATE/ALTER in the UP file has a corresponding DROP/ALTER in the DOWN file
- Flag destructive ops -- warn on DROP TABLE, DROP COLUMN, TRUNCATE without explicit confirmation
- Check idempotency -- verify IF EXISTS / IF NOT EXISTS is used for safety
- Check naming -- verify table names are plural, column names are snake_case, index names follow
idx_table_columnconvention - Store validation patterns -- two paths (per ruflo-cost-tracker ADR-0001 dual-path pattern):
- Pattern store (typed, recommended):
mcp__plugin_ruflo-core_ruflo__agentdb_pattern-storewithtype: 'migration-validation'. No namespace arg — ReasoningBank routes it. - Plain store (namespace-routable):
mcp__plugin_ruflo-core_ruflo__memory_store --namespace migrationsfor validation results tied to a specific migration number.
- Pattern store (typed, recommended):
- Report -- display: errors (must fix), warnings (should fix), info (suggestions), with file path and line number for each issue
CLI alternative
npx @claude-flow/cli@latest memory search --query "migration validation results" --namespace migrations
よくある質問
破壊的な変更とは何ですか?
DROP TABLE、DROP COLUMN、TRUNCATE の文が、あなたが確認できるように印付けされます。
マイグレーションのファイルを変更しますか?
説明では、確認と報告が扱われています。結果を確認して、何を変えるかを決めてください。
どのマイグレーションが保留中かは、どうやって分かりますか?
マイグレーションファイルを、migrations のメモリーの名前空間にある履歴と比べて判断します。
詳細
作者による元の説明
Validate pending migrations for foreign key consistency, rollback safety, and best practices
repo: ruvnet/ruflo
人気
- GitHubのスター
- 81k
- ランキング
- #1659
- ライセンス
- 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エージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。