analyzer-codefix

Create and maintain Roslyn analyzers, code fixes, and refactorings for C# and VB projects.

4|1|Updated May 1, 2026
One-click install
npx skills add https://github.com/CoolCoderSuper/vb-ls --skill analyzer-codefix-coolcodersuper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: analyzer-codefix
Source: https://github.com/CoolCoderSuper/vb-ls/tree/main/roslyn/.github/skills/analyzer-codefix
Command: npx skills add https://github.com/CoolCoderSuper/vb-ls --skill analyzer-codefix-coolcodersuper

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers in creating Roslyn IDE analyzers, code fixes, and refactorings to automate diagnostics and repairs, aligning code with IDE guidance.

Core Features & Use Cases

  • Code style analyzers (AbstractBuiltInCodeStyleDiagnosticAnalyzer) pattern
  • Non-style analyzers and DiagnosticAnalyzer usage
  • CodeFixProvider pattern with FixAllProvider
  • CodeRefactoringProvider pattern
  • EditorConfig / Options integration
  • Resource & Localization and testing scaffolds
  • Documentation and testing guidelines

Quick Start

Follow the Roslyn analyzer-codefix pattern to implement a new IDE diagnostic, its corresponding CodeFixProvider, and optional CodeRefactoringProvider.

Frequently Asked Questions about analyzer-codefix

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

FAQPage Schema
How do I build a Roslyn analyzer and code fix for C#?

To build a Roslyn analyzer and code fix for C#, follow the analyzer-codefix pattern to implement a DiagnosticAnalyzer for IDE diagnostics and a CodeFixProvider to automate repairs. This process includes setting up testing scaffolds.

What is the difference between a code style analyzer and a non-style analyzer in Roslyn?

A code style analyzer uses the AbstractBuiltInCodeStyleDiagnosticAnalyzer pattern to align code with IDE guidance, while a non-style analyzer uses the standard DiagnosticAnalyzer usage to enforce broader diagnostic rules and code quality checks.

How do I implement a FixAllProvider in a CodeFixProvider?

Implementing a FixAllProvider in a CodeFixProvider allows bulk code fixes across a document or project. The pattern integrates with standard code fix providers to automate widespread diagnostic repairs and refactoring tasks.

Can I create VB code refactorings using the CodeRefactoringProvider pattern?

Yes, you can create VB code refactorings using the CodeRefactoringProvider pattern. The process supports both C# and VB projects, enabling IDE refactorings alongside custom diagnostics and code fixes.

Does this approach support EditorConfig options and resource localization?

Yes, the approach supports EditorConfig options integration for configuring analyzer behavior and includes Resource and Localization support, ensuring diagnostics and code fixes adapt to specific project configurations and languages.

What testing scaffolds are needed for Roslyn analyzers and code fixes?

Testing scaffolds for Roslyn analyzers verify that diagnostics trigger correctly and code fixes produce expected outputs. The pattern includes documentation and testing guidelines to validate IDE diagnostics and refactoring behaviors.