Migrates .NET Entity Framework 6 data layers to EF Core via a two-step process: bridge to EF 6.5 on .NET 10, then per-DbContext rewrite with query parity tests. Covers EDMX, DbModelBuilder, lazy loading, database initializers, and cascade-delete differences.
Ships in .NET Pack (legacy .NET Framework + Migration Pack to .NET 10). Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Two steps, because they solve different problems:
Skip step 1 only for small models where the EF Core rewrite is quicker than the bridge (a few entities, no EDMX).
Every DbContext, entity, EntityTypeConfiguration<T>, OnModelCreating, .edmx, initializer / Seed, every repository or query (Include, DbFunctions, SqlFunctions, raw SQL), and the connection strings in config.
Project to SDK-style, multi-target net48;net10.0 (legacy-package-migrator does the project file).
Packages: EntityFramework 6.5.x, and for SQL Server the new provider Microsoft.EntityFramework.SqlServer (uses Microsoft.Data.SqlClient).
Code-based configuration - .NET 10 has no <entityFramework> config section:
[DbConfigurationType(typeof(System.Data.Entity.SqlServer.MicrosoftSqlDbConfiguration))]
public class ShopContext : DbContext
{
public ShopContext(string connectionString) : base(connectionString) { }
// keep a parameterless ctor for the net48 side while it still reads Web.config:
public ShopContext() : base("name=ShopContext") { }
}
The .NET 10 host passes the connection string from appsettings.json. Watch the Microsoft.Data.SqlClient default Encrypt=true - add TrustServerCertificate=True only for local dev.
EDMX: the EF6 designer doesn't work on .NET or SDK-style projects. If the model is EDMX-based, go straight to step 2 for that context (scaffold).
Run the app's tests and the parity tests on both targets.
dotnet ef dbcontext scaffold "<conn>" Microsoft.EntityFrameworkCore.SqlServer --context <Name> --output-dir Model, then compare with the old entities property by property.OnModelCreating with references/ef6-to-efcore-mapping.md. Keep table and column names identical (EF6's PluralizingTableNameConvention removal, [Table], key names).OnDelete(DeleteBehavior.Restrict / Cascade / ClientSetNull)). EF6 conventions cascaded every required FK - that is often how order history disappears when a product is deleted. A person decides; log it.Don't let EF Core create or change the schema on day one:
dotnet ef migrations add Baseline - then empty its Up() / Down() (the tables already exist).dotnet ef database update on a copy, check the schema didn't change (dotnet ef migrations script shows nothing but the history table).HasData (static reference data) or a seeding step in Program.cs (UseSeeding / UseAsyncSeeding).Include / a projection. UseLazyLoadingProxies() (Microsoft.EntityFrameworkCore.Proxies) is the quick bridge - note every use as debt.using.DbFunctions.TruncateTime(x) -> x.Date; SqlFunctions.* -> EF.Functions.*.Include("Lines") -> Include(o => o.Lines).AsEnumerable() on purpose, or rewrite it to translate.For every repository method / query: run the EF6 version and the EF Core version against the same seeded test database (LocalDB copy or Testcontainers SQL Server) and compare the results (counts, ordering, values, nulls). Template: references/QueryParityTests.cs. Watch especially: ordering without OrderBy, decimal precision, DateTime kind, null navigations, grouping results.
Swap the registrations in the new host to the EF Core context (AddDbContext<ShopContext>(o => o.UseSqlServer(...))), run the full parity suite, commit: migrate: ShopContext -> EF Core. The EF6 context is deleted at decommission.
migration/accepted-differences.md.What SKILL.md sets; muted values are Claude Code's defaults
/dotnet-pack:ef6-to-efcore-migratorfrom .NET Pack (legacy .NET Framework + Migration Pack to .NET 10)
npx claudepluginhub stefanthecode/ai-for-developers --plugin dotnet-pack12 skills in this plugin
/adonet-data-access-auditor(.NET) Audit and fix classic ADO.NET data-access code (SqlConnection / SqlCommand / SqlDataReader / DataSet) on .NET Framework. Use this skill whenever the user shares raw ADO.NET code, a DAL / repository built on SqlCommand, stored-proc calls, string-concatenated SQL, or mentions SQL injection, parameterized queries, connection leaks, "using / Dispose", reading the same column multiple times, transactions, or "why does my old data layer leak connections / is it safe". Always use this skill for classic ADO.NET review instead of answering from memory; it applies a fixed security + correctness + performance checklist and rewrites the code./aspnet-mvc-webapi-migrator(.NET) Migrate ASP.NET MVC 5 and Web API 2 code to ASP.NET Core on .NET 10, one controller at a time - actions, routes, filters, model binding, IHttpActionResult, child actions, OutputCache, bundling - plus the app plumbing around them - Global.asax, IHttpModule, IHttpHandler/.ashx, HttpContext.Current, Newtonsoft.Json formatters and XML content negotiation. Use this skill whenever the user wants to "migrate this controller", "Web API 2 to ASP.NET Core", "MVC 5 to .NET 10", "replace Global.asax", "convert this HTTP module to middleware", "port this .ashx handler", or is moving endpoints one by one in a strangler-fig migration. Always use this skill for MVC/Web API migrations instead of answering from memory; it keeps routes, status codes and payloads identical and proves it with parity tests./legacy-config-auth-migrator(.NET) Migrate the cross-cutting parts of an ASP.NET Framework app to .NET 10 - web.config and transforms to appsettings + Options, machineKey to Data Protection, Forms authentication / Membership / OWIN cookies to ASP.NET Core cookie auth or Identity (with remote authentication while both apps run), <location> authorization to policies, session and Application state, BinaryFormatter, customErrors and Application_Error. Use this skill whenever the user asks about "web.config in .NET 10", "ConfigurationManager replacement", "machineKey", "Forms authentication to ASP.NET Core", "Membership to Identity", "share login between old and new app", "session in ASP.NET Core", "replace BinaryFormatter", or plans how auth and session work during a migration. Always use this skill for these cross-cutting pieces instead of answering from memory; they are where migrations break for users./legacy-package-migrator(.NET) Migrate a .NET Framework solution from packages.config to PackageReference and Central Package Management (Directory.Packages.props). Use this skill whenever the user mentions packages.config, PackageReference, "migrate packages", Directory.Packages.props, Central Package Management / CPM, transitive package versions, NuGet version drift across projects, "different projects use different versions of the same package", or wants to unify NuGet versions across a multi-project solution (including third-party/vendor extension projects). Always use this skill for these requests; it produces a staged, per-project migration plan plus the actual Directory.Packages.props and .csproj edits, not a generic explanation./migration-assessment-report(.NET) Assess a .NET Framework solution (WebForms, MVC 5, Web API 2, WCF, EF6, class libraries) for a move to .NET 10 and produce a self-contained HTML report - architecture diagrams, a blocker scan, a target per WebForms page (Razor Pages, Blazor or MVC), effort in person-days with and without AI, and a clear split of what an AI agent can do versus what needs a human. Use this skill whenever the user asks "how hard is it to move this to .NET 10", "assess this legacy solution", "give me a migration estimate", "what would it take to modernize this", "should we migrate this WebForms app", or wants a migration report for a manager or a client. Always use this skill for migration assessments instead of answering from memory; it runs a deterministic scanner, reviews the result and renders the report./migration-safety-net(.NET) Lock the current behavior of a .NET Framework app BEFORE migrating it - HTTP parity tests (record the old app's responses, then check the new .NET 10 app or the YARP host answers the same), Playwright flow tests for postback screens, and characterization (golden master) tests for business logic. Use this skill whenever the user is about to migrate or refactor legacy code and asks for "parity tests", "characterization tests", "golden master", "how do I know the new app behaves the same", "lock the behavior first", "regression tests before migration", or before any route moves from the old app to the new one. Always use this skill to build the safety net instead of writing ad-hoc tests; it produces a reusable record/verify harness and an accepted-differences log.Other plugins' skills for the same job