msbuild

msbuild is a skill for Claude Code from dotnet/skills. It costs 219 tokens per session (3,339 once invoked), scanned A, original, MIT.

A guide for investigating MSBuild failures, build speed, and existing MSBuild project files. MSBuild is Microsoft's system for running build steps for many .NET and Visual Studio projects.

In plain words
What is it for?
Use it to inspect an MSBuild error, analyze a binary build log, measure a slow build, or review existing XML build rules and extension contracts.
Why use it?
It keeps failure diagnosis, performance measurement, and build-file review within their proper scope. It also helps interpret build logs and preserve the original build conditions so findings are not misleading.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the dotnet plugin — 5 skills shipped together

Good fit Use it to inspect an MSBuild error, analyze a binary build log, measure a slow build, or review existing XML build rules and extension contracts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dotnet/skills/msbuild
About the project

.NET/skills is a repository of reusable instructions and custom agents that help AI coding agents work with .NET and C#. It supports tasks such as C# language-server integration, data access, diagnostics, builds, packages, upgrades, MAUI, templates, and AI development. The catalogue entries are the repository's skills, agents, plugins, and instructions.

dotnet/skills · 6,409 stars · on GitHub

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.

Any agent
npx skills add dotnet/skills --skill msbuild
Clone the repo
git clone --depth 1 https://github.com/dotnet/skills

Made for: Claude Code.

Or install dotnet, the plugin that ships this one along with the rest of its 5 skills.

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 msbuild

README.md
[![agentmods](https://agentmods.dev/badge/skills/dotnet/skills/msbuild/github.svg)](https://agentmods.dev/skills/dotnet/skills/msbuild)
Your own site
<a href="https://agentmods.dev/skills/dotnet/skills/msbuild"><img src="https://agentmods.dev/badge/skills/dotnet/skills/msbuild/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for msbuild

Your own site · 80×15
<a href="https://agentmods.dev/skills/dotnet/skills/msbuild"><img src="https://agentmods.dev/badge/skills/dotnet/skills/msbuild.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 219 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,339 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 7 Nov 2026
  • Snyk pass 7 Nov 2026
How audits are shown
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.00219 $0.03339
Opus 5.5 $0.00088 $0.01336
Sonnet 5.5 $0.00044 $0.00668
Haiku 4.5 $0.00022 $0.00334

Measured 23d ago against content hash 21a2d7feed0e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

msbuild 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 23d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • msbuild — 100% identical, 0 lines differ
plugins/dotnet/skills/msbuild/SKILL.md · 200 lines

How it starts

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

MSBuild troubleshooting

For advice or static review, answer from the supplied XML, package facts, or measurements when they settle the question: no reference reads, checkout discovery, commands, or invented verification. For requested work, start at the supplied project or artifact; discover only what the next decision needs. Read a reference only for a specific unresolved question. References are not invocable skills.

Start with the task and evidence

Before editing, follow repository instructions and inspect the project/imports. Preserve the original command, working directory, SDK, configuration, target framework, runtime identifier, global properties, and target. Ask only for consequential information that cannot be discovered.

An existing .binlog can be the only available artifact. Analyze it before requesting a new build; paths inside it do not prove a checkout exists locally.

For a mixed request, fix correctness before measuring successful builds, and keep authoring review separate from a performance experiment. A failing test assertion after a successful build is not an MSBuild failure.

Capture only: choose an unused artifact path under the supplied workspace, unless the user specified another artifact directory. Do not put the only deliverable in a shared/global temporary directory where workspace artifact collection will miss it, or stage/commit the log. Append the binary logger to the exact supplied command, run it once, and save its original exit code before checking the new log is nonempty. Report the artifact path and original exit code, then stop: no replay, diagnosis, or repair. Read capture details only for an unresolved wrapper, logger-option, toolset, or privacy question.

1. Troubleshoot build issues

Goal: identify the independent root causes and make the smallest repair, not a broad cleanup.

Situation Reference if needed Action
A build failed and a binary log exists binlog-failure-analysis Replay the log with MSBuild; connect errors to the responsible project instance, target, and task. Separate root causes from cascading failures.
The failure needs evidence and no matching log exists binlog-generation, then failure analysis Capture the original invocation once and verify the artifact. Analyze it only when requested.
A project/build file has incorrect conditions, items, properties, or output paths msbuild-antipatterns Select the relevant catalog entries and check their exceptions before changing anything.
Imports or build hooks are missing, overwritten, or run in the wrong order extension-points Inspect the import contract, discovery order, and packed NuGet layout rather than hiding a required failure.
Outputs are stale or required work is skipped incremental-build Track input-set membership as well as file timestamps; apply the repair contract below.

Read the full file on GitHub · 200 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. 23d ago Changed · +94 lines · +40 tokens per session 21a2d7feed0e
  2. 1mo ago First seen · 106 lines · 179 tokens per session scan A 671a9b2c77be

Subscribe to this mod's changes

msbuild is a skill published in the GitHub repository dotnet/skills (6,409 stars, last pushed today), licensed MIT. It adds 219 tokens to every session and 3,339 once invoked, about $0.0009 per session on Opus 5.5. 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-10-02.

Related

msbuild compared with skills from other repositories

msbuild next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
msbuilddotnet/skillsSkill6.4ktodayMITA219Claude Code
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7k4d agoMITA71Claude Code, Codex
observability-audit-sessionsIBM/mcp-context-forgeSkill4.9k2d agoApache-2.0A64Claude Code, Codex
cwv-optimizeradobe/skillsSkill339todayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2ktodayApache-2.0A15Claude Code, Codex
triaging-web-analytics-supportPostHog/posthogSkill41ktodaynoneA151Claude Code, Codex