modern-csharp-coding-standards

Enforce modern C# idioms like records, pattern matching, and value objects.

Updated May 4, 2026
One-click install
npx skills add https://github.com/clarivex-tech/pervaxis-forge --skill modern-csharp-coding-standards-clarivex-tech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modern-csharp-coding-standards
Source: https://github.com/clarivex-tech/pervaxis-forge/tree/main/pervaxis-forge-api/.claude/skills/csharp-coding-standards
Command: npx skills add https://github.com/clarivex-tech/pervaxis-forge --skill modern-csharp-coding-standards-clarivex-tech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Modern C# coding standards help teams write safe, readable, and high-performance code by embracing records, pattern matching, value objects, async/await patterns, and Span<T>/Memory<T> where appropriate.

Core Features & Use Cases

  • Enforce modern C# idioms: records, pattern matching, and value objects to model domain concepts safely.
  • Promote performance-conscious design: Span<T>/Memory<T>, zero-allocation patterns, and explicit API boundaries.
  • Drive consistent API design and maintainability across new and existing codebases.

Quick Start

Audit a project against these standards and progressively refactor types to use records, value objects, and explicit pattern matching.

Frequently Asked Questions about modern-csharp-coding-standards

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

FAQPage Schema
How do I enforce modern C# coding standards for records and pattern matching?

To enforce modern C# coding standards, apply immutable patterns using records and value objects, implement explicit pattern matching guidelines, and enforce explicit API boundaries to ensure robust and testable code.

When should I use Span<T> and Memory<T> for high-performance C# code?

You should use Span<T> and Memory<T> for high-performance C# code to enable zero-allocation patterns and performance-conscious design across explicit API boundaries in libraries and services.

What is the best way to refactor existing codebases to use C# value objects?

The best way to refactor existing codebases is to audit projects against modern standards and progressively migrate types to use records, value objects, and explicit pattern matching for improved safety.

Does adopting immutable records improve API safety in C# libraries?

Adopting immutable records improves API safety in C# libraries by standardizing domain modeling, enforcing explicit conversions, and driving consistent, maintainable API design across new and existing services.

Why use explicit conversions and pattern matching in modern C# API design?

Explicit conversions and pattern matching in modern C# API design enforce robust type safety and clear domain boundaries, ensuring your code remains testable, readable, and highly performant.

Can I apply these C# coding standards to both new codebases and refactors?

You can apply these C# coding standards to both new codebases and refactors in libraries and services to ensure consistent API design, immutability, and high performance across all projects.