Use SharpConsoleUI to build full terminal (TUI) applications in .NET — equally suited to full-screen single-window apps and multi-window desktops with overlapping draggable…
Modern C# for .NET
Write modern, version-aware C# for .NET repositories while staying compatible with the repo's target framework and language-version policy. USE FOR: modern idiomatic C# code; language-version compatibility decisions; upgrading or reviewing C# feature usage across versions. DO NOT USE FOR: non-C# .NET languages such as F# or VB; analyzer-only or formatter-only setup with no language feature choice. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
Trigger On
- the repo wants more modern idiomatic C# code
- a change depends on language-version compatibility
- the team is upgrading or reviewing C# feature usage across versions
- you need to know whether a C# 13 or C# 14 feature is safe to use
Workflow
- Detect the real language ceiling from the repo's target framework and explicit
LangVersion. - Prefer stable features that the current repo actually supports.
- Use modern syntax when it reduces ceremony, improves correctness, or makes invariants clearer.
- Do not mass-rewrite a codebase into newer syntax unless the repo wants that churn.
- Treat preview features as opt-in only. Never assume preview because the current machine has a newer SDK.
- Pay special attention to C# 13 and C# 14:
- C# 13 is the stable language for .NET 9 - C# 14 is the stable language for .NET 10
- When feature selection changes architecture, style rules, or generated-code patterns, coordinate with:
- dotnet - analyzer-config - architecture
- After feature-driven refactors, run the repo's .NET quality pass through
dotnet.
Deliver
- modern C# code that fits the repo's real language version
- fewer obsolete patterns when a newer stable feature is clearer
- no accidental preview or unsupported-language drift
Validate
- the chosen syntax is supported by the repo's
TFMandLangVersion - the feature improves clarity, correctness, or maintainability
- preview-only features are used only when the repo explicitly opted in
- style and analyzer rules still agree with the new syntax
Load References
Related skills
Use ManagedCode.Communication when a .NET application needs explicit result objects, structured errors, and predictable service or API boundaries instead of exception-driven…
Use ManagedCode.MimeTypes when a .NET application needs consistent MIME type detection, extension mapping, and content-type decisions for uploads, downloads, or HTTP responses.
Related agents
.NET Modernization
Modernization orchestration agent for upgrades, legacy migrations, compatibility planning, and staged adoption of modern .NET patterns.
Also works: dotnet agents install modernization