Official agent skill

Add Compiler Diagnostic Fix

by dotnet in dotnet/roslynator

A skill your agent uses 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…

OfficialCustom licenceAuto-check passedDevelopment

Install Add Compiler Diagnostic Fix

skills CLI
$ npx skills add dotnet/roslynator --skill add-compiler-diagnostic-fix -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dotnet/roslynator add-compiler-diagnostic-fix --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dotnet/roslynator.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-compiler-diagnostic-fix .claude/skills/add-compiler-diagnostic-fix && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-compiler-diagnostic-fix
GitHub stars
3.5k
Token cost
~1k tokens
SKILL.md length
331 words
Files
2 (incl. references)
Skills in repo
6
Repo updated
First seen
Licence
Custom licence

At a glance

A skill your agent uses 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…

  • Works in 2 steps: Confirm metadata parameters (hard gate… → Full XML, provider, and test patterns:…
  • Adding a Roslynator code fix for C compiler error CS
  • SKILL.md covers Overview, When to Use, Confirm metadata parameters… and Quick Reference, plus 2 more sections
  • Calls pwsh and dotnet

What it does

Add Compiler Diagnostic Fix is an agent skill from dotnet/roslynator, published by the product's own GitHub organization. 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.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/implementation.md`).

It sits in Development. It works with C# and .NET. The repository describes itself as: Roslynator is a set of code analysis tools for C, powered by Roslyn.

When your agent uses it

  • Adding a Roslynator code fix for C compiler error CS
  • Editing Diagnostics.xml
  • Compiler-diagnostic-fixes-testing.md shows XunitCompilerDiagnosticFixVerifier
  • Bare DiagnosticId like CS0106 — in-repo uses AbstractCSharpCompilerDiagnosticFixVerifier and CompilerDiagnosticIdentifiers

Example prompts

  • “CS0106”
  • “/add-compiler-diagnostic-fix”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

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

What it can do on your machine

Read from SKILL.md and the folder at commit 167f434. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pwsh
    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • josefpihrt.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Compiler Diagnostic Fix loads about 1k tokens when it runs, and up to ~1.9k if it reads all its reference files. Until then it costs about 108 tokens; SKILL.md has 331 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~108
When it runs · the whole SKILL.md, loaded when a task matches
~1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 331 words (~1,033 tokens).

“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.”

— opening of SKILL.md by dotnet, Custom licence
name
add-compiler-diagnostic-fix

Read the full SKILL.md on GitHub

Files

SKILL.md and 1 other file (references) in .claude/skills/add-compiler-diagnostic-fix of dotnet/roslynator.

  • SKILL.md
  • references/implementation.md

Open the folder on GitHubat commit 167f434

Compare with similar skills

Add Compiler Diagnostic Fix next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Compiler Diagnostic Fix compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Compiler Diagnostic Fix this skilldotnet/roslynator3.5k—~1kAutomated safety check: PassCustom licence
Speckit ConstitutionWeihanLi/WeihanLi.Common24211 repos~2.1kAutomated safety check: PassApache-2.0
Analyzing .NET Performancedotnet/skills5.6k3 repos~3.1kAutomated safety check: PassMIT
GitVersion .NET DevelopmentGitTools/GitVersion3.1k—~1.7kAutomated safety check: PassMIT
Code Reviewdotnet/macios2.9k—~1.7kAutomated safety check: PassCustom licence
Code Reviewjonathanpeppers/dotnes780—~2.1kAutomated safety check: PassMIT

Similar skills

  • Speckit Constitution

    WeihanLi/WeihanLi.Common

    Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.

    242 GitHub starsUsed in 11 repos~2.1k tokens
    DevelopmentAuto-check passed
  • Official

    Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.

    5.6k GitHub starsUsed in 3 repos~3.1k tokens
    DevelopmentAuto-check passed
  • GitVersion .NET Development

    GitTools/GitVersion

    Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.

    3.1k GitHub stars~1.7k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Code Review

    dotnet/macios

    Official

    Review dotnet/macios PRs against established rules. An agent skill from dotnet/macios.

    2.9k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Code Review

    jonathanpeppers/dotnes

    Review dotnes pull requests against established repository rules.

    780 GitHub stars~2.1k tokensUpdated 15 days ago
    DevelopmentAuto-check passed
  • Dynamo Dotnet Expert

    DynamoDS/Dynamo

    Write and review C/.NET code in Dynamo following Dynamo coding standards, modern C patterns, and repo conventions.

    2k GitHub stars~922 tokensUpdated today
    DevelopmentAuto-check passed

More from dotnet/roslynator

  • Add Analyzer

    dotnet/roslynator

    Official

    A skill your agent uses when adding a new RCS diagnostic in roslynator (RCS0 formatting, RCS1 general, RCS9 code-analysis), wiring roslynator EditorConfig options, or when docs say CHANGELOG.md…

    3.5k GitHub stars~1.3k tokensUpdated 4 days ago
    Auto-check passed
  • Add Refactoring

    dotnet/roslynator

    Official

    A skill your agent uses when adding a new RR refactoring in roslynator, editing Refactorings.xml, registering in RefactoringContext, or when refactorings-testing.md shows XunitRefactoringVerifier —…

    3.5k GitHub stars~946 tokensUpdated 4 days ago
    Auto-check passed
  • Fix Analyzer Bug

    dotnet/roslynator

    Official

    A skill your agent uses when fixing a Roslynator analyzer false positive or false negative, RCS, RR, or CS/RCF regression, incorrect diagnostic reporting, or bug report citing a specific rule id —…

    3.5k GitHub stars~1.1k tokensUpdated 4 days ago
    Auto-check passed
  • Release Roslynator

    dotnet/roslynator

    Official

    A skill your agent uses when shipping a roslynator release, rolling CHANGELOG.md [Unreleased], updating the VS Code extension changelog, creating a GitHub v release, or optionally tagging cli-v.

    3.5k GitHub stars~1k tokensUpdated 4 days ago
    Auto-check passed
  • Official

    A skill your agent uses when obsoleting or retiring RCS, RR, or RCF in roslynator, replacing an analyzer with another id, or when tempted to use IsObsolete on an Analyzer entry — analyzers use…

    3.5k GitHub stars~511 tokensUpdated 4 days ago
    Auto-check passed

Works with

Categories

Questions about Add Compiler Diagnostic Fix

What does Add Compiler Diagnostic Fix do?

A skill your agent uses 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…. Add Compiler Diagnostic Fix is an agent skill from dotnet/roslynator, published by the product's own GitHub organization.md shows XunitCompilerDiagnosticFixVerifier or bare DiagnosticId like "CS0106" — in-repo uses AbstractCSharpCompilerDiagnosticFixVerifier and CompilerDiagnosticIdentifiers.

When should I use Add Compiler Diagnostic Fix?

Add Compiler Diagnostic Fix fits situations like: adding a Roslynator code fix for C compiler error CS; editing Diagnostics.xml; compiler-diagnostic-fixes-testing.md shows XunitCompilerDiagnosticFixVerifier; bare DiagnosticId like CS0106 — in-repo uses AbstractCSharpCompilerDiagnosticFixVerifier and CompilerDiagnosticIdentifiers.

How do I install Add Compiler Diagnostic Fix in Claude Code?

Run `npx skills add dotnet/roslynator --skill add-compiler-diagnostic-fix -a claude-code`. Or copy the skill folder (.claude/skills/add-compiler-diagnostic-fix in dotnet/roslynator) into .claude/skills/add-compiler-diagnostic-fix in your project. Claude Code loads it when a task matches its description.

How do I install Add Compiler Diagnostic Fix in Codex?

Run `npx skills add dotnet/roslynator --skill add-compiler-diagnostic-fix -a codex`. Or copy the skill folder (.claude/skills/add-compiler-diagnostic-fix in dotnet/roslynator) into .agents/skills/add-compiler-diagnostic-fix in your project. Codex loads it when a task matches its description.

Can I use Add Compiler Diagnostic Fix in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dotnet/roslynator --skill add-compiler-diagnostic-fix -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-compiler-diagnostic-fix, .gemini/skills/add-compiler-diagnostic-fix, .github/skills/add-compiler-diagnostic-fix and .opencode/skills/add-compiler-diagnostic-fix in your project.

What does Add Compiler Diagnostic Fix need to run?

Going by SKILL.md and its folder, Add Compiler Diagnostic Fix needs the command-line tools its instructions call (pwsh and dotnet).

Does Add Compiler Diagnostic Fix access the network?

SKILL.md names 1 domain. As links in the text: josefpihrt.github.io. This is read from the text; nothing was executed.

Is Add Compiler Diagnostic Fix safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Compiler Diagnostic Fix use?

Add Compiler Diagnostic Fix has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Add Compiler Diagnostic Fix use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 837 tokens, read only when the agent opens those files.

What are the alternatives to Add Compiler Diagnostic Fix?

Skills that share tags, products or a category with Add Compiler Diagnostic Fix: Speckit Constitution (WeihanLi/WeihanLi.Common, 242 stars), Analyzing .NET Performance (dotnet/skills, 5.6k stars), GitVersion .NET Development (GitTools/GitVersion, 3.1k stars) and Code Review (dotnet/macios, 2.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Compiler Diagnostic Fix?

dotnet (a GitHub organization, an official publisher) maintains it in dotnet/roslynator, which has 3,485 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 4, 2026.

Source: dotnet/roslynator on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.