migration-plan
Skill4 starsChanged 2 days agoMITView on GitHub
Plan a schema or data change that is safe to deploy and to undo: split it into expand / backfill / switch / contract steps that each work with old and new code running at once, write a rollback for every step, rehearse on a copy of real data with row counts, and set the checks that decide go or stop. Use for "add/rename/drop a column", "migrate this data", "change the schema", "backfill", "change a file or message format", "is this migration safe", or any change to stored data.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- abevz/devops-skillstheir own version, first seen Oct 15, 2026
- analyticsengineering/ae-toolkittheir own version, first seen Oct 12, 2026
- prestarius/jet-skills-stacktheir own version, first seen Oct 11, 2026
- devpilotX/skillstheir own version, first seen Sep 22, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- analyticsengineering/ae-toolkit★ 3same name
- prestarius/jet-skills-stack★ 1same name
- abevz/devops-skills★ 0same name
- devpilotX/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository50 other files it gives its agents.
- agent-writingSkill
- arenaSkill
- blast-radiusSkill
- bun-playwright-runner-selectionSkill
- cinematic-shotSkill
- clean-ui-shotSkill
- codebase-designSkill
- debug-loopSkill
- dep-upgradeSkill
- diagnosing-bugsSkill
- discoverSkill
- domain-modelingSkill
- earshotSkill
- eval-judgeSkill
- flaky-testSkill
- grillingSkill
- grillSkill
- idea-scoutSkill
- improve-codebase-architectureSkill
- interrogateSkill
- make-mediaSkill
- migrate-to-rustSkill
- multi-agent-windows-hazardsSkill
- perf-loopSkill
- postmortemSkill
- prototypeSkill
- prSkill
- real-soundSkill
- recallSkill
- release-notesSkill
- repo-mapSkill
- researchSkill
- retroSkill
- secure-diffSkill
- sellSkill
- subagent-report-recoverySkill
- tasteSkill
- taste-skillSkill
- tddSkill
- teachSkill
- to-questionnaireSkill
- to-specSkill
- to-ticketsSkill
- wayfinderSkill
- weeklySkill
- windows-bash-backslash-halvingSkill
- wizardSkill
- writing-for-agentsSkill
- ycSkill
- ystack-upgradeSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Write the before and after shape, how many rows or files are affected (query it), and who reads and writes this data: services, jobs, other …
- Very specific: line 30
Use expand and contract. A rename of email to contact_email, for example:
- Distinctive: line 53
Run the steps on a copy of real data (or a realistic sample at scale).
- Distinctive: line 73
Every step before the point of no return has a tested rollback.
- Distinctive: line 74
No step requires old and new code to be deployed at the same instant.
- Distinctive: line 75
Never rewrite data in place without a copy or backup you have restored at least once.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Migration plan
Code rolls back in a minute. Data, once rewritten, often can't. Plan every data change so that each step can be deployed alone, can run while old code is still live, and has a way back.
When it applies
- Any change to a database schema, stored file format, cache layout, queue message shape or index.
- A backfill or bulk rewrite of existing data.
Procedure
1. State the change and the data
Write the before and after shape, how many rows or files are affected (query it), and who reads and writes this data: services, jobs, other repos, analytics, backups.
2. Split into steps that each stand alone
Use expand and contract. A rename of email to contact_email, for example:
| Step | Change | Old code still works? | Rollback |
| 1 Expand | add contact_email, nullable | yes | drop the column |
| 2 Dual write | code writes both columns | yes | deploy previous code |
| 3 Backfill | copy email to contact_email in batches | yes | none needed: old column intact |
| 4 Switch reads | code reads contact_email | yes | deploy previous code |
| 5 Contract | stop writing email, later drop it | no: point of no return | restore from backup only |
Each step ships separately. Mark the point of no return and put it last, after a waiting period.
3. Make the risky steps safe
- Locks: know whether the change locks the table on your database and size; use the online or concurrent form where it exists (adding indexes, adding columns with defaults).
- Backfills: batches of a fixed size, resumable from the last id, safe to run twice, throttled.
- Defaults and nulls: decide what old rows get; never let "null" silently mean something new.
- Backup: confirm a restorable backup exists before the point of no return. Check the restore, not just the backup file.
4. Rehearse on a copy
Run the steps on a copy of real data (or a realistic sample at scale). Record time per step and row counts before and after. Run the rollback for each step and check the data matches the start.
5. Set go and stop checks
For each step: the query or metric that shows it worked (row counts match, no nulls where none are allowed, error rate flat), and the condition that means stop and roll back.
Output
Change: <before -> after> Affected: <n rows/files> Readers/writers: <list>
Steps: <the table, with rollback per step>
Point of no return: step <n>, after <wait condition>
Rehearsal: <time per step, counts before/after, rollback tested yes/no>
Checks: <per step: go signal / stop signal>Rules
- Every step before the point of no return has a tested rollback.
- No step requires old and new code to be deployed at the same instant.
- Never rewrite data in place without a copy or backup you have restored at least once.
- Running the plan against production is the user's call; hand over the plan.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

