- Home
- Skills
- Code Quality & Review
- .NET Roslyn Analyzer Rollout
Works with the AI Agents you already use
.NET Roslyn Analyzer Rollout
**Survey, read-only.** Finds the solution and project files and reads `Directory.Build.props`, `global.json` and every `.editorconfig`.
Free
.NET Roslyn Analyzer Rollout
Example session with this skill installed
Roll out Roslyn analyzers on RollHub.sln with the dotnet-roslyn-analyzer-rollout skill. Use Recommended mode. I approve writing Directory.Build.props and .editorconfig, the two builds with --no-incremental, and the fix-now edits. Do not suppress any security rule.
- Read your context and instructions
- Compiled the net roslyn analyzer
Analyzer rollout: RollHub.sln
Analyzer pass: dotnet build RollHub.sln --no-incremental -nologo -v q, with AnalysisMode=Recommended set in Directory.Build.props, and dotnet_diagnostic.<ID>.severity = warning for the 24 cited IDs in .editorconfig.
SDK: 10.0.402
Projects: 2 (2 run analyzers; 0 under "Not checked")
Summary
| Measure | Before | After |
|---|---|---|
| Unique warnings, cited IDs | 25 | 20 |
| Unique warnings, other IDs | 19 | 19 |
| Fix now (open) | 4 | 0 |
| Suppressed | 0 | 1 |
| Backlog | 39 | 39 |
Fix now
src/RollHub.Core/OrderService.cs:10, CA1849:File.ReadAllTextinside an async method that already takes a token, changed toawait File.ReadAllTextAsync(path, ct). Build line after: none.src/RollHub.Core/OrderService.cs:73, CA2200:throw ex;changed tothrow;. Build line after: none.src/RollHub.Api/ShopContext.cs:16, EF1003: concatenatedFromSqlRawchanged toFromSqlwith an interpolated string. Build line after: none.src/RollHub.Api/ShopContext.cs:19, EF1002: interpolatedFromSqlRawchanged toFromSqlwith the interpolated string. Build line after: none.
Suppressed
src/RollHub.Core/OrderService.cs:41, CA1031: "Parser boundary: malformed input must yield an empty string, not an exception."
Backlog
- CA5359, 1 in
src/RollHub.Api/Program.cs:8, and CA5399, 1 inProgram.cs:9: certificate validation is turned off. Needs your decision. Removing the callback changes which servers the process trusts, and a security rule is suppressed only on your explicit decision. - CA2000, 1 in
Program.cs:9: the handler is passed toHttpClient, which disposes it according to Microsoft's constructor page. Probably a false positive. No suppression written. - CA2016, 1 in
OrderService.cs:29: forwarding the token toTask.Delaychanges cancellation behavior. - CS4014, 1 in
OrderService.cs:23: awaiting the call changes whenStartBackgroundAsyncreturns. - CA1068, 1 in
OrderService.cs:15: movingCancellationTokento the last parameter breaks callers. - CA2201 and CA2208, 1 each in
OrderService.cs:61-62: both change an exception type or its parameter name or message. - CA1848, 3 in
OrderService.cs:LoggerMessagedelegates touch every logger call site. - CA2254 and CA1727, 1 each in
OrderService.cs:53-54: both change the log template or a property name that reaches the log sink. - CA1829, CA1851 (2), CA1860, CA1862 and CA1869, 6 in
OrderService.cs: performance-only changes. CA1862 also changes how the comparison treats culture. - ASP0000, 1 in
Program.cs:6: removes a startup call. Your decision. - 19 other positions (CA1822 x10, CA1050 x3, CA1873 x2, CA1304, CA1311, CA1510, SYSLIB0014): the skill cites no rule for these IDs. Not changed.
Writes made
Directory.Build.props: new file,AnalysisModeset toRecommended. Approved in the run brief; the folder is a synthetic fixture..editorconfig: new file, 24dotnet_diagnostic.<ID>.severity = warninglines under[*.cs]. Same approval.src/RollHub.Core/OrderService.cs: CA1849 and CA2200 fixes and the CA1031 suppression. Same approval.src/RollHub.Api/ShopContext.cs: EF1002 and EF1003 fixes. Same approval.
Builds run
dotnet build RollHub.sln --no-incremental -nologo -v qbefore triage: exit 0; 44 unique warnings. Log:build-run1.log.- The same command after triage: exit 0; 39 unique warnings. Log:
build-run2.log.
Not checked
- The EF fixes compile. The SQL they produce was not run against a database.
- NU1903 restore advisories on
SQLitePCLRaw.lib.e_sqlite32.1.11: reported as data, not triaged. - Projects that do not run analyzers: none.
- Anything the user did not approve to run: none.
This output comes from a recorded run on a synthetic solution (2 projects, 3 C# files) written for testing, not from a real codebase. Positions are the build-1 line numbers; the edits shift later lines in OrderService.cs by one or two, so build 2 is compared by ID counts. The full build logs, the diff of every edit and the probe table are in docs/VALIDATION.md in the package.
Connects securely to your tools. The creator never sees your data.
About this skill
Turns on .NET Roslyn analyzers for an existing solution in stages, then works through the warnings they raise.
You get three things: one AnalysisMode setting in one file, an .editorconfig block that sets the severity of 24 named analyzer IDs, and a triage list that puts every unique warning in one of three buckets: fix now, suppress with a stated reason, or backlog.
Use when you want to enable, roll out or tighten .NET analyzers or AnalysisMode, want a build that reports code-quality warnings, or want the warnings from an analyzer pass triaged.
Do not use for a best-practice audit of the code (use the .NET Best Practice Checker), IDE style rules (IDE*), or non-.NET projects.
How it works
- Survey, read-only. Finds the solution and project files and reads
Directory.Build.props,global.jsonand every.editorconfig. It notes existing analyzer settings and keeps them. - Choose the mode. Defaults to
Recommended. A project that sets its ownAnalysisModewins overDirectory.Build.props, so the skill reports it and asks. - Propose, then write. Shows the exact files and asks once. Nothing is written until you say yes, and a yes to one write does not cover the next.
- Build. Asks first, then runs
dotnet build --no-incrementaland saves the full output. - Triage. Deduplicates on file, line, column and ID, reads the code around each warning, and assigns a bucket.
- Apply and rebuild. Makes the fix-now edits and the suppressions you approved, rebuilds, and compares before and after.
- Report. Lists every write, every build, and everything it did not run.
Rules it keeps
- Severity is written by ID, one
dotnet_diagnostic.<ID>.severityline per rule. No bulk entries. - Every suppression carries a reason that names the constraint.
- EF1002, EF1003, CA5359 and CA5399 are suppressed only on your explicit decision.
- A build that fails, or a project that does not run analyzers, goes under "Not checked" with the first error line.
What is in the package
Markdown only, no scripts: SKILL.md, six reference files (analysis mode, .editorconfig severities, build and capture, the 24 analyzer IDs, triage, report template), and docs/VALIDATION.md with the recorded run and its full build logs.
Tested
One run on a synthetic two-project solution, .NET SDK 10.0.402, Windows 11. Before triage the build reported 44 unique analyzer positions; after triage it reported 39. Five positions went away: four fixed (CA1849, CA2200, EF1002, EF1003) and one suppressed with a reason (CA1031). The other 39 stayed as backlog. Both builds exited 0. Eight probe builds of the same solution tried other settings: None, Default, Recommended and All, .editorconfig entries, and an incremental build.
Not tested: real projects, multi-target projects or targets older than .NET 5, EnableNETAnalyzers, Linux and macOS, other SDK versions, and the EF Core fixes against a database. docs/VALIDATION.md lists these and records one place where the observed behavior conflicts with Microsoft's documentation (bulk .editorconfig entries).
Limitations
- It cites rules for 24 analyzer IDs. Any other warning goes through the same three buckets, but the skill makes no claim about those rules.
- Tuned and tested on one synthetic solution I wrote. How it behaves on a large real solution is unknown.
- Each warning is read in context before it is bucketed, so a solution with thousands of warnings takes a long session.
Requirements
- An agent that reads skill folders and has file read and search tools (tested only in Claude Code, Windows).
- The .NET SDK, for the build step.
- No API keys, accounts or environment variables.
Network and external references (disclosure)
- The skill itself makes no network calls and sends no repository content anywhere.
dotnet buildrestores packages from the NuGet feeds in your repo's configuration and writesbin/andobj/. The skill asks first.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 2 days ago
- Free to download with an account
Requires