Skip to main content
skill GitHub Copilot official · GitHub

nuget-manager — GitHub Copilot skill: what it does, install

Manages NuGet packages in .NET projects through the dotnet CLI. Use it when adding, removing, or updating package dependencies.

Install into GitHub Copilot · Skills CLI (Vercel) All methods and platforms ↓
npx skills add github/awesome-copilot --skill nuget-manager
Open on GitHub

What nuget-manager does

This skill sets rules for NuGet package work in .NET projects and solutions. It uses dotnet add package to add dependencies and dotnet remove package to remove them, rather than editing .csproj, .props, or Directory.Packages.props for those tasks.

An existing package version can be changed directly in a file. Before that, the skill checks that the target version exists with dotnet package search, finds whether versions live in Directory.Packages.props or an individual .csproj, then runs dotnet restore. If restore fails, the change should be reverted and investigated.

It requires the .NET SDK, dotnet on PATH, plus jq or PowerShell for version checks. Install it if you want the agent to follow a fixed package-update procedure.

What it helps with

  • add a NuGet package to a selected .csproj
  • remove a dependency with dotnet remove package
  • check whether a package version exists
  • update a centrally managed package version
  • run dotnet restore after a version change

Example prompts for the agent

  • Add Serilog to `src/WebApi/WebApi.csproj`.
  • Update Newtonsoft.Json to 13.0.3 across the solution.
  • Remove Newtonsoft.Json from `src/MyProject/MyProject.csproj`.

How to install nuget-manager

1Skills CLI (Vercel)

npx skills add github/awesome-copilot --skill nuget-manager

2GitHub CLI

gh skill install github/awesome-copilot nuget-manager

3Manually: put the files in place

.github/skills/nuget-manager/SKILL.md

From the same set554

The whole set →
git-commit official github This skill reviews Git changes, stages related files, and creates Conventional Commits. Use it when you want an agent to make one commit or split work into separate commits. GitHub Copilot 47,165installs excalidraw-diagram-generator official github Turn a plain-language description into an Excalidraw diagram. Useful for mapping processes, system structure, and relationships between entities. GitHub Copilot 31,639installs multi-stage-dockerfile official github This skill guides GitHub Copilot in writing multi-stage Dockerfiles for different languages and frameworks. Use it when the final runtime image should contain fewer build dependencies. GitHub Copilot 29,688installs documentation-writer official github Skill that turns the agent into a technical writer following the Diátaxis framework: tutorials, how-to guides, reference, and explanation. Proposes structure before writing. GitHub Copilot 27,757installs prd official github Turns a feature idea into a structured PRD with user stories, technical requirements, and risks. Use it when planning a software feature or an AI-powered one. GitHub Copilot 24,035installs refactor official github This skill reshapes existing code without changing its external behavior. Use it for gradual cleanup of large functions, duplication, weak types, and code smells. GitHub Copilot 22,321installs java-springboot official github Gives GitHub Copilot Spring Boot development practices, from project layout to tests and security. Use it when writing or reviewing Java application code. GitHub Copilot 21,272installs create-readme official github This skill reviews a project and creates a structured README.md. Use it when the repository needs clear documentation based on its actual files and code. GitHub Copilot 19,081installs

Similar

dart-flutter-patterns affaan-m Copy-paste Dart and Flutter patterns: null safety, state, navigation, networking. Useful when you write or review Flutter code. Claude Code CX Codex Cursor +1 4,600installs swiftui-patterns affaan-m Guides AI agents on modern SwiftUI architecture: @Observable state, type-safe navigation, and view performance. Useful when building or reviewing iOS and macOS UI. Claude Code CX Codex Cursor +1 4,500installs dotnet-patterns affaan-m C# and ASP.NET Core architectural conventions for AI coding agents. Enforces patterns for dependency injection, immutability, async/await, and error handling. Claude Code CX Codex Cursor +1 4,500installs repo-scan affaan-m Scans a repository and sorts every file into project code, embedded third-party code, or build artifact. Useful when you inherit a codebase you did not write. Claude Code CX Codex Cursor +1 4,400installs kotlin-ktor-patterns affaan-m Provides reference architecture for Kotlin Ktor servers: routing DSL, Koin DI, JWT auth, kotlinx.serialization, and testApplication tests. Claude Code CX Codex Cursor +1 4,400installs csharp-testing affaan-m A skill that gives your agent C# and .NET testing patterns: xUnit, FluentAssertions, mocks, integration tests. Claude Code CX Codex Cursor +1 4,400installs migrate-to-shoehorn Matt Pocock Replaces as type assertions in tests with helpers from @total-typescript/shoehorn. Use it when tests need partial objects or deliberately invalid data. Claude Code 475,388installs write-swift emilkowalski This skill guides Swift coding, reviews, and migrations using the language’s current practices. Use it to investigate concurrency errors, hangs, data races, or retain cycles. Claude Code CX Codex Cursor +1 117,500installs

Questions about nuget-manager

How do I install nuget-manager in GitHub Copilot?

Run npx skills add github/awesome-copilot --skill nuget-manager. You can also use gh skill install github/awesome-copilot nuget-manager.

What does nuget-manager do?

It manages adding, removing, and updating NuGet packages in .NET projects. The skill uses the dotnet CLI and runs dotnet restore after version updates.

Can nuget-manager edit package files directly?

Only when changing the version of an existing package. Adding or removing packages must use dotnet add package or dotnet remove package.

Source text

SKILL.md · MIT
---
name: nuget-manager
description: '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.'
---

# NuGet Manager

## Overview

This skill ensures consistent and safe management of NuGet packages across .NET projects. It prioritizes using the `dotnet` CLI to maintain project integrity and enforces a strict verification and restoration workflow for version updates.

## Prerequisites

- .NET SDK installed (typically .NET 8.0 SDK or later, or a version compatible with the target solution).
- `dotnet` CLI available on your `PATH`.
- `jq` (JSON processor) OR PowerShell (for version verification using `dotnet package search`).

## Core Rules

1.  **NEVER** directly edit `.csproj`, `.props`, or `Directory.Packages.props` files to **add** or **remove** packages. Always use `dotnet add package` and `dotnet remove package` commands.
2.  **DIRECT EDITING** is ONLY permitted for **changing versions** of existing packages.
3.  **VERSION UPDATES** must follow the mandatory workflow:
    - Verify the target version exists on NuGet.
    - Determine if versions are managed per-project (`.csproj`) or centrally (`Directory.Packages.props`).
    - Update the version string in the appropriate file.
    - Immediately run `dotnet restore` to verify compatibility.

## Workflows

### Adding a Package
Use `dotnet add [<PROJECT>] package <PACKAGE_NAME> [--version <VERSION>]`.
Example: `dotnet add src/MyProject/MyProject.csproj package Newtonsoft.Json`

### Removing a Package
Use `dotnet remove [<PROJECT>] package <PACKAGE_NAME>`.
Example: `dotnet remove src/MyProject/MyProject.csproj package Newtonsoft.Json`

### Updating Package Versions
When updating a version, follow these steps:

1.  **Verify Version Existence**:
    Check if the version exists using the `dotnet package search` command with exact match and JSON formatting. 
    Using `jq`:
    `dotnet package search <PACKAGE_NAME> --exact-match --format json | jq -e '.searchResult[].packages[] | select(.version == "<VERSION>")'`
    Using PowerShell:
    `(dotnet package search <PACKAGE_NAME> --exact-match --format json | ConvertFrom-Json).searchResult.packages | Where-Object { $_.version -eq "<VERSION>" }`
    
2.  **Determine Version Management**:
    - Search for `Directory.Packages.props` in the solution root. If present, versions should be managed there via `<PackageVersion Include="Package.Name" Version="1.2.3" />`.
    - If absent, check individual `.csproj` files for `<PackageReference Include="Package.Name" Version="1.2.3" />`.

3.  **Apply Changes**:
    Modify the identified file with the new version string.

4.  **Verify Stability**:
    Run `dotnet restore` on the project or solution. If errors occur, revert the change and investigate.

## Examples

### User: "Add Serilog to the WebApi project"
**Action**: Execute `dotnet add src/WebApi/WebApi.csproj package Serilog`.

### User: "Update Newtonsoft.Json to 13.0.3 in the whole solution"
**Action**:
1. Verify 13.0.3 exists: `dotnet package search Newtonsoft.Json --exact-match --format json` (and parse output to confirm "13.0.3" is present).
2. Find where it's defined (e.g., `Directory.Packages.props`).
3. Edit the file to update the version.
4. Run `dotnet restore`.

© github · MIT · github/awesome-copilot

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor