- Home
- Skills
- APIs & Backend
- Laravel Migrations Safety Review
Works with the AI Agents you already use
Laravel Migrations Safety Review
by Saizul Amin
Audit Laravel migrations for production risks, table locks, and data loss while planning zero-downtime rollouts.
$6
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
- Fix the highest-severity items first.
- Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
- 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, andtruncatein theup()method. - Downtime prevention identifies
NOT NULLcolumns 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
usersororders.
How it works
- Identify pending migrations using
php artisan migrate:statusor git diffs to isolate new files. - Scan migration files with the Python-based checker to categorize risks as High, Medium, or Low.
- Analyze table stats to determine if operations like
->change()will trigger a full table copy or timeout. - 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
orderstable. - 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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.
Trust & safety
Security scan
Security scan passed 1 day ago
- Software
Git
Python 3.8+