migrate
Skill750 starsChanged 4 months agoMITView on GitHub
Guided, safe migration workflow covering EF Core schema migrations, .NET version upgrades, and NuGet dependency updates — each with rollback strategies and verification steps. Invoke when: "add migration", "update database", "create migration", "schema change", "new table", "rename column", "upgrade nuget", "update packages", "dependency update", "version upgrade", ".NET upgrade".
- Deletes or force-pushes
39 other projects use a version of this.
Adopted by
Most recently taken up by
- amervyng/ClaudeCodetheir own version, first seen Oct 5, 2026
- DawnEver/claude-code-configtheir own version, first seen Oct 4, 2026
- AsiaOstrich/universal-dev-standardstheir own version, first seen Sep 30, 2026
- gonimar/claude-web-studiotheir own version, first seen Sep 27, 2026
- atomicinnovation/acceleratortheir own version, first seen Sep 22, 2026
- antoniowolkk/junior-agenttheir own version, first seen Sep 22, 2026
Used with
Projects with it also use a11y, incident and 7 more.
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.
CorentinGCSkilla11y
Accessibilité web — rôles ARIA, navigation clavier, contraste, labels, focus management, semantic HTML. Appliqué automatiquement lors de la création de composants UI.
Also in 3 projects that use this
pvnarpSkillincident
Guides incident response and post-mortem analysis. Covers triage, mitigation, root cause analysis, and prevention. Use when responding to active incidents, writing post-mortems, or improving incident processes.
Also in 3 projects that use this
AnthropicSkilltech-debt
Identify, categorize, and prioritize technical debt. Trigger with "tech debt", "technical debt audit", "what should we refactor", "code health", or when the user asks about code quality, refactoring priorities, or maintenance backlog.
Also in 3 projects that use this
HashiCorpSkillchangelog
Add a `.changelog/<PR_NUMBER>.txt` entry for a GitHub Pull Request, commit, and push.
Also in 6 projects that use this
VercelSkilldeploy
Deploy applications to Vercel. Use when the user says "deploy", "deploy to Vercel", "push to production", "deploy my app", or "go live".
Also in 6 projects that use this
GitHubSkillrefactor
Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.
Also in 6 projects that use this
Other versions39 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 39
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- dsifry/metaswarm★ 419same name
- guhcostan/claude-mega-brain★ 126same name
- AsiaOstrich/universal-dev-standards★ 76same name
- lightpointventures/claude-code-starter★ 36same name
- atomicinnovation/accelerator★ 34same name
- launchdarkly/ai-tooling★ 25same name
- Hassaan146/claude-skills★ 18same name
- ignromanov/llm-obsidian-wiki★ 17same name
- jamie8johnson/cqs★ 16same name
29 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 repository52 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/rules/agents.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- .opencode/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/dotnet-rules.mdCursor rule
- api-versioningSkill
- arch-checkSkill
- architecture-advisorSkill
- aspireSkill
- authenticationSkill
- build-fixSkill
- cachingSkill
- checkpointSkill
- ci-cdSkill
- clean-architectureSkill
- code-reviewSkill
- configurationSkill
- container-publishSkill
- convention-learnerSkill
- dddSkill
- dependency-injectionSkill
- de-sloppifySkill
- dockerSkill
- dotnet-initSkill
- ef-coreSkill
- error-handlingSkill
- health-checkSkill
- httpclient-factorySkill
- instinct-systemSkill
- loggingSkill
- messagingSkill
- minimal-apiSkill
- modern-csharpSkill
- openapiSkill
- opentelemetrySkill
- outdatedSkill
- planSkill
- project-setupSkill
- project-structureSkill
- resilienceSkill
- scaffoldSkill
- scalarSkill
- security-scanSkill
- serilogSkill
- specSkill
- tddSkill
- testingSkill
- verifySkill
- vertical-sliceSkill
- workflow-masterySkill
- wrap-upSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 32 edited versions we read keep these.
6
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 32
After modifying entity classes, DbContext configuration, or relationships
- Distinctive: line 34
When generating SQL scripts for DBA review
- Distinctive: line 51
Check for pending migrations and uncaptured model changes.
- Distinctive: line 55
Use MCP tools instead of reading whole files:
- Distinctive: line 92
If data must survive a rename/retype, use a multi-step migration with raw SQL:
- Distinctive: line 118
Never modify a migration that is already applied — create a new one.
“Common” is measured: kept by at least 6 in 10 of the 32 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
/migrate
What
The single migration workflow for three change types, with EF Core schema migrations as the primary flow:
- EF Core schema — review pending model changes, generate a descriptively named migration, review the SQL for data loss and locking risks, apply with a documented rollback path.
- .NET version upgrade — phased TFM/SDK/package upgrade with verification at each phase.
- NuGet updates — incremental, one-package-at-a-time updates so breakage is always attributable.
Shared principles: verify before applying, rollback plan always, test after every step, one logical change per migration.
When
- After modifying entity classes, DbContext configuration, or relationships
- "add migration", "update database", "create migration", "new table", "rename column"
- When generating SQL scripts for DBA review
- "upgrade to .NET 10", "version upgrade", ".NET upgrade"
- "upgrade nuget", "update packages", "dependency update", vulnerable package alerts
How
First, classify the request: schema change → Flow A; framework upgrade → Flow B; package update → Flow C. Then follow that flow end to end.
Flow A: EF Core Schema Migration (primary)
Step 1: Assess current state
dotnet ef migrations list --project <InfraProject> --startup-project <ApiProject>Check for pending migrations and uncaptured model changes.
Step 2: Review model changes
Use MCP tools instead of reading whole files:
find_symbol(name: entity or DbSet) -- locate the changed entity
get_type_hierarchy(typeName: entity) -- check TPH/TPT/TPC inheritance changes
find_references(symbolName: property) -- assess downstream query impactConfirm the change is one logical unit. If not, split into multiple migrations — mixed migrations make rollback all-or-nothing.
Step 3: Generate migration
Name describes the change, not the entity: Add|Remove|Rename|Modify + WhatChanged.
# GOOD
dotnet ef migrations add AddOrderShippingAddress --project <Infra> --startup-project <Api>
# BAD — names the entity, not the change
dotnet ef migrations add OrderStep 4: Review generated SQL
database update has no dry-run flag — preview by generating an idempotent
script and reading it:
dotnet ef migrations script --idempotent --project <Infra> --startup-project <Api>Flag and report:
- DROP COLUMN / DROP TABLE — confirm data loss is intentional
- ALTER COLUMN type changes — check precision loss or truncation
- ALTER on large tables — warn about lock duration
- New non-nullable columns — need defaults for existing rows
If data must survive a rename/retype, use a multi-step migration with raw SQL:
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>("ContactEmail", "Customers", nullable: true);
migrationBuilder.Sql("UPDATE \"Customers\" SET \"ContactEmail\" = \"Email\"");
migrationBuilder.AlterColumn<string>("ContactEmail", "Customers", nullable: false);
migrationBuilder.DropColumn("Email", "Customers");
}Step 5: Apply and verify
dotnet ef database update --project <Infra> --startup-project <Api>
dotnet build && dotnet test # integration tests catch schema mismatchesStep 6: Document rollback
dotnet ef database update <PreviousMigrationName> --project <Infra> --startup-project <Api>
dotnet ef migrations remove --project <Infra> --startup-project <Api> # if unapplying from codeNever modify a migration that is already applied — create a new one.
Flow B: .NET Version Upgrade
- Assess —
get_project_graphto list all TFMs; flag mixed versions. - Pre-flight — all tests green, no pending EF migrations, dependencies checked for target-version compatibility, dedicated branch created (branch IS the rollback plan).
- Update
global.json— SDK version with"rollForward": "latestMinor". - Update TFMs —
<TargetFramework>net10.0</TargetFramework>and<LangVersion>14</LangVersion>in.csprojorDirectory.Build.props. - Update packages —
dotnet outdated --upgrade Major --include Microsoft.*, then build and fix. - Adopt new features — per
knowledge/dotnet-whats-new.md:TimeProvider,HybridCache, primary constructors, collection expressions. - Verify —
dotnet build,dotnet test,dotnet format --verify-no-changes.
Flow C: NuGet Package Updates
- Audit —
dotnet list package --outdatedanddotnet list package --vulnerable. Vulnerable packages are urgent: update, test, deploy. - Categorize — patch (batch-safe), minor (one at a time), major (one at a time, read release notes first).
- Update incrementally — one package, then
dotnet build && dotnet testbefore the next. Batched updates make failures unattributable. - Check fit — consult
knowledge/package-recommendations.mdbefore adding new packages; prefer built-in .NET alternatives. Moving off MediatR (commercial license from v13)? Follow the step-by-step guide inknowledge/mediatr-to-mediator-migration.md. - Rollback — git revert the package bump; never downgrade other packages to compensate.
MCP Tools Used
find_symbol/find_references— locate entities, assess schema-change impactget_type_hierarchy— entity inheritance for TPH/TPT/TPCget_project_graph— TFM audit before version upgradesget_diagnostics— catch warnings after migration generation or upgrades
Example
User: /migrate
Claude: Checking migration state...
Last applied: 20250710_AddOrderTable
Model changes detected: new ShippingAddress property on Order entity.
Creating migration: AddOrderShippingAddress
Reviewing SQL (dotnet ef migrations script --idempotent)...
- ALTER TABLE "Orders" ADD "ShippingStreet" text NULL
- ALTER TABLE "Orders" ADD "ShippingCity" text NULL
No data loss. No locking risk. Safe to apply.
Applying migration... Done. Build: green. Tests: 34/34 passed.
Rollback (if needed):
dotnet ef database update AddOrderTable --project src/Infrastructure --startup-project src/ApiRelated
ef-core— entity configuration, query patterns, migration internals/verify— full verification pipeline after migration work/checkpoint— commit a safe state before risky migrations
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.

