Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Laravel Migrations Safety Review

    by Saizul Amin

    1

    Audit Laravel migrations for production risks, table locks, and data loss while planning zero-downtime rollouts.

    $6

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Laravel Migrations Safety Review

    Laravel Migrations Safety Review

    Example session with this skill installed

    Run the Laravel Migrations Safety Review skill on my project and give me a prioritised list of what to fix, with exact changes.

    • Read your context and instructions
    • Compiled the laravel migrations safety

    Here is what the Laravel Migrations Safety Review skill produced.

    Demo: real, unedited output of the skill's bundled script on a sample input from its test suite.

    Output

    1 migration(s): 2 high, 2 medium, 1 low, 1 info
    
    2026_11_03_000000_backfill_orders.php
      MEDIUM line 12   [data-migration] moves or rewrites data inside a migration
             fix: Large backfills time out and lock tables: use a queued job or command in batches; avoid Eloquent models in migrations (they change later).
      MEDIUM line 13   [data-migration] moves or rewrites data inside a migration
             fix: Large backfills time out and lock tables: use a queued job or command in batches; avoid Eloquent models in migrations (they change later).
      INFO   line 14   [raw-statement] raw DB::statement() in up(): review the SQL by hand
             fix: Check locking behaviour and that down() reverses it.
      HIGH   line 15   [drop-table] drops table order_archive in up()
             fix: Confirm nothing reads the table, take a backup, and keep a rename-to-_old step if unsure.
      HIGH   line 16   [rename] renames table carts
             fix: Running code still uses the old name; deploy code that handles both or use a view.
      LOW    line 20   [empty-down] down() is empty: rollback does nothing
             fix: Reverse up() in down(), or throw an exception to make the one-way nature explicit.
    

    What you do next

    1. Fix the highest-severity items first.
    2. Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
    3. Keep the skill installed and re-run it whenever the project changes.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Database migrations in production are high-risk operations that can lead to data loss or downtime. This skill audits Laravel migration files to catch dangerous patterns like table locks, column renames, and unsafe data backfills before they hit your live environment.

    What it does

    • Risk detection flags destructive operations like dropColumn, renameColumn, and truncate in the up() method.
    • Downtime prevention identifies NOT NULL columns without defaults and unique index additions that lock large tables.
    • Rollout planning generates multi-step expand-and-contract plans for complex changes like renaming columns or adding foreign keys.
    • Code verification checks for missing or empty down() methods to ensure rollback capability.
    • Large table awareness adjusts risk profiles based on row counts or high-traffic tables like users or orders.

    How it works

    1. Identify pending migrations using php artisan migrate:status or git diffs to isolate new files.
    2. Scan migration files with the Python-based checker to categorize risks as High, Medium, or Low.
    3. Analyze table stats to determine if operations like ->change() will trigger a full table copy or timeout.
    4. Generate safe patterns based on the findings, providing rewritten migration code or artisan commands for backfilling data.

    Frameworks & tools

    Built for Laravel applications using MySQL 8, MariaDB, or PostgreSQL. The audit tool is written in Python, while integration checks utilize the Laravel Artisan CLI.

    Why this beats prompting it yourself

    Standard LLMs often miss the nuance of how Laravel's ->change() behaves differently between versions or how a rename causes 500 errors during a rolling deploy. This skill uses a specialized risk-scoring engine that enforces production-safe patterns like dual-writing and chunked backfills.

    Use cases

    • Reviewing a PR that renames a core column in a high-traffic orders table.
    • Planning a zero-downtime deployment for a schema change involving millions of rows.
    • Auditing legacy migrations for missing rollback logic before a major refactor.

    Known limitations

    This is a review tool and does not execute migrations. It cannot detect query performance issues or N+1 problems.


    Open source: saizul/laravel-php-skills on GitHub (MIT licence, by Saizul Amin).

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Does not execute migrations. Does not detect N+1 issues or query performance. Requires Python 3.8+ for the checker script. Optional SQL preview requires a local database connection.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Frequently Asked Questions

    The skill identifies dangerous operations like table-locking column changes and provides a multi-step 'expand-and-contract' plan to ensure your application remains online during the entire deployment process.

    It is compatible with Laravel projects using MySQL 8+, MariaDB, or PostgreSQL, and is designed to run within AI agents that have access to your terminal and file system.

    You receive the specialized Python-based risk detection engine, a set of automated audit routines, and a library of safe migration patterns for high-traffic environments.

    While the skill needs to see your migration files and basic table metadata (like row counts), it does not require access to the actual sensitive data stored within your rows.

    Yes, it flags migrations where the down() method is missing or empty, ensuring that every schema change you push can be safely reversed in the event of a failure.

    Updates are released to support new Laravel versions and evolving database engine behaviors; customers receive notifications through the marketplace to download the latest version of the toolkit.

    New in APIs & Backend