---
Manages .NET project dependencies using dotnet CLI commands. Use when you need to search NuGet packages, add/update/remove package references, investigate why packages are included, list dependencies, find outdated/vulnerable packages, or manage dotnet tools.
/plugin marketplace add NikiforovAll/claude-code-rules/plugin install handbook-dotnet@cc-handbookThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/security-audit.mdInvestigate and manage .NET project dependencies using built-in dotnet CLI commands.
Invoke when the user needs to:
| Command | Purpose |
|---|---|
dotnet package search <term> | Search NuGet for packages |
dotnet package search <name> --exact-match | List all versions of a package |
dotnet add package <id> | Add/update package to latest version |
dotnet add package <id> -v <ver> | Add/update package to specific version |
dotnet remove package <id> | Remove package reference |
dotnet nuget why <package> | Show dependency graph for a package |
dotnet list package | List NuGet packages |
dotnet list package --include-transitive | Include transitive dependencies |
dotnet list reference --project <project> | List project-to-project references |
dotnet list package --outdated | Find packages with newer versions |
dotnet list package --vulnerable | Find packages with security issues |
dotnet outdated | (Third-party) Check outdated packages |
dotnet outdated -u | (Third-party) Auto-update packages |
dotnet tool search <term> | Search for dotnet tools |
dotnet tool update <id> | Update local tool to latest |
dotnet tool update --all | Update all local tools |
Find packages and check latest versions directly from CLI:
# Search for packages by keyword
dotnet package search Serilog --take 5
# Find latest version of a specific package
dotnet package search Aspire.Hosting.AppHost --take 1
# Include prerelease versions
dotnet package search ModelContextProtocol --prerelease --take 3
# List ALL available versions of a package (version history)
dotnet package search Newtonsoft.Json --exact-match
# JSON output for scripting
dotnet package search Serilog --format json --take 3
# Add package (installs latest stable version)
dotnet add package Serilog
# Add specific version
dotnet add package Serilog -v 4.0.0
# Add prerelease version
dotnet add package ModelContextProtocol --prerelease
# Add to specific project
dotnet add src/MyProject/MyProject.csproj package Serilog
# Update existing package to latest (same command as add)
dotnet add package Serilog
# Remove package
dotnet remove package Serilog
Note: dotnet add package both adds new packages and updates existing ones to the specified (or latest) version.
# Search for tools
dotnet tool search dotnet-outdated --take 3
# Update a local tool (from manifest)
dotnet tool update cake.tool
# Update with prerelease
dotnet tool update aspire.cli --prerelease
# Update all local tools
dotnet tool update --all
# Update global tool
dotnet tool update -g dotnet-ef
To understand why a package is included in your project:
# Why is this package included?
dotnet nuget why Newtonsoft.Json
# For a specific project
dotnet nuget why path/to/Project.csproj Newtonsoft.Json
# For a specific framework
dotnet nuget why Newtonsoft.Json --framework net8.0
Output shows the complete dependency chain from your project to the package.
# Direct dependencies only
dotnet list package
# Include transitive (indirect) dependencies
dotnet list package --include-transitive
# For a specific project
dotnet list package --project path/to/Project.csproj
# JSON output for scripting
dotnet list package --format json
# List project-to-project references
dotnet list reference --project path/to/Project.csproj
No built-in command shows transitive project dependencies. To find if Project A depends on Project B transitively:
dotnet list reference on each referenced project<ProjectReference> elements recursively:# Find all ProjectReference elements
grep -r "ProjectReference" --include="*.csproj" .
If installed (dotnet tool install -g dotnet-outdated-tool):
# Check for outdated packages
dotnet outdated
# Auto-update to latest versions
dotnet outdated -u
# Update only specific packages
dotnet outdated -u -inc PackageName
# Check for outdated packages
dotnet list package --outdated
# Include prerelease versions
dotnet list package --outdated --include-prerelease
For security auditing (vulnerable, deprecated, outdated packages), load references/security-audit.md.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.