agentleFS
CripacxCripacx/agentic-dotnet/skills/update-packages/SKILL.md

update-packages

Skill1 starsChanged 9 months agoMITView on GitHub

Update all outdated NuGet packages in the solution using dotnet-outdated. Handles tool installation, discovery, and safe update workflow with restore verification.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 13 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill to update all outdated NuGet packages across the entire solution using the dotnet-outdated tool.

    line 9
  2. Very specific:

    Create a dedicated branch, e.g.

    line 24
  3. Distinctive:

    Run all updates on this branch only.

    line 25
  4. Distinctive:

    Run once per machine (or verify it is already installed):

    line 28
  5. Distinctive:

    If already installed, update the tool itself to the latest version:

    line 32
  6. Distinctive:

    Only run this when the user has explicitly named the package and the target major version:

    line 63
  7. Distinctive:

    Only run this when the user has explicitly requested a full upgrade across all major versions:

    line 69
  8. Distinctive:

    After upgrades are applied, run a full restore to confirm no version conflicts:

    line 77
  9. Distinctive:

    After a successful restore, confirm the solution still builds:

    line 87
  10. Distinctive:

    Use a Conventional Commit message, e.g.:

    line 94
  11. Distinctive:

    If updating a single notable package, include it in the scope:

    line 98
  12. Distinctive:

    Never: update packages directly on main.

    line 104
  13. Very specific:

    Always: run dotnet restore and dotnet build after updates.

    line 105
  14. Distinctive:

    Major version upgrades are forbidden by default: Only apply them when the user has explicitly given the instruction, naming the package or …

    line 107
  15. Distinctive:

    When a major upgrade is explicitly requested, apply and validate one package at a time to isolate issues.

    line 108
  16. Distinctive:

    If a package update causes build or test failures, revert that package's version and document it in the PR description.

    line 109
  17. Very specific:

    All targeted packages updated in Directory.Packages.props.

    line 112

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

update-packages

Purpose

Use this skill to update all outdated NuGet packages across the entire solution using the dotnet-outdated tool. It ensures tools are installed, versions verified, and dotnet restore confirms compatibility after updates.

Prerequisites

  • .NET SDK installed and dotnet CLI available on PATH.
  • Internet access to reach NuGet feeds (including those listed in nuget.config).
  • Git working tree should be on a dedicated branch before running updates (never update directly on develop).

Keywords

nuget, packages, outdated, update, upgrade, bump, versions, dotnet-outdated

Workflow

0. Git Preparation (mandatory before any update)

  • Checkout develop and pull the latest state.
  • Create a dedicated branch, e.g. chore/update-packages-<date>.
  • Run all updates on this branch only.

1. Install / restore dotnet-outdated tool

Run once per machine (or verify it is already installed):

dotnet tool install --global dotnet-outdated-tool

If already installed, update the tool itself to the latest version:

dotnet tool update --global dotnet-outdated-tool

2. Inspect outdated packages (dry run)

Navigate to the solution root and list all outdated packages without applying changes:

dotnet outdated backend.slnx

Pinned packages – do not upgrade beyond the listed major version regardless of instructions:

PackageMax allowed version
MassTransit.*8.x.x

Review the output. Note packages that are:

  • patch updates – safe, apply unconditionally.
  • minor updates – generally safe, but review changelog for breaking changes.
  • major updates – require manual review; apply one-by-one and verify.

3. Apply updates

Default behavior: patch and minor updates only.
Major version upgrades must never be applied unless the user explicitly requests them.

Default – Update patch and minor versions (always safe to run)

dotnet outdated backend.slnx --upgrade --version-lock Major

Explicit instruction only – Update a specific package including a major bump

Only run this when the user has explicitly named the package and the target major version:

dotnet outdated backend.slnx --upgrade --include <PackageName>

Explicit instruction only – Update all packages including major versions

Only run this when the user has explicitly requested a full upgrade across all major versions:

dotnet outdated backend.slnx --upgrade

Important: This project uses Central Package Management (Directory.Packages.props). dotnet-outdated respects CPM and updates versions in that file. Verify that Directory.Packages.props was modified after the upgrade step.

4. Verify restore

After upgrades are applied, run a full restore to confirm no version conflicts:

dotnet restore backend.slnx

If restore fails:

  • Identify the conflicting package from the error output.
  • Revert that specific version entry in Directory.Packages.props to its previous value.
  • Re-run dotnet restore until clean.

5. Build verification

After a successful restore, confirm the solution still builds:

dotnet build backend.slnx --no-restore

Fix any compilation errors introduced by API changes in updated packages before proceeding.

6. Commit

Use a Conventional Commit message, e.g.:

chore(deps): update NuGet packages to latest versions

If updating a single notable package, include it in the scope:

chore(deps): update MassTransit to 8.x

Rules

  • Never update packages directly on main.
  • Always run dotnet restore and dotnet build after updates.
  • Do not manually edit Directory.Packages.props to bump versions during this workflow – let dotnet-outdated --upgrade handle it.
  • Major version upgrades are forbidden by default. Only apply them when the user has explicitly given the instruction, naming the package or confirming a full major upgrade.
  • When a major upgrade is explicitly requested, apply and validate one package at a time to isolate issues.
  • If a package update causes build or test failures, revert that package's version and document it in the PR description.

Done Criteria

  • All targeted packages updated in Directory.Packages.props.
  • dotnet restore completes without errors.
  • dotnet build completes without errors.
  • Changes committed on a feature branch with a compliant Conventional Commit message.
  • PR opened targeting develop with a summary of updated packages.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.