Add Compiler Diagnostic Fix logo

Add Compiler Diagnostic Fix

OrganizationPopular
dotnet
add-compiler-diagnostic-fix

Use when adding a Roslynator code fix for C# compiler error CS#### or RCF####, editing Diagnostics.xml or CodeFixes.xml, or when compiler-diagnostic-fixes-testing.md shows XunitCompilerDiagnosticFixVerifier or bare DiagnosticId like "CS0106" — in-repo uses AbstractCSharpCompilerDiagnosticFixVerifier and CompilerDiagnosticIdentifiers. Contributor how-to exists but testing page targets NuGet consumers.

Overview

Publisherdotnet
Repositoryroslynator
Skill nameadd-compiler-diagnostic-fix
Stars
3.5K
Forks
297
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by dotnet on GitHub. Read the source before you install it.

Installation

Install the Add Compiler Diagnostic Fix AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dotnet/roslynator/tree/main/.claude/skills/add-compiler-diagnostic-fix
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dotnet/roslynator.git /tmp/roslynator
mkdir -p .claude/skills
cp -r /tmp/roslynator/.claude/skills/add-compiler-diagnostic-fix .claude/skills/add-compiler-diagnostic-fix
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Add Compiler Diagnostic Fix in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Add Compiler Diagnostic Fix on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Add Compiler Diagnostic Fix is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Add Compiler Diagnostic Fix

Overview

Compiler fixes use Diagnostics.xml + CodeFixes.xml → codegen → CompilerDiagnosticCodeFixProvider → test. Contributor how-to: how-to-add-compiler-diagnostic-fix. Do not follow compiler-diagnostic-fixes-testing alone — it targets NuGet consumers.

When to Use

  • New fix for CS#### compiler diagnostic
  • New RCF#### entry linking one or more CS ids
  • Extending fix coverage for an existing compiler error

Not for: Roslynator analyzers (add-analyzer), refactorings (add-refactoring).

Gate: approved GitHub issue (CONTRIBUTING.md).

Read references/implementation.md before writing tests.

Confirm metadata parameters (hard gate)

STOP. Do NOT edit Diagnostics.xml / CodeFixes.xml, run codegen, or implement until the user has confirmed every required parameter below. Do not invent titles or identifiers when the user (or issue) did not state them.

Use AskQuestion when available; otherwise ask conversationally. Batch related choices.

ParameterRequired?Notes
Compiler CS#### id(s)yesOne RCF may fix multiple CS ids
New Diagnostics.xml entry?if CS not already catalogedConfirm Title / Message / HelpUrl (usually from Microsoft docs)
RCF IdproposeCompute next free RCF#### from CodeFixes.xml, or extend an existing RCF when appropriate; do not ask unless ambiguous
IdentifieryesPascalCase for the code fix
TitleyesCode-fix menu / docs title
Code action titleyesString passed to CodeAction.Create (may match or differ from XML Title)

When proposing RCF Id, state the chosen value in your plan/summary (e.g. “using next free RCF0121”). Skip asking other parameters only when the approved issue or the user's message already states the value explicitly.

Quick Reference

StepLocation
Diagnostic catalogsrc/Diagnostics.xml
Fix metadatasrc/CodeFixes.xml
Codegencd tools && pwsh ./generate_code.ps1
Providersrc/CodeFixes/CSharp/CodeFixes/
Testssrc/Tests/CodeFixes.Tests/CS####IdentifierTests.cs
ChangelogCHANGELOG.md

Implementation

  1. Confirm metadata parameters (hard gate above).
  2. Full XML, provider, and test patterns: references/implementation.md.

Changelog:

markdown
- Add code fix "TITLE" for CS#### ([#PR](https://github.com/dotnet/roslynator/pull/PR))

Verify:

bash
cd tools && pwsh ./generate_code.ps1
cd src && dotnet build Roslynator.sln
cd src && dotnet test Tests/CodeFixes.Tests --no-build --filter "FullyQualifiedName~CS####"
cd src && dotnet format Roslynator.sln --no-restore --verify-no-changes --severity info

Common Mistakes

MistakeFix
Guess RCF Title / Identifier / code-action stringAsk — hard gate above
Follow compiler-diagnostic-fixes-testing.mdIn-repo: AbstractCSharpCompilerDiagnosticFixVerifier
DiagnosticId = "CS0106" literalUse CompilerDiagnosticIdentifiers.CS####_Identifier constant
`[...
Skip IsEnabled in providerRequired for EditorConfig / global compiler-fix toggles
Only read testing docAlso need Diagnostics.xml, CodeFixes.xml, codegen, provider base
Codegen from repo rootcd tools && pwsh ./generate_code.ps1

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Add Compiler Diagnostic Fix AI skill do?

Use when adding a Roslynator code fix for C# compiler error CS#### or RCF####, editing Diagnostics.xml or CodeFixes.xml, or when compiler-diagnostic-fixes-testing.md shows XunitCompilerDiagnosticFixVerifier or bare DiagnosticId like "CS0106" — in-repo uses AbstractCSharpCompilerDiagnosticFixVerifier and CompilerDiagnosticIdentifiers. Contributor how-to exists but testing page targets NuGet consumers.

Why use Add Compiler Diagnostic Fix on TypingMind?

Because you install it once and use it with any model. Add Compiler Diagnostic Fix is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Add Compiler Diagnostic Fix in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dotnet/roslynator/tree/main/.claude/skills/add-compiler-diagnostic-fix. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Add Compiler Diagnostic Fix?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Add Compiler Diagnostic Fix?

As many as you like. As long as a model supports skills, you can use Add Compiler Diagnostic Fix with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Add Compiler Diagnostic Fix AI skill free?

It is published on GitHub by dotnet. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇