dotnet-code-quality
Automates .NET static analysis via Roslyn, reporting style and quality issues from build logs.
Install
mkdir -p .claude/skills/dotnet-code-quality && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18999" && unzip -o skill.zip -d .claude/skills/dotnet-code-quality && rm skill.zipInstalls to .claude/skills/dotnet-code-quality
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Run this .NET/C# project or solution's Roslyn analyzers — StyleCop.Analyzers for style/formatting (the .NET equivalent of Checkstyle) and Microsoft.CodeAnalysis.NetAnalyzers' CA rules for code-quality/design/reliability/security bug detection (the .NET equivalent of PMD + SpotBugs combined) — via a clean `dotnet build` with a SARIF diagnostic log, then read the generated `.sarif` file to summarize every issue found (file, line, rule, message), grouped by tool. Invoke as `/dotnet-code-quality` to check the whole solution, or `/dotnet-code-quality <path-or-class-name>` to scope the summary to a specific project/file/class — the underlying build always analyzes the whole targeted solution/project (Roslyn analyzers have no per-class selector), only the reported summary is filtered. Use whenever the user wants a lint/static-analysis pass called out separately from `dotnet-test`/`dotnet-coverage`, instead of eyeballing raw build warnings.Key capabilities
- →Confirm Roslyn analyzers are configured
- →Run a clean build with SARIF diagnostic log
- →Read generated SARIF log
- →Report issues grouped by tool and file
- →Filter summary to a specific project/file/class
How it works
The skill first checks for analyzer configuration, then performs a clean `dotnet build` to generate a SARIF log. It then reads and parses this log, grouping findings by tool and reporting them.
Inputs & outputs
When to use dotnet-code-quality
- →Run static analysis on .NET solution
- →Check code style compliance
- →Identify security vulnerabilities in C# code
- →Generate code quality summaries
About dotnet-code-quality
Executes StyleCop and .NET Code Analysis (CA) rules during the build process to detect reliability, design, and security bugs. Summarizes the resulting SARIF logs into a readable format, scoped by project or class.
Run this .NET/C# project or solution's Roslyn analyzers — StyleCop.Analyzers for style/formatting (the .NET equivalent of Checkstyle) and Microsoft.CodeAnalysis.NetAnalyzers' CA rules for code-quality/design/reliability/security bug detection (the .NET equivalent of PMD + SpotBugs combined) — via a
When not to use it
- →When the user wants to fix issues, not just report them
- →When the build fails outright due to a genuine compile error
Limitations
- →Does not fix issues, only reports them
- →Roslyn analyzers have no per-class selector for the underlying build
- →SARIF log may be incomplete or absent if the build fails due to compile errors
How it compares
This skill automates the execution and reporting of Roslyn analyzers via a clean build and SARIF log, providing a structured summary of code quality issues, unlike manual inspection of build warnings.
Compared to similar skills
dotnet-code-quality side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| dotnet-code-quality (this skill) | 0 | 12d | Review | Intermediate |
| dotnet-dev | 1 | 5mo | Review | Beginner |
| quality-ci | 0 | 2mo | No flags | Advanced |
| dotnet-code-analysis | 0 | 3mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by albertoirurueta
View all by albertoirurueta →You might also like
dotnet-dev
GitTools
Expert guidance for .NET development in this repository. Use this skill for building, testing, debugging, and understanding project structure, coding conventions, dependency injection patterns, and testing practices.
quality-ci
managedcode
Set up or refine open-source .NET code-quality gates for CI: formatting, `.editorconfig`, SDK analyzers, third-party analyzers, coverage, mutation testing, architecture tests, and security scanning. USE FOR: .NET quality gates in CI; analyzer, coverage, mutation, and architecture-test choices; stand
dotnet-code-analysis
managedcode
Use the free built-in .NET SDK analyzers and analysis levels with gradual Roslyn warning promotion. Use when a .NET repo needs first-party code analysis, `EnableNETAnalyzers`, `AnalysisLevel`, or warning-as-error policy wired into build and CI.
csharp-pro
sickn33
Write modern C# code with advanced features like records, pattern matching, and async/await. Optimizes .NET applications, implements enterprise patterns, and ensures comprehensive testing. Use PROACTIVELY for C# refactoring, performance optimization, or complex .NET solutions.
performance-benchmark
dotnet
Generate and run ad hoc performance benchmarks to validate code changes. Use this when asked to benchmark, profile, or validate the performance impact of a code change in dotnet/runtime.
backend-testing
exceptionless
Backend testing with xUnit, Foundatio.Xunit, integration tests with AppWebHostFactory, FluentClient, ProxyTimeProvider for time manipulation, and test data builders. Keywords: xUnit, Fact, Theory, integration tests, AppWebHostFactory, FluentClient, ProxyTimeProvider, TimeProvider, Foundatio.Xunit, TestWithLoggingBase, test data builders