database-migration
Skill4 starsChanged 4 months agoMITView on GitHub
Use before changing any persisted schema — by backend-developer on a server store, by web-developer on a client or server store, and by reliability-engineer when reviewing a change that migrates data. Triggers on the first column, field, index or model change, not on the deploy.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- The-AIOS/aiostheir own version, first seen Sep 24, 2026
- caseyng/Claude-skillstheir own version, first seen May 22, 2026
- kwhorne/elyra-skillstheir own version, first seen May 22, 2026
- ai4brands-design/claude-skillstheir own version, first seen Mar 22, 2026
- CodeWithBehnam/cc-docstheir own version, first seen Mar 15, 2026
- accolver/skill-makertheir own version, first seen Mar 10, 2026
Used with
Projects with it also use security-audit.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 3 projects that use this
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- qf-studio/navigator★ 350same name
- The-AIOS/aios★ 69same name
- DauQuangThanh/hanoi-rainbow★ 17same name
- yusupsupriyadi/claude-code-mastering★ 17same name
- xfstudio/skills★ 9same name
- accolver/skill-maker★ 4same name
- ai4brands-design/claude-skills★ 2same name
- CodeWithBehnam/cc-docs★ 2same name
- caseyng/Claude-skills★ 1same name
- kwhorne/elyra-skills★ 1same name
1 more not listed
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 repository31 other files it gives its agents.
- accessibility-gateSkill
- agent-isolationSkill
- architecture-builderSkill
- board-doctorSkill
- brownfield-onboardingSkill
- business-modelSkill
- content-designSkill
- context-preflightSkill
- defect-huntingSkill
- dependency-policySkill
- design-systemSkill
- git-pr-strategySkill
- growth-analysisSkill
- house-conventionsSkill
- ic-workflowSkill
- intent-traceSkill
- interaction-motionSkill
- localisationSkill
- mutation-testingSkill
- parallel-orchestratorSkill
- performance-reviewSkill
- policy-checkerSkill
- prd-builderSkill
- process-tieringSkill
- requirements-intakeSkill
- role-activationSkill
- runtime-gateSkill
- spec-criticSkill
- sprint-plannerSkill
- support-miningSkill
- team-protocolSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Say how you roll back: If the answer is "restore a backup", say that explicitly — it is a real answer, and it changes the deploy plan.
- Distinctive: line 30
Forward-only, versioned, and ordered: Never edit a migration that has run anywhere.
- Distinctive: line 41
Run it against a copy of real-shaped data with the awkward rows in it — nulls, duplicates, the pre-unicode row, the one from the first …
- Distinctive: line 44
Run it twice and confirm the second run is a no-op.
- Distinctive: line 45
Run the previous application version against the migrated schema.
“Common” is measured: kept by at least 6 in 10 of the 10 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
Database migration
A migration is the one change that cannot be rolled back by reverting the commit. Code reverts; data that has already moved does not. Treat every migration as one-way until you have proven otherwise.
Where a platform skill exists, use it — axiom-database-migration, axiom-swiftdata-migration, or
the auditor for your store. External and optional; missing → follow this file.
Before you write it
- Enumerate every writer and every reader of the affected data (
defect-hunting§1). The migration that stops one layer short is FC-001, and this is the surface where it costs most. - Name the old and new shape explicitly, including what happens to rows that violate the new constraint today. There are always some.
- Decide expand or contract. Almost always expand first:
- Expand: add the new column nullable, write both, backfill, read new with fallback to old.
- Contract: only after every deployed client and server writes the new shape. On mobile that means after the oldest supported app version is gone, which is months, not the next sprint.
- Say how you roll back. If the answer is "restore a backup", say that explicitly — it is a real answer, and it changes the deploy plan.
Writing it
- Forward-only, versioned, and ordered. Never edit a migration that has run anywhere.
- Idempotent: safe to run twice, because it will be.
- Transactional where the engine allows it, and where it does not (many
ALTER TABLEpaths), say so and make each step independently safe. - Never
DROPin the same release that stops using the column. Two releases, minimum. - Backfill in batches with a bound, not in one statement that locks the table.
- A
NOT NULLcolumn gets a default or a backfill in the same migration — this is the single most common way a migration fails in production and not in dev.
Proving it
- Run it against a copy of real-shaped data with the awkward rows in it — nulls, duplicates, the pre-unicode row, the one from the first version. A migration tested only on a fresh database has been tested on the one case that never occurs.
- Run it twice and confirm the second run is a no-op.
- Run the previous application version against the migrated schema. During any rollout both exist at once, and this is the check that catches it.
- Count rows before and after, and state both. "It seemed to work" is not a result.
Output
The migration file, plus in the ticket: old shape, new shape, expand-or-contract, rollback plan, row counts before and after, and the awkward-data cases you ran it against.
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.

