/nuget:nugetfrom nuget
Manages NuGet dependencies and packages in .NET repos. Use for Directory.Packages.props and Central Package Management, bumping or aligning package versions, NU1xxx restore warnings, nuget.config sources and source mapping, vulnerable-package audits, lock files, dotnet pack metadata, publishing to nuget.org with trusted publishing, or authoring, validating and packing `dotnet new` templates (template.json, a template missing from `dotnet new list`).
Ships in nuget. 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.
Change package versions and package configuration without changing anything else about the build, and prove it with a before/after restore.
Not for: MSBuild failures that aren't about packages (msbuild), C# code changes after an API break (csharp), vetting whether a new third-party package is trustworthy (dependency-vetting), CI workflow hardening beyond the publish job (gh-actions), packages.config to PackageReference migration (dotnet-upgrade-guide), using an existing dotnet new template to scaffold a project.
Decide before running builds or editing files.
packages.config: stop. CPM, source mapping per PackageReference, lock files and NuGetAudit warnings all need PackageReference; recommend migrating first and change nothing.Directory.Build.props property, or Directory.Packages.props if CPM is on), then restore and build every affected target. Don't introduce CPM as a side effect; recommend it afterwards if versions drift across projects.nuget.config, packageSourceMapping, NuGetAudit*, NU1900-NU1904, packages.lock.json: references/sources-and-audit.md.dotnet pack metadata, tool/MCP-server packages, pushing to nuget.org from GitHub Actions: references/trusted-publishing.md.dotnet new templates. Turning a project into a template, template.json symbols, conditions, post-actions and constraints, a template pack (PackageType Template), validating a template.json before publishing, a template that installs but is missing from dotnet new list: references/templates.md, which links references/template-json.md and references/template-validation-rules.md. Template work skips the packages.config guard and the resolved-package comparison below; prove it by instantiating and building the template instead.Ask once if the scope (which projects or solution) is unclear. If the user gave a conflict strategy ("use the highest version"), apply it without asking again.
grep -rn --include='*.csproj' --include='*.props' --include='*.targets' -E 'PackageReference|PackageVersion|GlobalPackageReference|VersionOverride' . and any $(XxxVersion) properties those reference. Check ancestors for Directory.Packages.props (only the nearest one applies to a project).nuget.config files from the repo root upward, and global.json. Run every dotnet command from the directory whose global.json applies to that solution.dotnet package list --project <sln|proj> --include-transitive --format json. SDK 7.0.200 to 9.x: dotnet list <sln|proj> package --include-transitive --format json. Add --outdated, --vulnerable or --deprecated only when that question is asked.resolve-library-id, then query-docs) for the target version.PackageReference (PrivateAssets, IncludeAssets, ExcludeAssets, GeneratePathProperty, Aliases, TFM conditions).Microsoft.Extensions.*, Microsoft.AspNetCore.*, Microsoft.EntityFrameworkCore.* of one release train, xunit.*, OpenTelemetry.*. A mismatch shows up as NU1605 (downgrade) or NU1608 (outside a dependency's range).PrivateAssets="all" so they don't flow to consumers.dotnet restore <target> then dotnet build <target> --no-restore for every affected solution or project. New NU1xxx warnings count as failures to explain.dotnet test <proj> --no-build), or give the exact command if they need infrastructure.Don't install or switch SDKs, edit global.json roll-forward, clear the global packages folder (dotnet nuget locals all --clear) or change machine-level NuGet config as a fix; report the blocker instead.
| Code | Meaning | Fix |
|---|---|---|
| NU1008 | CPM on, but a PackageReference still has Version | Remove it, or use VersionOverride deliberately |
| NU1010 | CPM on, PackageReference has no PackageVersion | Add the PackageVersion |
| NU1101 / NU1102 | Package or version not found on any source | Check source mapping and feed auth before the ID |
| NU1507 | Several sources, no packageSourceMapping | Add mapping (sources-and-audit) |
| NU1603 | Requested version absent, a higher one resolved | Pin an existing version |
| NU1901-NU1904 | Known vulnerability (low to critical) | Upgrade the package or the transitive one; suppress only with a recorded reason |
dotnet add package (or dotnet package add) in a CPM repo, check the diff: the PackageVersion belongs in Directory.Packages.props, not a Version on the reference.Directory.Packages.props in a subfolder replaces the parent one for projects under it; it does not merge unless it imports the parent.1.*) make restores non-reproducible; with a lock file they need --force-evaluate to move.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin nuget