/dotnet:dotnet-modern-csharp-editorconfigfrom dotnet
Generates an opinionated .editorconfig for modern C# (C# 10–14) enforcing concise, readable code with latest language features. Covers .csproj flags and .NET 8 vs 9+ distinctions.
Ships in dotnet. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use when setting up (or overhauling) code style, naming, formatting, and analyzer severities for a modern C# codebase — one that targets .NET 10 / C# 14, or any C# 10–13 project that wants to adopt the same modern conventions.
The output is a single .editorconfig dropped into the current folder, tuned to promote:
new(), collection expressions [ ], primary constructors, file-scoped namespaces, and other C# 12–14 idiomsusing orderingScope covers formatting, code style, naming style, and analyzer severities — all in one file.
Apply when any of the following is true:
.editorconfig to an existing solution that currently has none.editorconfig with one that flips on preview analyzers and modern-feature diagnosticsmcs-* templates that already trigger this generation (pass -s to skip the standalone blurb)If the repo already has an .editorconfig in the target folder, do NOT edit, merge, patch, or add the template URL to the existing file. Ask the user whether to replace it with the generated Modern C# baseline. If the user says no, STOP. If the user says yes, run dotnet new mcs-editorconfig --force in the target folder.
.NET CLI on PATH. First-time install of the template package:
dotnet new install Modern.CSharp.Templates
Confirm availability:
dotnet new list mcs
Run in the folder where the .editorconfig should live (typically repo root so every project inherits):
dotnet new mcs-editorconfig
Options:
| Option | Effect |
|---|---|
-s, --skipmanualinstructions | Suppress the printed manual-setup blurb. Use when this template runs as part of another mcs-* template chain. |
--force | Overwrite an existing .editorconfig in the folder. |
-o <dir> | Write to a specific folder instead of the current directory. |
The .editorconfig alone does not enforce style on dotnet build. Add this PropertyGroup to Directory.Build.props in the same folder as .editorconfig so it applies in all .csproj files in or below that folder:
<PropertyGroup>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AnalysisLevel>preview-All</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<!-- GenerateDocumentationFile is true to enable IDE0005 (Remove unnecessary usings/imports) on build.
This also enables CS1591 (Missing XML comment for publicly visible type or member);
for projects that do not require comprehensive XML documentation,
exclude CS1591 with the MSBuild NoWarn property to prevent XML doc slop. -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
In ALL .csproj files in or below the folder where the .editorconfig resides, ensure that CS1591 is excluded with NoWarn to prevent XML doc slop. For example, to exclude CS1591:
<PropertyGroup>
<!-- Exclude CS1591 to prevent XML doc slop if this project does not require comprehensive XML documentation.
Do NOT set GenerateDocumentationFile to false; it is required for the
IDE0005 (Remove unnecessary usings/imports) analyzer to function. -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
This MUST be in .csproj files; it cannot be in the Directory.Build.props file because some projects may require comprehensive XML documentation while others do not; excluding CS1591 must be an explicit choice per project. By excluding CS1591 in all project files initially, we enable opt-in to comprehensive XML documentation on a per-project basis by removing CS1591 from that project's NoWarn list.
camelCase for private instance fields and reject _camelCase. This is a deliberate divergence from the common underscore-prefix convention — if your repo has existing _field code, a repo-wide rename is implied..editorconfig. Read the file comments before editing, and update the comment if you change a rule.Other mcs-* templates may generate their own .editorconfig already based on this one. In particular:
mcs-orleans-multiservice writes an extended .editorconfig at the solution root that builds on this baseline and layers Orleans-specific rules on top. Do not run mcs-editorconfig separately in that solution — the extended file is already there. See the orleans-multiservice-pattern skill.When this template is chained into a custom project-generation flow (not superseded by another template that already includes it), suppress the standalone instructions blurb:
dotnet new mcs-editorconfig -s
Before building, check whether AGENTS.md (or AGENTS.MD) in the current working folder or any
parent folder up to the repository root contains <!-- dotnet-build-errors-and-warnings:start -->.
If the marker is absent, do not build. Ask the user to exit this agent session, run dna check
(or dnx agentic.check) in the folder that holds the AGENTS.md to update (usually the repository
root), and restart or resume the session, because the updated AGENTS.md only loads at session start.
Stop until that is done.
Use the installed dotnet-build-errors-and-warnings directive for build verification and diagnostic fixes.
That directive governs when to run dotnet format, how to fix build errors and warnings, and when suppressions are allowed.
After generation and csproj wiring, confirm the rules take effect at build:
dotnet build
A clean build with no IDE* / CA* diagnostics confirms the editorconfig + csproj combination is active. If you expect diagnostics to fire and none appear, re-check EnforceCodeStyleInBuild and, on .NET 8, AnalysisLevel.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
editorconfig, code-style, csharp, dotnet, naming-conventions, analyzer-severities
4 skills in this plugin
/cli-e2e-testingUse when creating, modifying, debugging, or reviewing end-to-end tests for any CLI tool that must run in a real terminal, accept keyboard input, and expose observable terminal output. Prefer Hex1b terminal automation for PTY/headless terminal flows./dotnet-livecharts2LiveCharts2 development guide — installation, XAML source generator integration, theme config, gotchas, and sample index with exact repo file paths. Use when implementing any LiveCharts2 chart (line, area, bar, pie, gauge, heatmap, scatter, polar, financial). Covers all platforms (WinUI, Uno, Avalonia, MAUI, WPF, Blazor, WinForms, Eto)./dotnet-refactoringWhat a green build does not check when C# code is refactored. Use when renaming, moving, extracting, inlining, merging or deduplicating C# / .NET code. Covers names read at runtime, edits to text that only looks like a reference, behavior drift while deduplicating, generated and partial code, and targets the default build skips.npx claudepluginhub vincenth-net/dotnet-agentic-engineering --plugin dotnetOther plugins' skills for the same job