dotnet-modern-csharp

Select C# language features matching a repository's TFM and LangVersion.

1|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/mkerchenski/hurrah-tv --skill dotnet-modern-csharp-mkerchenski
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-modern-csharp
Source: https://github.com/mkerchenski/hurrah-tv/tree/main/.claude/skills/dotnet-modern-csharp
Command: npx skills add https://github.com/mkerchenski/hurrah-tv --skill dotnet-modern-csharp-mkerchenski

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents build breaks and inconsistent style by guiding you to choose C# language features that match the repo’s actual target framework and optional LangVersion settings.

Core Features & Use Cases

  • Version-aware C# feature selection: Identify the repo’s real “language ceiling” (TFM + LangVersion) and select only supported modern C# features.
  • Targeted modernization deliverables: Produce concrete deltas (code/config/docs/tests/CI or review artifacts) rather than vague refactoring suggestions.
  • Guardrailed upgrades (no accidental preview): Treat preview features as opt-in and avoid mass rewrites that create churn unless explicitly desired.

Quick Start

Use the dotnet-modern-csharp skill to determine which C# 13/14 features are safe in this repository and then modernize the provided code in a compatibility-safe way.

Frequently Asked Questions about dotnet-modern-csharp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use modern C# features without breaking my .NET target framework compatibility?

To use modern C# features safely, identify the repository's language ceiling by checking the Target Framework Moniker (TFM) and any explicit LangVersion setting. Select only C# features supported by that version ceiling to prevent build breaks.

What C# language version corresponds to my .NET project's TFM and LangVersion?

Your C# language version is determined by the project's Target Framework Moniker (TFM) and any explicit LangVersion setting in your project file or .editorconfig. These define the maximum language ceiling for available features.

How do I safely refactor legacy C# code to use newer language features?

Safely refactoring C# code requires producing concrete deltas for code, configuration, and tests rather than mass rewrites. Validate changes against the repo's language ceiling and confirm them using dotnet build and follow-on quality checks.

Does upgrading my .NET project force me to use preview C# features?

Upgrading .NET does not force preview C# features. Preview features are treated as opt-in, avoiding accidental usage and unnecessary code churn unless you explicitly configure the LangVersion to enable them.

Why does my C# build fail after adding modern language features to an older .NET repository?

C# builds fail when modern language features exceed the repository's actual language ceiling defined by the TFM and LangVersion. Selecting only features supported by the target framework prevents these version incompatibilities.