Install any skill in seconds. Free to start, no credit card required.
Get Started Free →microck/Backend Migration Standards
Create and manage database migrations with reversible changes, proper naming conventions, and zero-downtime deployment strategies.
Passed 22 of 22 test cases with the skill, and 17 of 22 without it.
and 3 more in the full report
5 fixed17 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
Write an Alembic migration snippet to create an index on `user_id` and `status` in the MySQL `payments` table. Ensure write operations on the live table are not blocked.
| Checked | Without skill | With skill |
|---|---|---|
| Names the index idx_payments_user_id_status | Passed | Passed |
| Sets mysql_algorithm='INPLACE' or mysql_lock='NONE' in the index creation | Missed | Passed |
The instructions your model reads when the skill loads.
Apply these rules when creating or modifying database migrations. Migrations are permanent records of schema evolution and must be treated with extreme care.
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle backend migrations.
Reversibility is Mandatory: Every migration MUST have a working rollback method. Test the down migration immediately after writing the up migration. If a change cannot be reversed safely (e.g., dropping a column with data), document why in comments and consider a multi-step approach.
One Logical Change Per Migration: Each migration should do exactly one thing - add a table, add a column, create an index, etc. This makes debugging easier, rollbacks safer, and code review clearer. If you need to make multiple related changes, create multiple migrations.
Never Modify Deployed Migrations: Once a migration runs in any shared environment (staging, production), it becomes immutable. Create a new migration to fix issues. Modifying deployed migrations breaks version control and causes deployment failures.
Naming Convention: Use timestamps and descriptive names that indicate the change:
20241118120000_add_email_to_users.py20241118120100_create_orders_table.rb20241118120200_add_index_on_users_email.jsThe name should answer "what does this migration do?" without reading the code.
File Organization:
migrations/schema/migrations/data/test cases passed, vs 17 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.