Add Analyzer logo

Add Analyzer

OrganizationPopular
dotnet
add-analyzer

Use 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, XunitDiagnosticVerifier, or analyzers-testing.md — those are wrong for in-repo contribution.

Overview

Publisherdotnet
Repositoryroslynator
Skill nameadd-analyzer
Stars
3.5K
Forks
297
Bundled files
3
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.

  • 3 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 Analyzer 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-analyzer
  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-analyzer .claude/skills/add-analyzer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Add Analyzer 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 Analyzer 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 Analyzer 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 Analyzer

Overview

Roslynator analyzers are metadata-driven: edit Analyzers.xml, codegen, implement analyzer + code fix, test, changelog. New analyzers never set <Status> — only IsEnabledByDefault.

When to Use

  • New RCS0 / RCS1 / RCS9 rule requested in an approved issue
  • Analyzer needs a new or existing roslynator_* config option
  • Picking package: RCS0 → Formatting, RCS1 → Analyzers, RCS9 → CodeAnalysis.Analyzers

Not for: deprecating rules (deprecate-analyzer-or-refactoring), bug fixes (fix-analyzer-bug), refactorings (add-refactoring).

Gate: CONTRIBUTING.md requires an approved GitHub issue before implementation.

Read this skill and references/implementation.md before writing tests. Published analyzers-testing.md targets NuGet consumers — copying it produces code that does not compile in this repo.

Confirm metadata parameters (hard gate)

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

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

ParameterRequired?Allowed / notes
IdproposeCompute next free RCS0 / RCS1 / RCS9 id from Analyzers.xml; do not ask unless the issue conflicts or multiple ids are plausible
IdentifieryesPascalCase; drives generated names
TitleyesShort description
DefaultSeverityyesHidden, Info, Warning, or Error — always ask
IsEnabledByDefaultyestrue / false — always ask (RCS0 often false)
MessageFormatif message has {n} placeholdersOtherwise omit (same as Title)
Code fix?yesStrongly recommended; confirm yes/no
SupportsFadeOut / fade-out analyzernoAsk only if unused-code style
MinLanguageVersionnoAsk only if C# version-gated
Config optionnoSee config-options.md

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

Quick Reference

StepLocation / command
Metadatasrc/Analyzers.xml — see analyzer-schema.md
Config optionsrc/ConfigOptions.xml — see config-options.md
Codegencd tools && pwsh ./generate_code.ps1
AnalyzerRCS1 → Analyzers/CSharp/Analysis/; RCS0 → Formatting.Analyzers/CSharp/; RCS9 → CodeAnalysis.Analyzers/CSharp/
Code fixmatching *.CodeFixes/CSharp/CodeFixes/
Testssrc/Tests/<Package>.Tests/RCS####IdentifierTests.cs
ChangelogCHANGELOG.md under ## [Unreleased]

Implementation

  1. Confirm metadata parameters (hard gate above).
  2. Add <Analyzer> entry; schema in references/analyzer-schema.md. Use docs-site analyzer-metadata, not Template.Analyzers.xml.
  3. Optional config option before codegen — references/config-options.md.
  4. Codegen from tools/ (required cwd — see Common Mistakes).
  5. Implement analyzer, code fix (if confirmed), tests — references/implementation.md.

Changelog line:

markdown
- Add analyzer "TITLE" ([RCS1234](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1234)) ([#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 Roslynator.sln --no-build --filter "FullyQualifiedName~RCS####"
cd src && dotnet format Roslynator.sln --no-restore --verify-no-changes --severity info

Common Mistakes

MistakeFix
Guess DefaultSeverity / IsEnabledByDefaultAsk — hard gate above
Follow analyzers-testing.md verbatimIn-repo: AbstractCSharpDiagnosticVerifier + Descriptor = DiagnosticRules.X
pwsh tools/generate_code.ps1 from repo rootRun cd tools && pwsh ./generate_code.ps1 — generator uses ../src relative to cwd
<Status> on new analyzerUse only IsEnabledByDefault; lifecycle is deprecate-analyzer-or-refactoring
context.ReportDiagnosticUse DiagnosticHelpers.ReportDiagnostic
Lazy SupportedDiagnostics field initializerUse Immutable.InterlockedInitialize pattern

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 Analyzer AI skill do?

Use 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, XunitDiagnosticVerifier, or analyzers-testing.md — those are wrong for in-repo contribution.

Why use Add Analyzer on TypingMind?

Because you install it once and use it with any model. Add Analyzer 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 Analyzer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dotnet/roslynator/tree/main/.claude/skills/add-analyzer. 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 Analyzer?

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 Analyzer?

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

Is the Add Analyzer 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 👇