Agent skill

item-management

Patterns for managing MSBuild item groups: Include/Remove/Update semantics, item metadata, batching with %(Metadata), transforms, per-item filtering, and cross-product batching pitfalls. USE FOR: diagnosing and fixing item group anti-patterns in .csproj files, reviewing item management for correctness, fixing CS2002 duplicate file warnings from SDK globbing, fixing targets that run more times than expected due to cross-product batching, fixing Include vs Update misuse on SDK-globbed items, fixing FileWrites registration for generated file clean support, moving generated files to IntermediateOu

.NET Platform4,927★ · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add dotnet/skills --skill item-management --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 5 KB
Bundled scripts: none
Path: plugins/dotnet-msbuild/skills/item-management/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,927
Language: C#
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# MSBuild Item Management Patterns Canonical patterns for working with item groups, from `Microsoft.Common.CurrentVersion.targets`. ## Include / Remove / Update — Three Operations | Operation | Purpose | When to use | |---|---|---| | `Include` | Add new items to the group | Creating items with identity + metadata | | `Remove` | Remove items matching a pattern | Excluding files or clearing a group | | `Update` | Modify metadata on existing items | Adding/changing metadata without re-adding | ### Include — Add Items ```xml <ItemGroup> <Compile Include="Generated\*.cs"> <AutoGen>true</AutoGen> </Compile> </ItemGroup> ``` ### Remove — Subtract Items ```xml <ItemGroup> <!-- Remove specific items --> <Reference Remove="$(AdditionalExplicitAssemblyReferences)" /> <!-- Set subtraction: prior minus current --> <_CleanOrphanFileWrites Include="@(_CleanPriorFileWrites)" Exclude="@(_CleanCurrentFileWrites)" /> <!-- Clear an entire group --> <_Temporary Remove="@(_Temporary)" /> </ItemGroup> ``` ### Update — Modify Existing Items ```xml <ItemGroup> <EmbeddedResource Update="@(EmbeddedResource)" Condition="'%(NuGetPackageId)' == 'Microsoft.CodeAnalysis.Collections'"> <GenerateSource>true</Genera

What's inside
Steps it walks through
  1. Include / Remove / Update — Three Operations
  2. Include — Add Items
  3. Remove — Subtract Items
  4. Update — Modify Existing Items
  5. Item Batching — %(Metadata)
  6. Target-level batching (Outputs)
  7. Task-level batching
  8. Per-item filtering with Condition
  9. Batching rules
  10. Item Transforms — @(Item->'expression')
  11. Exclude Pattern — Set Subtraction on Include
  12. Conditional Item Inclusion
  13. PrivateAssets on Tool/Analyzer Packages
  14. Common Pitfalls
More from skills
All skills →
About this skill
What does the item-management skill do?

Patterns for managing MSBuild item groups: Include/Remove/Update semantics, item metadata, batching with %(Metadata), transforms, per-item filtering, and cross-product batching pitfalls. USE FOR: diagnosing and fixing item group anti-patterns in .csproj files, reviewing item management for correctness, fixing CS2002 duplicate file warnings from SDK globbing, fixing targets that run more times than expected due to cross-product batching, fixing Include vs Update misuse on SDK-globbed items, fixing FileWrites registration for generated file clean support, moving generated files to IntermediateOu

How do I install it?

Run `npx skills add dotnet/skills --skill item-management --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going