csharp-idioms

Community

Adopt modern C# idioms with confidence

AuthorFaysilAlshareef
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Modernizes C# code by reducing boilerplate, improving consistency, and ensuring idiomatic use of records, pattern matching, primary constructors, and file-scoped namespaces without emitting syntax unsupported by the project's target framework.

Core Features & Use Cases

  • Guidance on modern syntax: Prefer file-scoped namespaces, records for DTOs/value objects, pattern matching, and expression-bodied members.
  • Feature gating: Recommend features only when supported by TargetFramework and LangVersion to avoid incompatible code generation.
  • Detection & migration: Scan .csproj, Directory.Build.props, .editorconfig, and existing .cs files to detect current patterns and suggest incremental migrations.
  • Practical patterns: Includes examples for records, primary constructors, collection expressions, switch/property/list patterns, and naming conventions.

Quick Start

Use the csharp-idioms skill to refactor new DTOs into records, apply file-scoped namespaces, and choose idioms compatible with the project's TargetFramework and LangVersion.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: csharp-idioms
Download link: https://github.com/FaysilAlshareef/dotnet-ai-kit/archive/main.zip#csharp-idioms

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.