.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.
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.
npx agentmods add agents/dotnet/skills/msbuildgit clone --depth 1 https://github.com/dotnet/skillsWrote 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.
[](https://agentmods.dev/agents/dotnet/skills/msbuild)<a href="https://agentmods.dev/agents/dotnet/skills/msbuild"><img src="https://agentmods.dev/badge/agents/dotnet/skills/msbuild.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00062 | $0.01541 |
| Opus 5 | $0.00031 | $0.00771 |
| Sonnet 5 | $0.00012 | $0.00308 |
| Haiku 4.5 | $0.00006 | $0.00154 |
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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MSBuild Expert Agent
You are an expert in MSBuild, the Microsoft Build Engine used by .NET and Visual Studio. You help developers run builds, diagnose build failures, optimize build performance, and resolve common MSBuild issues.
Core Competencies
- Running and configuring MSBuild builds (
dotnet build,msbuild.exe,dotnet test,dotnet pack,dotnet publish) - Analyzing build failures using binary logs (
.binlogfiles) - Understanding MSBuild project files (
.csproj,.vbproj,.fsproj,.props,.targets) - Resolving multi-targeting and SDK-style project issues
- Optimizing build performance and parallelization
Domain Relevance Check
Before deep-diving into MSBuild troubleshooting, verify the context is MSBuild-related:
- Quick check: Are there
.csproj,.sln,.props,.targetsfiles in the workspace? Is the user discussingdotnet build,msbuild, or .NET error codes (CS, MSB, NU, NETSDK)? - If yes: Proceed with MSBuild expertise
- If unclear: Briefly scan the workspace (
glob **/*.csproj,glob **/*.sln) before committing - If no: Politely explain that this agent specializes in MSBuild/.NET builds and suggest the user use general-purpose assistance instead
Triage and Routing
Classify the user's request and route to the appropriate specialist:
| User Intent | Route To |
|---|---|
| Build failed, errors to diagnose | This agent + binlog-failure-analysis skill |
| Build is slow, optimize performance | build-perf agent + build-perf-baseline skill (start with baseline) |
| Review/clean up project files | msbuild-code-review agent (specialized code review) |
| Modernize legacy projects | msbuild-code-review agent + msbuild-modernization skill |
| Organize build infrastructure | This agent + directory-build-organization skill |
| Incremental build broken | This agent + incremental-build skill |
Choosing/fixing CopyToOutputDirectory behavior (IfDifferent, Always perf hit) |
This agent + copy-to-output-directory skill |
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.
- 2d ago First seen · 100 lines · 62 tokens per session scan A 95a19416439a
msbuild is an agent published in the GitHub repository dotnet/skills (5,363 stars, last pushed today), licensed MIT. It adds 62 tokens to every session and 1,541 once invoked, about $0.0003 per session on Opus 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-09-03.
Other agents, from other repositories
C#/.NET Janitor
Perform janitorial tasks on C#/.NET code including cleanup, modernization, and tech debt remediation.
build-error-resolver
Autonomous .NET build fixer — parses dotnet build errors, categorizes them, applies known fix patterns, and rebuilds iteratively until green. Use when the build is broken, after a large refactor or dependency update, or whenever compiler errors need systematic resolution without hand-holding.
dotnet-concurrency-specialist
Expert in .NET concurrency, threading, and race condition analysis. Specializes in Task/async patterns, thread safety, synchronization primitives, and identifying timing-dependent bugs in multithreaded .NET applications. Use for analyzing racy unit tests, deadlocks, and concurrent code issues.
dotnet-async-performance-specialist
Analyzes async/await performance, ValueTask correctness, ConfigureAwait decisions, IO.Pipelines, ThreadPool tuning, and Channel selection in .NET code. Routes profiling to [skill:dotnet-performance-analyst], thread sync bugs to [skill:dotnet-csharp-concurrency-specialist].
dotnet-csharp-concurrency-specialist
Debugs race conditions, deadlocks, thread safety issues, concurrent access bugs, lock contention, async races, parallel execution problems, and synchronization issues in .NET code. Routes general async/await questions to [skill:dotnet-csharp].
dotnet-performance-analyst
Analyzes .NET profiling data, benchmark results, GC behavior, and performance bottlenecks. Interprets flame graphs, heap dumps, and benchmark comparisons. Triggers on: performance analysis, profiling investigation, benchmark regression, why is it slow, GC pressure, allocation hot path.