update-nuget-packages
Skill3 starsChanged 36 days agoMITView on GitHub
tight NuGet: updates .NET dependencies with dotnet outdated, validates restore/build/tests, synchronizes submodules, and chooses between fixing an authorized incompatibility or rolling back. Use when a .NET solution needs package updates or tests break after a package update. Don''t use to migrate a test project to MTP without package updates (use update-mtp-tests), for code changes unrelated to dependencies, or for rollback without explicit confirmation.
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-ready-fixSkill
- ai-ready-scoreSkill
- architectural-analysisSkill
- commitSkill
- deep-reviewSkill
- domain-modelingSkill
- dotnet-efficient-validationSkill
- herdr-orchestrationSkill
- no-workaroundsSkill
- repository-cli-efficiencySkill
- sdd-create-prdSkill
- sdd-create-techspecSkill
- sdd-execute-correctionsSkill
- sdd-execute-taskSkill
- sdd-orchestrate-flowSkill
- sdd-orchestrate-prdsSkill
- sdd-orchestrate-tasksSkill
- sdd-plan-auditSkill
- sdd-plan-correctionsSkill
- sdd-plan-refactoringSkill
- sdd-plan-tasksSkill
- sdd-review-codeSkill
- sdd-snapshotSkill
- sdd-triageSkill
- writing-agents-mdSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 8 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Keep a tight NuGet update: one solution at a time, explicit restore, build without restore, and authorized incompatibilities.
- Distinctive: line 15
Keep one solution in focus until restore, build, and tests finish.
- Very specific: line 16
Treat migration from VSTest to MTP as update-mtp-tests work.
- Distinctive: line 27
Run git symbolic-ref --quiet --short HEAD in each repository before its respective git pull --ff-only.
- Very specific: line 36
Run rtk dotnet tool list --global and confirm the dotnet-outdated command.
- Very specific: line 37
If absent, run rtk dotnet tool install --global dotnet-outdated-tool and confirm again.
- Very specific: line 47
When xunit.runner.visualstudio crosses from 3.x to 4.x in a solution still on VSTest, record it as a possible MTP migration trigger in the …
- Very specific: line 48
Stop before the next solution when dotnet outdated fails, cannot resolve a dependency, or indicates a version incompatibility.
- Very specific: line 54
Run rtk dotnet restore <solution> --nologo --verbosity:minimal after any reference change.
- Very specific: line 63
When the solution's global.json (step 1.8) does not declare MTP, run rtk dotnet test <solution> --no-build --no-restore --nologo --logger …
- Very specific: line 64
When the solution's global.json already declares MTP, run rtk dotnet test --solution <solution> --no-build --no-restore --nologo …
- Distinctive: line 66
Consider validation complete only with success and a count greater than zero.
- Distinctive: line 67
If a test fails, repeat only that test or project with enough output to identify the cause.
- Distinctive: line 74
When an update causes a break, report package, project, error, and affected step.
- Distinctive: line 77
After any fix, rerun only affected restore, affected build, and affected tests.
- Very specific: line 83
Run rtk dotnet outdated <solution> --no-restore to confirm no updates remain.
- Very specific: line 85
When the update involves _lib, read references/commit-template.md in full and generate two commit messages without running git commit.
- Distinctive: line 93
Treat a restore, build, or test failure as a block until its cause and decision are recorded.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Update NuGet packages
Keep a tight NuGet update: one solution at a time, explicit restore, build without restore, and authorized incompatibilities.
Invariants
- Discover updates only with
dotnet outdated. - Keep one solution in focus until restore, build, and tests finish.
- Treat migration from VSTest to MTP as
update-mtp-testswork; a solution already on MTP is updated and tested normally by this skill, using MTP test syntax.
Steps
1. Plan
- Resolve the supplied solution as an absolute or relative path and accept
.slnand.slnx. - Without a supplied solution, list only
.slnand.slnxdirectly at the repository root. If there is one, select it; if there are several, request a choice; if there are none, request the path. - Detect
_libas a submodule or Git directory and locate its solution. Use_lib/CoLib.Library.slnwhen it exists; otherwise record the solution found. - Record the order:
_libsolution when applicable, then the main solution. - Inspect the working tree of planned repositories. Classify each pre-existing change by path and preserve it.
- Run
git symbolic-ref --quiet --short HEADin each repository before its respectivegit pull --ff-only. Stop on detached HEAD or any pull failure. - Record current package versions,
global.json, SDK, and workflows that run tests. - For each solution, locate the
global.jsonclosest to its directory and record whether it already contains MTPtest.runner. A configuration in_libgoverns execution started in_lib, but not execution started at the repository root.
Done when: every planned solution, processing order, branch, pre-existing change, and dependency baseline is recorded.
2. Prepare tools
- Load
dotnet-efficient-validationbefore anybuild,test,publish, orrun. - Run
rtk dotnet tool list --globaland confirm thedotnet-outdatedcommand. - If absent, run
rtk dotnet tool install --global dotnet-outdated-tooland confirm again. Stop when installation fails.
Done when: dotnet outdated is available and the .NET validation strategy is loaded.
3. Update one solution
- Process only the next solution in the recorded order.
- Run
rtk dotnet outdated -u <solution> --no-restore. - Record each changed package as
package: previous version => new version. - Classify major and prerelease updates, runner changes, and dependency warnings as compatibility risks.
- When
xunit.runner.visualstudiocrosses from 3.x to 4.x in a solution still on VSTest, record it as a possible MTP migration trigger in the final report; do not change coverage packages or callupdate-mtp-testsautomatically here. - Stop before the next solution when
dotnet outdatedfails, cannot resolve a dependency, or indicates a version incompatibility.
Done when: the current solution updated or confirmed all available packages, every version change and risk is recorded, and any possible MTP migration trigger is noted for the final report.
4. Restore and build
- Run
rtk dotnet restore <solution> --nologo --verbosity:minimalafter any reference change. - Run
rtk dotnet build <solution> --no-restore --nologo --verbosity:minimal. - Analyze errors and warnings. Remove a warning only when the fix is limited to update files, preserves API and behavior, and does not hide the diagnostic.
- On restore or build failure, repeat only the necessary step with normal output or
rtk proxy, preserve the first error, and stop the flow.
Done when: restore passed and the current solution build passed without errors, with every warning classified as resolved, existing, or blocking.
5. Validate tests
- When the solution's
global.json(step 1.8) does not declare MTP, runrtk dotnet test <solution> --no-build --no-restore --nologo --logger "console;verbosity=minimal". - When the solution's
global.jsonalready declares MTP, runrtk dotnet test --solution <solution> --no-build --no-restore --nologo --verbosity:minimal; do not use--logger, which is VSTest-only. - Migrating a solution from VSTest to MTP is not this skill's responsibility. When the user requests that migration, read
SKILLS/update-mtp-tests/SKILL.mdin full and follow its steps; return to this skill only after MTP validation finishes. - Consider validation complete only with success and a count greater than zero. Explain projects without tests.
- If a test fails, repeat only that test or project with enough output to identify the cause. After fixing an authorized incompatibility, repeat restore when references changed, then build and tests.
- Classify a failure that passes in isolation and on suite repetition as flakiness; record the test and result without changing behavior to silence the signal.
Done when: all executable tests for the solution passed (VSTest, direct MTP, or through update-mtp-tests when migration was requested), the total count was recorded, and every warning, flakiness, or project without tests has an explanation.
6. Fix authorized incompatibilities
- When an update causes a break, report package, project, error, and affected step.
- Request a choice between fixing the incompatibility and rolling back to a pinned version. Continue only with explicit authorization; rollback is never automatic.
- Apply the minimum compatible fix in files belonging to the update. For a break occurring only during an in-progress VSTest-to-MTP migration (global.json, coverage, xUnit v4 CS0619, workflow), handle it in
update-mtp-testsinstead of duplicating logic here. - After any fix, rerun only affected restore, affected build, and affected tests; then repeat the solution suite.
Done when: the incompatibility has an authorized minimum fix or explicitly documented rollback, and the affected solution passes again.
7. Finish
- Run
rtk dotnet outdated <solution> --no-restoreto confirm no updates remain. - Review
git diff --stat,git diff --check,git status --short --branch, and submodule status. Separate_libchanges from main repository changes. - When the update involves
_lib, readreferences/commit-template.mdin full and generate two commit messages without runninggit commit. - Report processed solutions, packages, files, builds, tests and counts, warnings, incompatibilities, possible MTP migration triggers noted in step 3, pending decisions, and commit messages.
Done when: the post-scan shows no outdated dependencies, every changed file is explained, and the summary distinguishes success, warnings, and unresolved items.
Safety rules
- Preserve unrelated changes and never use destructive rollback.
- Treat a restore, build, or test failure as a block until its cause and decision are recorded.
- Pin a package version only in an authorized rollback, never as a shortcut around an incompatibility.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

