skills/migration-strategist/SKILL.md
Manages major schema changes with zero-downtime using the expand-contract pattern, rather than writing unstable from-scratch migrations.
npx skillsauth add fatih-developer/fth-skills migration-strategistInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill focuses on taking a database from State A to State B without causing downtime, locks, or data loss in production. Direct ALTER TABLE operations on large tables are dangerous and often require a multi-step rollout.
Core assumption: You cannot lock the table. You cannot break the old version of the application while the new version is deploying.
When asked "How do I rename this column?" or "How do I split this table?", standard ALTER TABLE RENAME breaks the app.
Always enforce a backward-compatible migration strategy:
For breaking changes (e.g., renaming a column name to full_name):
full_name (nullable initially).name and full_name, but reads from name.full_name using name for old rows.full_name. After successful deployment, run a final migration to drop name.Provide a numbered timeline mapping Application Code states vs Database changes.
Required Outputs (Must write BOTH to docs/database-report/):
docs/database-report/migration-strategist-report.md)### 🕰️ Step 1: Database Expand (Migration 1)
- Add `full_name` column.
- SQL: `ALTER TABLE users ADD COLUMN full_name VARCHAR(255);`
### 💻 Step 2: Application Release (v1.1)
- Code updates to write to BOTH `name` and `full_name`.
- Read from `name`.
### 🔄 Step 3: Data Backfill Script
- SQL: `UPDATE users SET full_name = name WHERE full_name IS NULL;`
- Action: Run this out-of-band in batches of 10,000 to avoid long locks.
### 💻 Step 4: Application Release (v1.2)
- Code updates to read/write ONLY to `full_name`.
### ✂️ Step 5: Database Contract (Migration 2)
- SQL: `ALTER TABLE users DROP COLUMN name;`
- Action: Execute only when v1.1 is fully retired from traffic.
docs/database-report/migration-strategist-output.json){
"skill": "migration-strategist",
"steps": [
{"phase": "expand", "target_table": "users", "action": "add_column", "details": "full_name"},
{"phase": "app_release_1", "action": "dual_write"},
{"phase": "backfill", "query": "UPDATE users SET full_name = name"},
{"phase": "app_release_2", "action": "read_write_new_only"},
{"phase": "contract", "target_table": "users", "action": "drop_column", "details": "name"}
]
}
Every Migration plan must include a clear rollback path if Step 2 or Step 4 fails. How do we reverse it?
name, so reverting the code is safe."DEFAULT on new columns for large tables: In some older SQL versions, adding a column with a default value locks and rewrites the entire table. Use nullable + background backfill.NOT NULL, UNIQUE, or Foreign Keys only at the very end of the backfill process.tools
Create, optimize, critique, and programmatically structure prompts for AI systems. Use this skill whenever the user is designing or improving a static prompt, system prompt, coding prompt, agent prompt, workflow prompt, MCP-oriented prompt package, or an algorithmic prompt optimization pipeline. Also use it when the user asks to turn vague AI behavior into a precise instruction set, tool policy, agent spec, evaluation metric, or prompt architecture.
testing
Assumption-first architecture review skill to stress-test project plans and expose hidden risks.
testing
Enforce and manage DESIGN.md specifications, extract design systems from URLs, and combine design reasoning with token roles to prevent drift.
testing
Forces the agent to act with a Claude-like product mindset, prioritizing user journey, UX states, and visual quality before coding.