dotnet-add-analyzers

Configure .NET analyzers, nullable reference types, and severity via EditorConfig.

1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-add-analyzers-rudironsoni
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dotnet-add-analyzers
Source: https://github.com/rudironsoni/dotnet-agent-harness/tree/main/.rulesync/skills/dotnet-add-analyzers
Command: npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-add-analyzers-rudironsoni

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers integrate and configure code analysis tools directly into their .NET projects, improving code quality, maintainability, and adherence to best practices.

Core Features & Use Cases

  • Configure Built-in Analyzers: Set AnalysisLevel for Roslyn analyzers (e.g., latest-all).
  • Enforce Nullable Reference Types: Enable nullable context for safer code.
  • Add Third-Party Analyzers: Integrate popular packages like Meziantou.Analyzer or BannedApiAnalyzers.
  • Use Case: A team wants to ensure all new C# code adheres to strict coding standards and security best practices. They use this Skill to enable all built-in analyzers, enforce nullable reference types, and add a security-focused third-party analyzer package.

Quick Start

Configure the project to use the 'latest-all' analysis level and enforce nullable reference types by editing the Directory.Build.props file.

Frequently Asked Questions about dotnet-add-analyzers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Roslyn analyzers in a .NET project?▼

Configure Roslyn analyzers in your .NET project by setting the AnalysisLevel property in Directory.Build.props to values like 'latest-all', and override specific rule severities using EditorConfig files.

What is the best way to enforce nullable reference types in C#?▼

Enforce nullable reference types in C# by enabling the nullable context within your .NET project configuration, which ensures safer code by highlighting potential null reference exceptions during development.

Can I add third-party code analyzers to my C# projects?▼

You can add third-party code analyzers to your C# projects by integrating popular NuGet packages like Meziantou.Analyzer or BannedApiAnalyzers to enforce custom security and coding standards.

How do I manage analyzer severity overrides using EditorConfig?▼

Manage analyzer severity overrides using EditorConfig by defining rule-specific severity levels, allowing incremental adoption of code analysis standards across your .NET codebase without breaking existing builds.

Does configuring .NET analyzers affect trimming and AOT compatibility?▼

Configuring .NET analyzers can affect trimming and AOT compatibility, and this Skill provides specific guidance on managing those settings alongside Roslyn rules to ensure Native AOT readiness.

Why use Serena MCP for code navigation when adopting analyzers?▼

Use Serena MCP for code navigation during analyzer adoption to efficiently traverse complex .NET codebases, pinpoint violations, and incrementally refactor code to meet newly enforced analysis standards.