roslynator
Roslynator equips .NET projects with open-source static analysis and code-cleanup capabilities through NuGet analyzer packages and an optional command-line tool. Configure rule severity in `.editorconfig`, run analysis and fix workflows, or detect unused code—all while respecting your repo's existing analyzer setup.
Roslynator provides open-source C# static analysis and code-fix automation for .NET projects.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-25
Roslynator provides open-source C# static analysis and code-fix automation for .NET projects. Roslynator equips .NET projects with open-source static analysis and code-cleanup capabilities through NuGet analyzer packages and an optional command-line tool. Configure rule severity in `.editorconfig`, run analysis and fix workflows, or detect unused code—all while respecting your repo's existing analyzer setup.
Use it when
- Roslynator's command-line interface provides `analyze` and `fix` commands for batch operations on C# code.
- Roslynator includes analyzers that detect unused symbols, variables, and imports.
Verify before relying
Read SKILL.md below before installing (5 files). Open directory: indexed for reading, not audited.
Install
managedcode/dotnet-skills/roslynator · repository language: C#
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I set up Roslynator analyzers in my .NET project?
Roslynator installs via NuGet package manager. Add the `Roslynator.Analyzers` package to your project file or use `dotnet add package Roslynator.Analyzers`. Once installed, Roslynator's static analysis rules activate automatically during compilation. You can then configure rule severity levels in your project's `.editorconfig` file to customize which diagnostics are reported and at what level (error, warning, or silent).
What is the Roslynator CLI and how do I use it?
Roslynator's command-line interface provides `analyze` and `fix` commands for batch operations on C# code. Install the global tool with `dotnet tool install -g Roslynator.CommandLine`, then run `roslynator analyze` to scan your project for issues or `roslynator fix` to automatically apply corrections. The CLI is optional—the NuGet analyzer package works standalone—but the CLI excels for CI/CD integration and scripted workflows.
How can I find and eliminate unused code in C# with Roslynator?
Roslynator includes analyzers that detect unused symbols, variables, and imports. Run `roslynator analyze` via the CLI to generate a report of unused code, or let the NuGet package highlight these issues in your IDE during development. Configure the severity of unused-code diagnostics in `.editorconfig` to treat them as warnings or errors, enforcing cleanup across your team.
How do I configure Roslynator rules and severity levels?
Roslynator respects `.editorconfig` files for rule configuration. Create or edit `.editorconfig` in your project root and set rule IDs (e.g., `dotnet_diagnostic.RCS1001.severity = warning`) to control how each analyzer behaves. You can also disable specific rules entirely or set them to silent. This approach integrates seamlessly with other linters and respects your existing analyzer setup.
Can I integrate Roslynator into my CI/CD pipeline?
Yes. Roslynator's CLI tool is designed for CI/CD workflows. Install it as a global tool in your pipeline, then run `roslynator analyze` to fail the build if issues are found, or `roslynator fix` to auto-correct and commit changes. This enforces code quality checks across all pull requests and commits, ensuring consistent standards before code reaches production.
How does Roslynator avoid conflicts with other C# analyzers?
Roslynator is built on the Roslyn compiler platform and coexists with other analyzers like StyleCop. Configure rule IDs in `.editorconfig` to disable overlapping rules from competing packages, preventing duplicate warnings. Roslynator's modular design lets you cherry-pick which diagnostics matter to your project, consolidating analyzer packs without conflicts.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Roslynator
Trigger On
- the repo uses or wants
Roslynator.Analyzers - the team wants Roslynator CLI or extra Roslyn-based rules
- the user asks about C# linting, static analysis, code cleanup, or unused code
Value
- produce a concrete project delta: code, docs, config, tests, CI, or review artifact
- reduce ambiguity through explicit planning, verification, and final validation skills
- leave reusable project context so future tasks are faster and safer
Do Not Use For
- repos that already have overlapping analyzer packs with no consolidation plan
(truncated - see the full file via the links below)
File tree — 5 files
catalog/Tools/Roslynator/skills/roslynator/SKILL.md
catalog/Tools/Roslynator/skills/roslynator/manifest.json
catalog/Tools/Roslynator/skills/roslynator/references/config.md
catalog/Tools/Roslynator/skills/roslynator/references/roslynator.md
catalog/Tools/Roslynator/skills/roslynator/references/rules.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Set up Roslynator analyzers and CLI for C# static analysis and code cleanup”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
This skill installs and configures Meziantou.Analyzer, a comprehensive rule set for .NET codebases covering design, usage, security, performance, and style concerns. It manages package setup, severity configuration in `.editorconfig`, and avoids duplication with SDK or Roslynator analyzers. Use it when your team wants broader diagnostic coverage without managing multiple analyzer packages.
stylecop-analyzers sets up the StyleCop.Analyzers package in .NET repositories, establishing clear ownership between root .editorconfig and stylecop.json configuration. It detects existing state, adds the package where needed, and prevents rule overlap with other analyzer packs. Use it when your team requires stronger style conventions than SDK analyzers alone provide.
This skill establishes a single source of truth for .NET analyzer severity and code-style rules by creating or normalizing a repo-root .editorconfig file. It detects your current configuration state, structures rule ownership explicitly, and validates that settings are reproducible across local and CI builds.
Modern C# for .NET helps you write idiomatic C# code that aligns with your repository's target framework and language-version constraints. It guides feature selection across C# versions, handles compatibility decisions, and validates that new syntax is actually supported by your project's configuration.
CSharpier establishes a single, opinionated formatting standard for C# and XML in .NET projects. It detects current formatter state, installs the tool locally for reproducible CI, and documents ownership to avoid conflicts with dotnet format. Use this when your team values consistent formatting decisions over extensive configuration options.
This skill sets up the .NET SDK's built-in Roslyn analyzers and establishes a phased strategy for treating warnings as errors. It handles both new projects (immediate enforcement) and legacy codebases (batch-by-batch promotion), ensuring your CI fails on analyzer violations without overwhelming your team. Security rules are always prioritized.
More skills complexity (MIT) · resharper-clt (MIT) · format (MIT) · cloc (MIT)