nuget-dependency-analyzer
/nuget-dependency-analyzer
Analyze a .NET solution's NuGet dependencies — version conflicts, duplicate/inconsistent versions across projects, unused packages, and central package management opportunities. Use this skill whenever the user wants to analyze dependencies, fix version conflicts, consolidate package versions, set up Central Package Management, find unused packages, or asks "why do I have version conflicts / clean up my NuGet / consolidate versions". Always use this skill for dependency-hygiene requests; it maps the graph and recommends consolidation.
- Author
- stefanthecode ↗
- Repository
- dotnet-ai-toolkit ↗
- Licence
- MIT
- Last repository change
- 09.08.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 1
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 09.08.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- SKILL.md zawiera komentarze HTML (1). Nie widać ich w podglądzie Markdown, a model je czyta.
What it does and when to use it
Analyze a .NET solution's NuGet dependencies — version conflicts, duplicate/inconsistent versions across projects, unused packages, and central package management opportunities. Use this skill whenever the user wants to analyze dependencies, fix version conflicts, consolidate package versions, set up Central Package Management, find unused packages, or asks "why do I have version conflicts / clean up my NuGet / consolidate versions". Always use this skill for dependency-hygiene requests; it maps the graph and recommends consolidation.
Original author description
Analyze a .NET solution's NuGet dependencies — version conflicts, duplicate/inconsistent versions across projects, unused packages, and central package management opportunities. Use this skill whenever the user wants to analyze dependencies, fix version conflicts, consolidate package versions, set up Central Package Management, find unused packages, or asks "why do I have version conflicts / clean up my NuGet / consolidate versions". Always use this skill for dependency-hygiene requests; it maps the graph and recommends consolidation.
How it works
- Input — point it at your solution
- What it finds
- Central Package Management (CPM)
- Principles
- How to use it & best prompts
SKILL.md preview
---
name: nuget-dependency-analyzer
description: Analyze a .NET solution's NuGet dependencies — version conflicts, duplicate/inconsistent versions across projects, unused packages, and central package management opportunities. Use this skill whenever the user wants to analyze dependencies, fix version conflicts, consolidate package versions, set up Central Package Management, find unused packages, or asks "why do I have version conflicts / clean up my NuGet / consolidate versions". Always use this skill for dependency-hygiene requests; it maps the graph and recommends consolidation.
category: DevOps
version: 1.0.0
---
# NuGet Dependency Analyzer
Bring order to a multi-project solution's dependencies: spot version conflicts and drift, find unused/duplicate packages, and consolidate with Central Package Management.
## Input — point it at your solution
Works on a target: a **solution** or **GitHub URL**. Map versions across projects:
```
find <target> -name "*.csproj" | xargs grep -h "PackageReference" | sort | uniq -c | sort -rn
dotnet list <target> package # per-project versions
dotnet list <target> package --outdated
```
## What it finds
1. **Version drift** — the same package pinned to different versions across projects (a top source of runtime binding surprises). Consolidate to one.
2. **Transitive conflicts** — diamond dependencies resolved to a version no one intended.
3. **Unused packages** — referenced but not used (check namespaces actually imported).
4. **Inconsistent meta-packages** — mixing framework/package versions.
## Central Package Management (CPM)
Recommend and scaffold `Directory.Packages.props` so versions live in one place:
```xml
<!-- Directory.Packages.props (repo root) -->
<Project>
<PropertyGroup><ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally></PropertyGroup>
<ItemGroup>
<PackageVersion Include="Serilog.AspNetCore" Version="10.0.0" />
<PackageVersion Include="FluentValidation" Version="11.11.0" />
</ItemGroup>
</Project>
```
Then `.csproj` files use `<PackageReference Include="..." />` with no version — one source of truth.
## Principles
- **One version per package across the solution** — drift causes the worst, hardest-to-repro bugs.
- **CPM is the cure for version sprawl** in multi-project repos.
- Remove what you don't use — fewer packages, smaller attack surface and faster restores.
- Pair with the vuln scanner: consolidation makes patching one place, not ten.
## How to use it & best prompts
"Analyze my solution's NuGet dependencies", "fix version conflicts across projects", "set up Central Package Management", "find unused packages". Pairs with `dependency-vuln-scanner`.
Files in this package (2)
- SKILL.md 3 KB
- USAGE.md 1 KB
Versions
The database has no other skills named nuget-dependency-analyzer.
Database snapshot: 13.11.2026 · package version eb1cc12c7347 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Similar skills
- 100legacy-package-migrator
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… - 100convert-to-cpm
Convert .NET projects and solutions (.sln, .slnx) to NuGet Central Package Management (CPM) using Directory.Packages.props. USE FOR: converting to CPM, centralizing or aligning NuGet package versions across multiple projects, inlining MSBuild version properties from… - 100nuget-manager
Manage NuGet packages in .NET projects/solutions. Use this skill when adding, removing, or updating NuGet package versions. It enforces using `dotnet` CLI for package management and provides strict procedures for direct file edits only when updating versions. - 100dotnet-update-packages
Lists and updates outdated NuGet packages in .NET projects. Also use when the user mentions "update packages," "outdated NuGet," "upgrade dependencies," "dotnet package update," "check for updates," or "package versions." For centralizing package versions, see dotnet-centralise-packages. - 100nuget-manager
Manage NuGet packages in .NET projects/solutions. Use this skill when adding, removing, or updating NuGet package versions. It enforces using `dotnet` CLI for package management and provides strict procedures for direct file edits only when updating versions. - 100nuget-hygiene
Keep NuGet dependencies safe and tidy: list vulnerable, deprecated and outdated packages with the dotnet CLI, check licences, adopt Central Package Management, lock files for reproducible restores, trusted package sources, and an update routine that does not break builds. Use…