Migrates ASP.NET MVC 5 and Web API 2 controllers, routes, filters, modules, and app plumbing to ASP.NET Core on .NET 10 one piece at a time, preserving behavior with parity tests.
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.
One controller (or one module / handler) per run, into the .NET 10 host from yarp-strangler-setup. Same routes, same status codes, same JSON - checked by the parity tests before the commit.
The controller (or module, handler, Global.asax.cs), its routes (attribute routes, RouteConfig, WebApiConfig), its filters, the views it renders, and the parity scenarios that cover it.
For every action: HTTP method, route, parameters and where they bind from ([FromUri], [FromBody], query, form), return type, status codes it can return, filters / [Authorize], and anything static it touches (HttpContext.Current, CurrentUser, ConfigurationManager).
| Web API 2 | ASP.NET Core |
|---|---|
ApiController | ControllerBase + [ApiController] |
IHttpActionResult, Ok(), NotFound(), BadRequest(ModelState), Created(uri, x) | IActionResult / ActionResult<T>, same helper names; Created(uri, x) stays |
HttpResponseMessage | IActionResult (or Results.* in minimal APIs) |
[RoutePrefix("api/products")] + [Route("{id:int}")] | [Route("api/products")] on the class + [HttpGet("{id:int}")] |
[FromUri] T x | [FromQuery] T x |
config.MapHttpAttributeRoutes() + GlobalConfiguration.Configure | builder.Services.AddControllers() + app.MapControllers() |
ModelState.IsValid checks | automatic 400 with [ApiController] - keep the same response body shape if clients parse it, or set SuppressModelStateInvalidFilter |
HttpContext.Current.User, static CurrentUser | User in the controller; IHttpContextAccessor / an ICurrentUser service elsewhere |
JSON camelCase via CamelCasePropertyNamesContractResolver | default in System.Text.Json - nothing to do. Newtonsoft-specific settings -> AddNewtonsoftJson() only if needed |
| XML via content negotiation | gone by default. If any client sends Accept: application/xml, add AddXmlSerializerFormatters() - or log it as an accepted difference |
[Authorize] -> 302 to login (Forms auth) | 401. Behavior change - check API clients, log it |
Minimal APIs are fine for new endpoints; for a 1:1 move, controllers keep the diff small and the parity easy.
| MVC 5 | ASP.NET Core MVC |
|---|---|
Controller (System.Web.Mvc) | Controller (Microsoft.AspNetCore.Mvc) |
ActionResult, View(), PartialView(), RedirectToAction() | same names |
[ChildActionOnly] + Html.Action("TopProducts", new { take = 5 }) | a view component + @await Component.InvokeAsync("TopProducts", new { take = 5 }) |
[OutputCache(Duration = 60, VaryByParam = "days")] | builder.Services.AddOutputCache() + app.UseOutputCache() + [OutputCache(Duration = 60, VaryByQueryKeys = ["days"])] |
ViewBag / ViewData | same |
Views/Web.config namespaces | Views/_ViewImports.cshtml |
@Styles.Render / @Scripts.Render (bundling) | <link> / <script> tags to files in wwwroot (+ asp-append-version="true"), or a build-time bundler |
HandleErrorAttribute, customErrors | app.UseExceptionHandler("/Error") + UseStatusCodePages |
RouteConfig.MapRoute(...) | app.MapControllerRoute(...) with the same templates |
AntiForgeryToken | built in for forms (tag helpers) |
Views mostly carry over. Change HTML helpers to tag helpers only where it simplifies the view - not as a goal.
| Old | New |
|---|---|
Global.asax Application_Start | Program.cs (services + pipeline) |
Application_Error | UseExceptionHandler + ILogger |
Application_PostAuthenticateRequest (roles from a ticket) | claims transformation (IClaimsTransformation) or the cookie's claims - see legacy-config-auth-migrator |
Session_Start / Session_End | no equivalent - remove or move the logic (counters -> metrics) |
Application["X"] | a singleton service or IMemoryCache |
IHttpModule (BeginRequest, PreSendRequestHeaders) | middleware; for response headers use context.Response.OnStarting(...) |
IHttpHandler / .ashx | an endpoint on the SAME path: app.MapGet("/Handlers/ProductImage.ashx", ...) |
HttpContext.Current in libraries | adapters while both apps run (yarp-strangler-setup), then an injected abstraction |
System.Drawing in handlers | Windows-only on .NET 6+. Stay on Windows hosting, or move to ImageSharp / SkiaSharp (check licenses) - a human decision |
migration/accepted-differences.md for a person to approve (401 vs 302 and XML are the usual ones).migrate: ProductsController -> ASP.NET Core. Update migration/MIGRATION.md.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/dotnet-pack:aspnet-mvc-webapi-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./ef6-to-efcore-migrator(.NET) Move an Entity Framework 6 data layer to .NET 10 in two safe steps - first EF 6.5 on .NET 10 as a bridge (same model, same queries, no rewrite), then EF Core one DbContext at a time behind query parity tests. Covers DbModelBuilder fluent config, EDMX models, lazy loading, database initializers and Seed, DbFunctions/SqlFunctions, string Include, cascade-delete and orphan differences, and a baseline migration for an existing database. Use this skill whenever the user mentions EF6, EntityFramework 6, "EF6 to EF Core", EDMX, DbModelBuilder, "EF6 on .NET 8/10", lazy loading differences, or is moving a data layer in a .NET Framework migration. Always use this skill for EF6 migrations instead of answering from memory.Other plugins' skills for the same job