Migrates .NET Framework solutions from packages.config to PackageReference and Central Package Management (Directory.Packages.props). Detects NuGet version drift and produces a staged, per-project migration plan.
Ships in TheCodeMan .NET AI ToolKit. 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.
Move a .NET Framework solution off packages.config and onto PackageReference, then lift all versions into a single Directory.Packages.props using Central Package Management (CPM). The goal is one source of truth for every NuGet version across every project -- including third-party extension projects -- so nobody ends up with two versions of the same package in one solution.
You don't need pasted files. Work from whatever target the user gives:
.sln and every project under itpackages.config, *.csproj, app.config/web.config.csproj + its packages.configgit clone --depth 1 <url> /tmp/repo && cd /tmp/repoDiscover the packaging state yourself with Glob/Grep/Bash instead of asking for a paste:
grep -rl "packages.config" <target> | grep -vi "/obj/\|/bin/"
# version drift across the solution:
grep -rhn "id=\"Newtonsoft.Json\"" --include=packages.config <target>
grep -rn "<PackageReference" --include=*.csproj <target>
Tell the user which projects you scanned, and always show the drift inventory before writing Directory.Packages.props.
The user has a packages.config-based solution (usually .NET Framework, often many projects) and wants to modernize package management, pin transitive versions, or stop version drift across modules and vendor extensions. They may point at a folder, paste a .csproj / packages.config, or just describe the mess.
If you don't have the files, ask for: the solution's project list, one representative .csproj + its packages.config, and whether third-party/vendor projects live in the same solution or reference the same packages.
Do it in two stages, never one. Each stage is independently verifiable and revertible:
packages.config -> PackageReference (per project). Behavior-preserving; versions still live in each .csproj.PackageReference -> Central Package Management. Hoist every version into one Directory.Packages.props; strip versions from projects.Doing Stage 2 before every project is on PackageReference will silently skip the leftover packages.config projects and leave you with a split-brain solution.
Visual Studio: right-click the project -> Migrate packages.config to PackageReference. It's the fastest correct starting point. Then verify by hand with the checklist below, because the migrator gets three things wrong often enough that you must check every time.
Transitive dependencies promoted to top-level. packages.config listed every transitive package as if it were direct. The migrator copies all of them into <PackageReference>, so a project that directly uses only Serilog now also "directly" references Serilog.Sinks.File, System.Text.Json, etc.
packages.config, app.config binding redirects, and the .nuget targets are left behind.
packages.config. Delete the auto-generated <bindingRedirect> block from app.config/web.config if present -- with PackageReference on modern MSBuild, redirects are generated at build (AutoGenerateBindingRedirects). Remove any <Import> of NuGet.targets / packages\...\build\... from the .csproj.ExcludeAssets / PrivateAssets not set for build/analyzer/dev-only packages.
Microsoft.SourceLink.*, *.Build.Tasks, StyleCop, etc. should carry PrivateAssets="all" so they don't flow to consumers.<PackageReference> (transitives removed).packages.config deleted from disk and from the project file.<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> present for exe/test projects on .NET Framework.PrivateAssets="all" on analyzers / build-only / dev-only packages.Tip: SDK-style
.csprojis not required forPackageReference-- a classic.csprojcan usePackageReferencetoo. Converting to SDK-style is a separate, larger step; don't couple it to this migration unless the user asks.
This is the part that actually kills version drift across a multi-project / multi-vendor solution.
Create Directory.Packages.props next to the .sln:
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<!-- Let a central version pin transitive dependencies too -->
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup>
<!-- ONE version per package, for the WHOLE solution -->
<PackageVersion Include="Serilog" Version="3.1.1" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Dapper" Version="2.1.35" />
</ItemGroup>
</Project>
Each .csproj keeps the reference, drops the version:
<!-- Before -->
<PackageReference Include="Serilog" Version="2.10.0" />
<!-- After (version now comes from Directory.Packages.props) -->
<PackageReference Include="Serilog" />
Before writing Directory.Packages.props, inventory every version of every package across all projects, then pick one per package:
Package Versions found in solution -> Chosen
Newtonsoft.Json 12.0.3, 13.0.1, 13.0.3 -> 13.0.3
Serilog 2.10.0, 3.1.1 -> 3.1.1
System.Text.Json 4.7.2, 6.0.0, 8.0.4 -> 8.0.4 (verify - major jumps)
System.* / Microsoft.Extensions.* packages: keep them aligned with each other and with the target framework.With CentralPackageTransitivePinningEnabled=true, you can pin a transitive dependency's version once, centrally, and it applies everywhere -- no fake direct references, no per-project edits. This is how you guarantee that every project (and every vendor extension project that builds in this solution) restores the same version of a shared transitive package.
For build/tooling packages that every project should carry identically, use:
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
(applies to all projects automatically; good for analyzers, SourceLink, banned-API analyzers).
When other companies build extension projects against the same solution, add a short NuGet.md at the repo root stating: "Versions are managed centrally in Directory.Packages.props. Do not put Version= on a PackageReference. To change a version, edit Directory.Packages.props and open a PR." Optionally enforce with an analyzer/CI check that fails on any PackageReference carrying a Version attribute.
Directory.Packages.props at repo root with ManagePackageVersionsCentrally=true.<PackageVersion> per package ID -- no duplicates.<PackageReference> has no Version attribute.packages.config remains anywhere (git grep -l packages.config).CentralPackageTransitivePinningEnabled=true if you need to pin transitives.dotnet restore / VS restore succeeds with no NU1605 downgrade and no version-conflict warnings.dotnet list <proj> package --include-transitive shows the versions you expect.## Inventory
<table: package -> versions found across projects -> chosen version, with any risky major jumps flagged>
## Stage 1 -- per project
<for each project: what to remove (transitives, packages.config, redirects), what to keep>
## Stage 2 -- Directory.Packages.props
<the full generated file, ready to drop at repo root>
## Project edits
<the exact PackageReference lines to change, per csproj>
## Verify on your side
- restore with no NU1605 / version-conflict warnings
- dotnet list package --include-transitive spot check
- vendor guardrail note
packages.config.PackageReference works in classic .csproj; keep the migration small and revertible.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/dotnet-ai-toolkit:legacy-package-migratorfrom TheCodeMan .NET AI ToolKit
npx claudepluginhub stefanthecode/dotnet-ai-toolkit --plugin dotnet-ai-toolkit49 skills in this plugin
/adonet-data-access-auditorAudit 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./async-await-auditorAudit C#/.NET code for async/await anti-patterns and concurrency bugs. Use this skill whenever the user shares async C# code or asks about deadlocks, async void, .Result/.Wait(), blocking calls, ConfigureAwait, sync-over-async, fire-and-forget tasks, CancellationToken usage, or "why does my async code hang/deadlock". Always use this skill for async correctness/performance reviews instead of answering from memory; it applies a fixed checklist and rewrites the code./authorization-policy-generatorDesign ASP.NET Core authorization — policy-based, role-based, and claims/requirement-based with custom authorization handlers and resource-based checks. Use this skill whenever the user wants authorization policies, role/claim checks, custom AuthorizationHandler, resource-based authorization, permission checks, or asks "how do I authorize this / policy vs role / restrict this endpoint to X". Always use this skill for authorization requests; it generates policies, handlers, and endpoint wiring./benchmarkdotnet-setupSet up BenchmarkDotNet for a .NET project and interpret the results — proper benchmark classes, memory diagnostics, baselines, and reading ns/op + allocations. Use this skill whenever the user wants to benchmark code, measure performance, compare two implementations, set up BenchmarkDotNet, or asks "which is faster / how do I benchmark this / interpret these benchmark results". Always use this skill for micro-benchmarking requests; it writes correct benchmarks and explains the numbers./caching-strategy-setupAdd the right caching to a .NET app — IMemoryCache, distributed cache, or HybridCache (.NET 9+) — with correct keys, expiration, stampede protection, and invalidation. Use this skill whenever the user wants caching, to cache a query/response, IMemoryCache, Redis/distributed cache, HybridCache, output caching, or asks "how do I cache this / add caching / avoid cache stampede". Always use this skill for caching requests; it picks the right layer and wires expiration + invalidation correctly./cicd-pipeline-generatorGenerate a CI/CD pipeline for a .NET app — GitHub Actions or Azure DevOps — with restore, build, test, coverage, vulnerability scan, container build, and deploy stages. Use this skill whenever the user wants a CI/CD pipeline, GitHub Actions workflow, Azure DevOps YAML, build/test automation, a release pipeline, or asks "how do I set up CI / pipeline for .NET / automate build and deploy". Always use this skill for CI/CD requests; it generates a complete, sensible pipeline.Other plugins' skills for the same job