Use the free built-in .NET SDK analyzers and analysis levels with gradual Roslyn warning promotion. USE FOR: the repo wants first-party .NET analyzers; CI should fail on analyzer warnings; the team needs AnalysisLevel or AnalysisMode guidance. DO NOT USE FOR: third-party analyzer selection by itself; formatting-only work. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
SkillScore64Maintained
Automatic
◆Coding pack
Last verified 8/19/2026
What it changes
Passed 10 of 15 test cases with the skill, and 6 of 15 without it.
Without skill41%
With skill64%
Checks it passed that the model alone missed
Sets TreatWarningsAsErrors to true immediately.
Sets WarningsNotAsErrors to CA1707 for explicit exceptions.
Sets TreatWarningsAsErrors to true in MSBuild configuration.
and 6 more in the full report
6 fixed8 passed either way7 still failing1 broke
Pass-rate lift
+23 pp
Tokens
+59%
Agent turns
0%
Response time
-42%
Model gemini-3.6-flashMeasured 8/19/2026v114 of 22 cases passed with skill · 15 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 5
Prompt
Our CI build fails because a legacy C# file generates CA1062 (validate arguments of public methods) in 40 public methods. The fix requires significant architectural changes across multiple public APIs. What interaction step must be taken next?
What was checked, without and with the skill
Checked
Without skill
With skill
Asks the user whether to defer fixing or temporarily suppress the specific warning ID when a fix is too large.
Missed
Passed
case-16 · gemini-3.6-flash · 8/19/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md185 lines4 files
.NET Code Analysis
Trigger On
the repo wants first-party .NET analyzers
CI should fail on analyzer warnings
the team needs AnalysisLevel or AnalysisMode guidance
the repo needs a gradual Roslyn warning promotion strategy
Do Not Use For
third-party analyzer selection by itself
formatting-only work
Inputs
the nearest AGENTS.md
project files or Directory.Build.props
current analyzer severity policy
Hard Rules for AI Agents
Non-negotiable. Violating these undermines the user's explicit intent.
Never disable or remove TreatWarningsAsErrors or WarningsAsErrors if the project has set them. Do not comment them out, set to false, wrap in a condition, or add <TreatWarningsAsErrors>false</TreatWarningsAsErrors> to make the build pass.
Never add <NoWarn> or #pragma warning disable for warnings the user chose to treat as errors, unless the user explicitly approves the suppression.
Never silently downgrade severity in .editorconfig (e.g. error to warning or none) to make a build succeed.
If warnings-as-errors breaks the build — fix the code. If the fix is too large, ask the user whether to defer that warning ID.
If warning volume is too large to fix in one pass — report count and categories to the user and ask which to tackle first. Do not unilaterally disable the policy.
Workflow
flowchart TD
A[Start] --> B{New or legacy project?}
B -->|New| C[TreatWarningsAsErrors=true immediately]
B -->|Legacy| D[dotnet build, count warnings by ID]
D --> E{"< 30 warnings?"}
E -->|Yes| F[Fix all, then enable TreatWarningsAsErrors]
E -->|No| G[Report counts to user, ask which batch first]
MANDATORY ENTRY POINT for generating or writing tests. Invoke this skill before editing files whenever the user asks to generate tests, write/add unit tests, scaffold a test project or pytest/Vitest/Jest suite, create comprehensive tests, improve/achieve coverage, or test an app, API, service, repository, route, module, library, or package. Supports C#/.NET, Python, TypeScript/JavaScript, Go, Rust, Java, and Ruby. For sparse, gutted-looking, synthetic, or incomplete workspaces, test only the sou