$npx skillfedfor your agent

Csharp Idioms

Learn idiomatic C# patterns that leverage type safety, LINQ expressiveness, and async-first design. This skill covers modern features like nullable reference types, records, and pattern matching, plus practical guidance on error handling, dependency injection, and testing with xUnit.

Csharp Idioms teaches modern C# best practices including nullable types, records, pattern matching, and async-first design for clean, type-safe code.

AI-generated summary based on this skill's SKILL.md

150 48 MITupdated by irahardianto

Decision gist · record as of 2026-07-17

Csharp Idioms teaches modern C# best practices including nullable types, records, pattern matching, and async-first design for clean, type-safe code. Learn idiomatic C# patterns that leverage type safety, LINQ expressiveness, and async-first design. This skill covers modern features like nullable reference types, records, and pattern matching, plus practical guidance on error handling, dependency injection, and testing with xUnit.

manual: git clone https://github.com/irahardianto/awesome-agv → cp -r awesome-agv/.agents/skills/csharp-idioms ~/.claude/skills/csharp-idioms
.agents/skills/csharp-idioms/SKILL.md · version 09122a58

Use it when

  • Csharp Idioms covers nullable reference type setup as a foundational practice for type-safe code.
  • Csharp Idioms provides comprehensive async/await patterns and cancellation token usage guidance.

Verify before relying

Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

irahardianto/awesome-agv/csharp-idioms · repository language: JavaScript

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What are modern C# 10 patterns and idioms I should know?

Csharp Idioms teaches contemporary C# patterns including nullable reference types for compile-time null safety, records for immutable data modeling, and pattern matching with switch expressions. These idioms emphasize type safety and expressiveness, helping you write cleaner, more maintainable code that leverages C#'s modern type system and functional features.

How should I set up C# nullable reference types?

Csharp Idioms covers nullable reference type setup as a foundational practice for type-safe code. Enabling this feature in your project file activates compile-time warnings for potential null reference issues, guiding you toward safer code patterns and reducing runtime null-reference exceptions through static analysis.

What C# async await guidelines does this skill cover?

Csharp Idioms provides comprehensive async/await patterns and cancellation token usage guidance. You'll learn async-first design principles, proper cancellation token propagation through async methods, and how to avoid blocking patterns like Result or Wait, ensuring responsive applications and correct resource cleanup.

How do Csharp Idioms address dependency injection and error handling?

Csharp Idioms teaches constructor injection patterns with DI containers and domain-driven error handling using the Result pattern. These principles help you build loosely coupled, testable code with explicit error handling that avoids exceptions for control flow, improving code clarity and maintainability.

What testing and code quality tools does Csharp Idioms recommend?

Csharp Idioms covers xUnit testing with FluentAssertions for expressive assertions, parameterized tests for comprehensive coverage, dotnet format for consistent code formatting, and Roslyn analyzers for static analysis. These tools enforce idioms and catch issues early in development.

How do LINQ, records, and pattern matching fit into idiomatic C#?

Csharp Idioms emphasizes LINQ best practices for data transformation, records for immutable domain models, and pattern matching with switch expressions for type-safe control flow. Together, these features enable functional, expressive code that reduces boilerplate and improves readability.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

C# Idioms and Patterns

C# rewards type safety, LINQ expressiveness, and async-first design. Modern C# (10+/.NET 6+) favors records, nullable reference types, and minimal APIs. Idiomatic C# = clean, async-aware, framework-integrated.

> Scope: C# coding idioms. Test naming: .agents/rules/testing-strategy.md. Logging: @.agents/skills/logging-implementation/SKILL.md.

Modern C# Features (10+)

  1. Nullable reference types — always enabled: ```csharp // ✅ Explicit nullability public Task? FindById(string id) { ... } public Task GetById(string id) { ... } // never returns null — throws

// In .csproj: <Nullable>enable</Nullable> ```

  1. Records for immutable data: csharp public record CreateTaskRequest(string Title, Priority Priority); public record TaskResponse(string Id, string Title, DateTime CreatedAt);

  2. Pattern matching: csharp return result switch { Success(var task) =&gt; Ok(task), NotFound(var id) =&gt; NotFound($"Task {id} not found"), ValidationError(var errors) =&gt; BadRequest(errors), _ =&gt; StatusCode(500) };

  3. **required and init for

(truncated - see the full file via the links below)

File tree — 1 file
.agents/skills/csharp-idioms/SKILL.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Learn modern C# idioms and best practices for clean, type-safe code”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

Dotnet Idioms
by irahardianto · irahardianto/awesome-agv

Learn idiomatic .NET 8+ development through minimal APIs, dependency injection, and async-first patterns. Covers Entity Framework Core configuration, middleware design, and testing with xUnit. Build clean, performant, cloud-native applications aligned with modern .NET best practices.

MITupdated Jul 2026
★ 150repo stars
Cpp Idioms
by irahardianto · irahardianto/awesome-agv

Cpp Idioms teaches you how to write safe, efficient C++ code using modern language features and proven design patterns. Learn RAII principles, smart pointer ownership models, move semantics, and error handling with std::expected—all grounded in C++17/20/23 standards. The skill covers interfaces, dependency injection, testing strategies, and anti-patterns to avoid, with practical code examples and tooling guidance.

MITupdated Jul 2026
★ 150repo stars
Java Idioms
by irahardianto · irahardianto/awesome-agv

Java Idioms covers modern language features and conventions for Java 17+ LTS, emphasizing records for immutable data, sealed classes for type-safe hierarchies, and pattern matching in switch expressions. The skill guides constructor injection, domain-specific exception handling, and testing with JUnit 5 and Mockito, alongside static analysis tooling to enforce code quality before commit.

MITupdated Jul 2026
★ 150repo stars
Spring Boot Idioms
by irahardianto · irahardianto/awesome-agv

Learn idiomatic Spring Boot 3.x patterns grounded in auto-configuration, constructor injection, and actuator-driven observability. Covers dependency injection best practices, Spring Data JPA query methods and projections, REST controller design with DTOs, and structured logging for production readiness. Includes testing patterns for integration and controller slices.

MITupdated Jul 2026
★ 150repo stars
Laravel Idioms
by irahardianto · irahardianto/awesome-agv

Learn Laravel's idiomatic approach to building maintainable applications through Eloquent query scopes, service-oriented architecture, and Form Request validation. Covers testing with Pest, code formatting with Pint, and static analysis via PHPStan to enforce framework best practices.

MITupdated Jul 2026
★ 150repo stars
typescript-idioms
by irahardianto · irahardianto/awesome-agv

Learn TypeScript's type system as your specification: enable strict mode, use type guards over casts, and validate all external data with Zod. This skill covers discriminated unions for state machines, immutability patterns, null safety, and the critical rule that all HTTP calls route through a centralized client for consistent auth and error handling.

MITupdated Jul 2026
★ 150repo stars

More skills Kotlin Idioms (MIT)

Tags
type-safety-firstasync-aware-designimmutable-data-structuresnull-safety-enforcementfunctional-patternsdependency-graph-managementtest-driven-idiomsframework-integrationcode-quality-toolingmodern-dotnet-ecosystem