/migrate-validate
Validate pending migrations for foreign key consistency, rollback safety, and best practices
$ npx -y skills add ruvnet/ruflo --skill migrate-validate --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/migrate-validate
Context preview
The summary Claude sees to decide when to auto-load this skill.
Validate pending migrations for foreign key consistency, rollback safety, and best practices
SKILL.md
migrate-validate.SKILL.mdname: migrate-validate
description: Validate pending migrations for foreign key consistency, rollback safety, and best practices
argument-hint: ""
allowed-tools: Read Glob Grep Bash mcp__plugin_ruflo-core_ruflo__memory_search mcp__plugin_ruflo-core_ruflo__memory_list mcp__plugin_ruflo-core_ruflo__memory_store mcp__plugin_ruflo-core_ruflo__agentdb_pattern-store mcp__plugin_ruflo-core_ruflo__agentdb_semantic-route
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
1. **Find pending migrations** -- use `Glob` to list all migration files, cross-reference with applied history via `mcp__plugin_ruflo-core_ruflo__memory_search --namespace migrations` (or `memory_list`) to identify pending ones. The `memory_*` tool family routes by namespace; `agentdb_hierarchical-*` does NOT (it routes by tier), so use `memory_*` here. 2. **Parse SQL** -- use `Read` to load each pending `.up.sql` and `.down.sql` file and parse the SQL statements 3. **Check foreign keys** -- verify that all REFERENCES targets exist in the current schema or in prior migrations (both applied and pending) 4. **Check NOT NULL defaults** -- verify that any ADD COLUMN with NOT NULL has a DEFAULT value 5. **Check rollback completeness** -- verify every CREATE/ALTER in the UP file has a corresponding DROP/ALTER in the DOWN file 6. **Flag destructive ops** -- warn on DROP TABLE, DROP COLUMN, TRUNCATE without explicit confirmation 7. **Check idempotency** -- verify IF EXISTS / IF NOT EXISTS is used for safety 8. **Check naming** -- verify table names are plural, column names are snake_case, index names follow `idx_table_column` convention 9. **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-store` with `type: 'migration-validation'`. No namespace arg — ReasoningBank routes it.
- **Plain store (namespace-routable)**: `mcp__plugin_ruflo-core_ruflo__memory_store --namespace migrations` for validation results tied to a specific migration number.
10. **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
Read more
name: migrate-validate description: Validate pending migrations for foreign key consistency, rollback safety, and best practices argument-hint: "" allowed-tools: Read Glob Grep Bash mcp__plugin_ruflo-core_ruflo__memory_search mcp__plugin_ruflo-core_ruflo__memory_list mcp__plugin_ruflo-core_ruflo__memory_store mcp__plugin_ruflo-core_ruflo__agentdb_pattern-store mcp__plugin_ruflo-core_ruflo__agentdb_semantic-route
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
1. **Find pending migrations** -- use `Glob` to list all migration files, cross-reference with applied history via `mcp__plugin_ruflo-core_ruflo__memory_search --namespace migrations` (or `memory_list`) to identify pending ones. The `memory_*` tool family routes by namespace; `agentdb_hierarchical-*` does NOT (it routes by tier), so use `memory_*` here. 2. **Parse SQL** -- use `Read` to load each pending `.up.sql` and `.down.sql` file and parse the SQL statements 3. **Check foreign keys** -- verify that all REFERENCES targets exist in the current schema or in prior migrations (both applied and pending) 4. **Check NOT NULL defaults** -- verify that any ADD COLUMN with NOT NULL has a DEFAULT value 5. **Check rollback completeness** -- verify every CREATE/ALTER in the UP file has a corresponding DROP/ALTER in the DOWN file 6. **Flag destructive ops** -- warn on DROP TABLE, DROP COLUMN, TRUNCATE without explicit confirmation 7. **Check idempotency** -- verify IF EXISTS / IF NOT EXISTS is used for safety 8. **Check naming** -- verify table names are plural, column names are snake_case, index names follow `idx_table_column` convention 9. **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-store` with `type: 'migration-validation'`. No namespace arg — ReasoningBank routes it.
- **Plain store (namespace-routable)**: `mcp__plugin_ruflo-core_ruflo__memory_store --namespace migrations` for validation results tied to a specific migration number.
10. **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
An agent meta-harness for Claude Code and Codex. Agent = Model + Harness. The model writes; the harness gives it tools, memory, loops, sandboxes, and controls so it can actually work.
Repo: ruvnet/ruflo
Other skills on claude-flow.
- /agentdb-advanced
Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration. Use when building distributed AI systems, multi-agent coordination, or advanced vector search applications.
Open skill - /agentdb-learning
Create and train AI learning plugins with AgentDB's 9 reinforcement learning algorithms. Includes Decision Transformer, Q-Learning, SARSA, Actor-Critic, and more. Use when building self-learning agents, implementing RL, or optimizing agent behavior through experience.
Open skill - /agentdb-memory-patterns
Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants.
Open skill - /agentdb-optimization
Optimize AgentDB performance with quantization (4-32x memory reduction), HNSW indexing (150x faster search), caching, and batch operations. Use when optimizing memory usage, improving search speed, or scaling to millions of vectors.
Open skill - /agentdb-vector-search
Implement semantic vector search with AgentDB for intelligent document retrieval, similarity matching, and context-aware querying. Use when building RAG systems, semantic search engines, or intelligent knowledge bases.
Open skill - /agentic-jujutsu
Quantum-resistant, self-learning version control for AI agents with ReasoningBank intelligence and multi-agent coordination
Open skill

