dotnet-roslyn-analyzers

Automates Roslyn analyzer development and enforcement for .NET projects via Git hooks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the process of writing and enforcing high-quality Roslyn analyzers for .NET projects, ensuring code consistency, security, and performance.

Core Features & Use Cases

  • Analyzer Development: Provides guidance and structure for creating custom DiagnosticAnalyzers, CodeFixProviders, and CodeRefactorings.
  • Quality Gates: Integrates with Git hooks (pre-commit, pre-push) to enforce coding standards and catch issues before commits or pushes.
  • Use Case: Automatically detect and fix common anti-patterns like incorrect IDisposable implementation or potential SQL injection vulnerabilities during the development cycle.

Quick Start

Run the setup script to install the Git hooks for Roslyn analyzer enforcement.

Frequently Asked Questions about dotnet-roslyn-analyzers

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

FAQPage Schema
How do I enforce Roslyn analyzer rules in .NET before a Git commit?

You can enforce Roslyn analyzers before a Git commit by integrating them into Git hooks. This Skill automates setting up pre-commit and pre-push hooks to validate C# code quality and catch issues early.

How do I create a custom Roslyn analyzer for C#?

Creating a custom Roslyn analyzer involves developing DiagnosticAnalyzers and CodeFixProviders. This Skill provides structural guidance to automate the creation and configuration of custom analyzers for your .NET projects.

Can I configure .NET code quality rules using an .editorconfig file?

Yes, you can configure .NET code quality rules using an .editorconfig file. This Skill supports configuring custom Roslyn analyzers through .editorconfig to define specific security and performance standards for your codebase.

How do Roslyn analyzers detect and fix C# anti-patterns like SQL injection?

Roslyn analyzers detect C# anti-patterns like SQL injection by analyzing code syntax during development. This Skill helps automate the creation of analyzers and code fixes to identify and resolve these vulnerabilities before code is pushed.

What is the best way to automate IDisposable implementation checks in C#?

The best way to automate IDisposable implementation checks is using custom Roslyn analyzers. This Skill automates the development of diagnostic analyzers to detect incorrect IDisposable patterns and enforce quality standards via Git hooks.