Skip to content
Back to skills

Migration Safety

ASecurity

Reviews a migration for locks, rewrites and unsafe defaults before it merges.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 20, 2026
ai-agentsgobashsqlapidatabase

Works with

  • api

Security analysis

A100/100

Scanned October 20, 2026

npx -y skills add adnanmokhtar/refract --skill migration-safety --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Migration Safety?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Migration Safety
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adnanmokhtar-migration-safety/badge)](https://www.skillsdirectory.com/skills/adnanmokhtar-migration-safety)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: migration-safety
description: Reviews a migration for locks, rewrites and unsafe defaults before it merges.
kind: skill
allowed-tools: [Read, Grep, Glob, Bash]
pack: database
---

<!-- project-specific:start -->
## Project-specific (Orderly)

> Round-one anchor (Phase 4.6 / 2026-07-08); deepened by `/setup-project --refine` on 2026-07-10.
> Refresh source: `.claude/_codebase-scan.md` (re-run the scan before the next refine).
> REFINE rewrites between these markers; user-authored content outside is preserved verbatim.

**Where this applies in Orderly**:
- Migrations live in `apps/api/src/migrations/` and run with `pnpm --filter @orderly/api migration:up`.
- The order table is the largest; index changes on it go through review.

**Flows that exercise this rule**:
- e2e: every suite boots a testcontainers MySQL 8 instance and runs the migrations first.

**Failure themes to avoid**:
- Long locks on the order table: see `ai/failures/_index.md`.
<!-- project-specific:end -->

# Skill: migration-safety

Read one migration and answer: does it lock a hot table, rewrite it, or add a default that blocks writes?

## Checks

1. Every `ALTER TABLE` on a large table sets a lock timeout first.
2. New indexes on large tables are built without blocking writes.
3. A new non-null column has a default the database can add without a rewrite.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.