{"id":"0cdca9f7-b386-4a4a-9908-ecca0c1f651e","shortId":"WPJmcp","kind":"skill","title":"Nuget Manager","tagline":"Awesome Copilot skill by Github","description":"# NuGet Manager\n\n## Overview\n\nThis 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.\n\n## Prerequisites\n\n- .NET SDK installed (typically .NET 8.0 SDK or later, or a version compatible with the target solution).\n- `dotnet` CLI available on your `PATH`.\n- `jq` (JSON processor) OR PowerShell (for version verification using `dotnet package search`).\n\n## Core Rules\n\n1.  **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.\n2.  **DIRECT EDITING** is ONLY permitted for **changing versions** of existing packages.\n3.  **VERSION UPDATES** must follow the mandatory workflow:\n    - Verify the target version exists on NuGet.\n    - Determine if versions are managed per-project (`.csproj`) or centrally (`Directory.Packages.props`).\n    - Update the version string in the appropriate file.\n    - Immediately run `dotnet restore` to verify compatibility.\n\n## Workflows\n\n### Adding a Package\nUse `dotnet add [<PROJECT>] package <PACKAGE_NAME> [--version <VERSION>]`.\nExample: `dotnet add src/MyProject/MyProject.csproj package Newtonsoft.Json`\n\n### Removing a Package\nUse `dotnet remove [<PROJECT>] package <PACKAGE_NAME>`.\nExample: `dotnet remove src/MyProject/MyProject.csproj package Newtonsoft.Json`\n\n### Updating Package Versions\nWhen updating a version, follow these steps:\n\n1.  **Verify Version Existence**:\n    Check if the version exists using the `dotnet package search` command with exact match and JSON formatting. \n    Using `jq`:\n    `dotnet package search <PACKAGE_NAME> --exact-match --format json | jq -e '.searchResult[].packages[] | select(.version == \"<VERSION>\")'`\n    Using PowerShell:\n    `(dotnet package search <PACKAGE_NAME> --exact-match --format json | ConvertFrom-Json).searchResult.packages | Where-Object { $_.version -eq \"<VERSION>\" }`\n    \n2.  **Determine Version Management**:\n    - 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\" />`.\n    - If absent, check individual `.csproj` files for `<PackageReference Include=\"Package.Name\" Version=\"1.2.3\" />`.\n\n3.  **Apply Changes**:\n    Modify the identified file with the new version string.\n\n4.  **Verify Stability**:\n    Run `dotnet restore` on the project or solution. If errors occur, revert the change and investigate.\n\n## Examples\n\n### User: \"Add Serilog to the WebApi project\"\n**Action**: Execute `dotnet add src/WebApi/WebApi.csproj package Serilog`.\n\n### User: \"Update Newtonsoft.Json to 13.0.3 in the whole solution\"\n**Action**:\n1. Verify 13.0.3 exists: `dotnet package search Newtonsoft.Json --exact-match --format json` (and parse output to confirm \"13.0.3\" is present).\n2. Find where it's defined (e.g., `Directory.Packages.props`).\n3. Edit the file to update the version.\n4. Run `dotnet restore`.","tags":["nuget","manager","awesome","copilot","github"],"capabilities":["skill","source-github","category-awesome-copilot"],"categories":["awesome-copilot"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/github/awesome-copilot/nuget-manager","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"install_from":"skills.sh"}},"qualityScore":"0.300","qualityRationale":"deterministic score 0.30 from registry signals: · indexed on skills.sh · published under github/awesome-copilot","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T17:40:17.155Z","embedding":null,"createdAt":"2026-04-18T20:25:21.528Z","updatedAt":"2026-04-22T17:40:17.155Z","lastSeenAt":"2026-04-22T17:40:17.155Z","tsv":"'1':83,199,337 '13.0.3':331,339,355 '2':107,255,358 '3':119,281,366 '4':293,374 '8.0':51 'absent':275 'across':21 'action':320,336 'ad':162 'add':93,100,167,172,314,323 'alway':97 'appli':282 'appropri':152 'avail':65 'awesom':3 'category-awesome-copilot' 'central':144 'chang':114,283,309 'check':203,276 'cli':29,64 'command':106,213 'compat':58,160 'confirm':354 'consist':14 'convertfrom':247 'convertfrom-json':246 'copilot':4 'core':81 'csproj':87,142,278 'defin':363 'determin':134,256 'direct':85,108 'directory.packages.props':90,145,261,365 'dotnet':28,63,78,99,103,156,166,171,180,184,210,222,238,297,322,341,376 'e':231 'e.g':364 'edit':86,109,367 'enforc':35 'ensur':13 'eq':254 'error':305 'exact':215,226,242,346 'exact-match':225,241,345 'exampl':170,183,312 'execut':321 'exist':117,131,202,207,340 'file':91,153,279,287,369 'find':359 'follow':123,196 'format':219,228,244,348 'github':7 'identifi':286 'immedi':154 'individu':277 'instal':48 'integr':33 'investig':311 'jq':69,221,230 'json':70,218,229,245,248,349 'later':54 'maintain':31 'manag':2,9,17,138,258,271 'mandatori':125 'match':216,227,243,347 'modifi':284 'must':122 'net':22,46,50 'never':84 'new':290 'newtonsoft.json':175,188,329,344 'nuget':1,8,19,133 'object':252 'occur':306 'output':352 'overview':10 'packag':20,79,96,101,105,118,164,168,174,178,182,187,190,211,223,233,239,325,342 'pars':351 'path':68 'per':140 'per-project':139 'permit':112 'powershel':73,237 'prerequisit':45 'present':267,357 'priorit':25 'processor':71 'project':23,32,141,301,319 'prop':88 'remov':95,104,176,181,185 'restor':40,157,298,377 'revert':307 'root':265 'rule':82 'run':155,296,375 'safe':16 'sdk':47,52 'search':80,212,224,240,259,343 'searchresult':232 'searchresult.packages':249 'select':234 'serilog':315,326 'skill':5,12 'solut':62,264,303,335 'source-github' 'src/myproject/myproject.csproj':173,186 'src/webapi/webapi.csproj':324 'stabil':295 'step':198 'strict':37 'string':149,292 'target':61,129 'typic':49 'updat':44,121,146,189,193,328,371 'use':26,77,98,165,179,208,220,236 'user':313,327 'verif':38,76 'verifi':127,159,200,294,338 'version':43,57,75,115,120,130,136,148,169,191,195,201,206,235,253,257,268,291,373 'via':273 'webapi':318 'where-object':250 'whole':334 'workflow':41,126,161","prices":[{"id":"29379f10-7807-4129-beae-8bd6efbf3040","listingId":"0cdca9f7-b386-4a4a-9908-ecca0c1f651e","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"github","category":"awesome-copilot","install_from":"skills.sh"},"createdAt":"2026-04-18T20:25:21.528Z"}],"sources":[{"listingId":"0cdca9f7-b386-4a4a-9908-ecca0c1f651e","source":"github","sourceId":"github/awesome-copilot/nuget-manager","sourceUrl":"https://github.com/github/awesome-copilot/tree/main/skills/nuget-manager","isPrimary":false,"firstSeenAt":"2026-04-18T21:50:22.544Z","lastSeenAt":"2026-04-22T12:52:18.718Z"},{"listingId":"0cdca9f7-b386-4a4a-9908-ecca0c1f651e","source":"skills_sh","sourceId":"github/awesome-copilot/nuget-manager","sourceUrl":"https://skills.sh/github/awesome-copilot/nuget-manager","isPrimary":true,"firstSeenAt":"2026-04-18T20:25:21.528Z","lastSeenAt":"2026-04-22T17:40:17.155Z"}],"details":{"listingId":"0cdca9f7-b386-4a4a-9908-ecca0c1f651e","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"github","slug":"nuget-manager","source":"skills_sh","category":"awesome-copilot","skills_sh_url":"https://skills.sh/github/awesome-copilot/nuget-manager"},"updatedAt":"2026-04-22T17:40:17.155Z"}}