Migration Validator for Openclaw

A database tool that automatically scans and validates pending SQL migrations before they are executed to prevent pipeline failures.

ink5725
v1.0.0
Jun 2, 2026
0
562
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install migration-validator

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install migration-validator using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Migration Validator?

The Migration Validator is an essential utility designed to scan migration directories for pending SQL database migration files and ensure their syntax correctness before deployment. By running validation algorithms and parsing migration scripts, it functions as a critical safeguard in modern software release cycles.

Integrating this tool via Openclaw Skills enables automated schema protection, allowing developers to eliminate database runtime errors due to syntax typos or structural inconsistencies. It manages and logs migration execution states, identifying which migrations are pending or previously completed.

Migration Validator Use Cases

  • Deployment Gatekeeping: Detect syntax issues and structure errors in SQL migration scripts before execution.
  • CI/CD Integration: Automatically validate SQL files in pull requests or deployment pipelines as a blocking pre-step.
  • Multi-Environment Alignment: Confirm that migration scripts are cross-compatible and valid across developmental, staging, and production environments.

How Migration Validator Works

  1. Directory Discovery: The skill scans the designated migration directory (e.g., migrations/) to identify all candidate SQL files.
  2. Syntax Validation: Each SQL file is parsed and validated using specialized syntax engines (e.g., SQLite PRAGMA statement validation or a native SQL parser).
  3. State Tracking: The tool catalogs pending migration files against previously executed migrations to determine the database's differential state.
  4. Report Output: A structured JSON validation report is generated containing execution status, errors, and identified migrations.

Migration Validator Setup

To leverage this migration utility within the Openclaw Skills suite, configure your project workspace and run the validator script as shown below:

# Navigate to your project directory containing the migrations
cd /path/to/your/project

# Run the validator script
python scripts/validate.py

Ensure that you have your database drivers and python dependencies set up within your virtual environment.

Migration Validator Data Schema & Taxonomy

The tool evaluates SQL migration structures and generates a schema-compliant validation report in JSON. Below is the structure of the validation metadata output:

Property Type Description
validation_timestamp String ISO 8601 timestamp of validation execution
migrations_found Array Lists of SQL file names discovered in the folder
pending_migrations Array SQL files that have not yet been applied to the target database
validation_errors Array Detailed errors parsed from syntax verification
status String General validation status (e.g., completed, failed)

Example Output:

{
  "validation_timestamp": "2026-06-01T12:00:00",
  "migrations_found": ["001_initial.sql", "002_create_orders.sql"],
  "pending_migrations": [],
  "validation_errors": [],
  "status": "completed"
}

Migration Validator Advanced Features

  • Dry-Run Validation: Execute schema parsing without modifying active database states.
  • Configurable Parsing Engines: Choose dialect-specific validation checks tailored to SQLite, PostgreSQL, or MySQL schemas.
  • Openclaw Skills Automation: Easily connect migration-validator with multi-agent orchestration pipelines for automated rollbacks and pre-commit hooks.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*