csharp-cpm-migration

csharp-cpm-migration is a skill for Claude Code, Codex from lewing/helix.mcp. It costs 0 tokens per session (1,087 once invoked), scanned A, original, MIT.

A migration procedure for .NET solutions with multiple project files. It moves package version declarations into one Directory.Packages.props file, a shared MSBuild file used for central package management.

In plain words
What is it for?
Inventorying package references, resolving version differences, creating central package management, and updating projects to use shared package versions.
Why use it?
Package versions spread across many project files are harder to update and can drift apart. Centralizing them makes future version changes easier to review and maintain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lewing/helix.mcp/csharp-cpm-migration
Any agent
npx skills add lewing/helix.mcp --skill csharp-cpm-migration
Clone the repo
git clone --depth 1 https://github.com/lewing/helix.mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for csharp-cpm-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/lewing/helix.mcp/csharp-cpm-migration.svg)](https://agentmods.dev/skills/lewing/helix.mcp/csharp-cpm-migration)
Your own site
<a href="https://agentmods.dev/skills/lewing/helix.mcp/csharp-cpm-migration"><img src="https://agentmods.dev/badge/skills/lewing/helix.mcp/csharp-cpm-migration.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,087 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01087
Opus 5 $0.00000 $0.00544
Sonnet 5 $0.00000 $0.00217
Haiku 4.5 $0.00000 $0.00109

Measured 5d ago against content hash 2bd8243d77e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

csharp-cpm-migration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.copilot/skills/csharp-cpm-migration/SKILL.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: C# Central Package Management Migration

When to use: Migrating a multi-project .NET solution from per-csproj <PackageReference Version="..."> to a single Directory.Packages.props so future package bumps are one-line edits.

Steps

  1. Inventory. From repo root: find . -name "*.csproj" -not -path "*/bin/*" -not -path "*/obj/*" then cat each one. Build a table of every distinct (PackageId, Version) pair and which projects use it.

  2. Resolve drift. For any package referenced at multiple versions, pick the higher one (or the version actually being tested in CI). Surface these explicitly in the commit message — CPM consolidation is the moment to fix drift, not hide it.

  3. Create Directory.Packages.props at the repo root (sibling of the .sln/.slnx):

    <Project>
      <PropertyGroup>
        <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
        <!-- Add only if any project pins a floating version like 17.* or 10.*-* -->
        <CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled>
      </PropertyGroup>
      <ItemGroup>
        <PackageVersion Include="PackageId" Version="x.y.z" />
        <!-- ... one entry per distinct package ... -->
      </ItemGroup>
    </Project>
    

    MSBuild auto-imports any Directory.Packages.props from each project up to the root — no <Import> needed.

  4. Strip Version= from every PackageReference in every csproj. Keep Include= and any sibling attributes (PrivateAssets, OutputItemType, IncludeAssets, etc.). Example:

    • Before: <PackageReference Include="xunit" Version="2.*" />
    • After: <PackageReference Include="xunit" />
  5. Include analyzer/source-generator projects too. netstandard2.0 source generator csprojs (e.g. with Microsoft.CodeAnalysis.CSharp) participate in CPM the same way. Don't skip them.

  6. Restore. dotnet restore. Common failures and fixes:

    • NU1011 — "PackageVersion items cannot specify a floating version." → Add <CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled> to Directory.Packages.props. Alternative: pin to a concrete version, but that loses the original intent.
    • NU1008 — "Projects that use central package version management should not define the version on the PackageReference items." → A Version= attribute slipped through. Re-grep PackageReference.*Version= across all csprojs.
    • NU1507 — "There are N package sources defined… please map your package sources." → Pre-existing multi-source NuGet.config config that CPM now warns about. Out of scope for the migration commit; flag as follow-up. Fix later by adding <packageSourceMapping> to NuGet.config.

Read the full file on GitHub · 59 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 59 lines · 0 tokens per session scan A 2bd8243d77e3

Subscribe to this mod's changes

csharp-cpm-migration is a skill published in the GitHub repository lewing/helix.mcp (4 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,087 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

dpg-migration

Migration logic for Azure SDK for .NET data-plane libraries migrating from AutoRest/Swagger to TypeSpec-based generation. Uses MCP tools from the generator-agent server for automated deterministic fixes.

Azure/azure-sdk-for-net · 41 tokens

mitigate-breaking-changes

Patterns and techniques for mitigating breaking changes in Azure management-plane SDKs. Covers SDK-side customizations (partial classes, CodeGenType, CodeGenSuppress) and TypeSpec decorator customizations (clientName, access, markAsPageable, alternateType, hierarchyBuilding).

Azure/azure-sdk-for-net · 60 tokens

author-test

Generate a test given sample. Parameters: C# SDK repository root; Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; the sample to use as a starting point for the test.

Azure/azure-sdk-for-net · 68 tokens

nunit-code-style

Use when writing or modifying C# method bodies, type declarations, or non-trivial logic in NUnit source. Covers NUnit's taste-and-judgment conventions — exception construction, simplification, naming intent, StringComparison, non-null check form, and var usage — that aren't already caught at build time.

nunit/nunit · 69 tokens

nunit-api-design

Use when adding or modifying public API surface in NUnit — new or changed constraints, attributes, assertions, helpers, or any type/member visibility change. Covers the conventions NUnit maintainers enforce for types that ship to consumers of the framework.

nunit/nunit · 51 tokens

mcp

Build or consume Model Context Protocol (MCP) servers and clients in .NET using the official MCP C# SDK, including stdio, Streamable HTTP, tools, prompts, resources, and capability negotiation. USE FOR: .NET MCP servers or clients; stdio versus HTTP transport choices; tools, resources, prompts, completions, and…

managedcode/dotnet-skills · 123 tokens