prune-depslisted
Install: claude install-skill e128/dotnet-reference
# Prune Dependencies
Find unused NuGet packages and stale references, then remove the confirmed-dead ones.
Three targets:
1. **Orphaned central packages** — `PackageVersion` in `Directory.Packages.props` that no project references and that isn't a deliberate transitive pin.
2. **Unused `PackageReference`** — a direct package reference whose namespaces/types the project's code never uses.
3. **Unused `ProjectReference`** — a project-to-project reference where the referencing project uses no public type from the referenced project.
**The hard part is avoiding false positives.** A package with zero `using` directives is not automatically unused — analyzers, source generators, runtime-only packages, and transitive pins all look "unused" to a naive scan. Read `references/false-positives.md` before flagging anything.
## Usage
```
/prune-deps # Full audit; remove approved findings; verify build
/prune-deps --report-only # Read-only — produce findings, never edit
/prune-deps --no-mcp # Skip roslyn MCP; grep-only usage analysis
/prune-deps --project Core # Scope code-usage analysis to one project
```
## Autonomy
Phase 1–3 are read-only (file reads, grep, `dotnet list`, MCP queries) — pre-approved
per the auto-approval policy; proceed without prompting. **Removals (Phase 5) require a
single `AskUserQuestion` approval gate** per the repo's "ask before fixing" convention.
`--report-only` skips Phases 4–5 entirely.
---
## Phase 1: Inventory
Gather t