rm-guide-csharp-features

Guide C# 12 and 13 feature adoption with clarity-focused syntax decisions.

Updated Nov 11, 2023
One-click install
npx skills add https://github.com/michaelvolz/redmuffin.Blazor.StaticWeb --skill rm-guide-csharp-features
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rm-guide-csharp-features
Source: https://github.com/michaelvolz/redmuffin.Blazor.StaticWeb/tree/main/.opencode/skills/redmuffin-standards/rm-guide-csharp-features
Command: npx skills add https://github.com/michaelvolz/redmuffin.Blazor.StaticWeb --skill rm-guide-csharp-features

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill clarifies when and how to adopt modern C# 12/13 syntax so teams can modernize code without introducing inconsistent styles or risky preview features.

Core Features & Use Cases

  • Clarity-first guidance encourages simpler constructs like collection expressions, nameof, and pattern matching when they improve readability.
  • Decision criteria remind you to balance generated code, analyzers, and repo conventions before introducing a new language feature in production or tests.
  • Use Case: When a pull request proposes primary constructors, consult this guidance to verify the change aligns with the repo’s modern syntax comfort level and avoids unnecessary preview usage.

Quick Start

Ask for modern C# 12 or 13 refactor suggestions that respect existing style and avoid unnecessary preview features.

Frequently Asked Questions about rm-guide-csharp-features

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

FAQPage Schema
How do I modernize C# code without introducing inconsistent styles?

To modernize C# code consistently, adopt clarity-first features like collection expressions and pattern matching while balancing generated code, analyzers, and repository conventions before updating production or test code.

When should I use primary constructors in C# 12?

Use primary constructors in C# 12 when they improve readability and align with your repository's modern syntax comfort level, ensuring you avoid unnecessary preview features during code modernization.

What is the best way to evaluate new C# 13 syntax for an existing repository?

The best way to evaluate new C# 13 syntax is to apply decision criteria that balance generated code, analyzers, and repo conventions, favoring natural collection expressions and pattern matching when they enhance clarity.

Can I use C# 12 collection expressions and pattern matching in test code?

Yes, you can use C# 12 collection expressions and pattern matching in test code, guided by clarity-first principles to ensure simpler constructs like nameof and collection expressions improve overall readability.

Why avoid unnecessary preview features when adopting modern C# language features?

Avoid unnecessary preview features when adopting modern C# language features to prevent introducing risky syntax and inconsistent styles into production or test code during repository modernization updates.

Does C# modernization guidance work with existing repo conventions and analyzers?

Modern C# modernization guidance works directly with existing repo conventions and analyzers, providing decision criteria to verify that new syntax proposals align with established code styles before integration.