Skill
Community

dotnet-csharp

Install
1
Install the plugin
$
npx claudepluginhub novotnyllc/dotnet-artisan --plugin dotnet-artisan

Want just this skill?

Then install: npx claudepluginhub u/[userId]/[slug]

Description

Baseline C# skill loaded for every .NET code path. Guides language patterns (records, pattern matching, primary constructors, C# 8-15), coding standards, async/await, DI, LINQ, serialization, domain modeling, concurrency, Roslyn analyzers, globalization, native interop (P/Invoke, LibraryImport, ComWrappers), WASM interop (JSImport/JSExport), and type design. Spans 25 topics. Do not use for ASP.NET endpoint architecture, UI framework patterns, or CI/CD guidance.

Tool Access

This skill uses the workspace's default tool permissions.

Supporting Assets
View in Repository
agents/openai.yaml
references/api-design.md
references/async-patterns.md
references/channels.md
references/code-smells.md
references/coding-standards.md
references/concurrency-patterns.md
references/configuration.md
references/dependency-injection.md
references/domain-modeling.md
references/dotnet-releases.md
references/editorconfig.md
references/file-io.md
references/globalization.md
references/input-validation.md
references/linq-optimization.md
references/modern-patterns.md
references/native-interop.md
references/nullable-reference-types.md
references/roslyn-analyzers.md
Skill Content

dotnet-csharp

Overview

C# language patterns, coding standards, and .NET runtime features for idiomatic, performant code. This consolidated skill spans 25 topic areas. Load the appropriate companion file from references/ based on the routing table below.

Always-Load Baseline

These references define correctness and quality standards that apply to all C# code — load them by default whenever producing or reviewing code, regardless of what the user asked for:

  • references/coding-standards.md — naming conventions, file layout, style rules
  • references/async-patterns.md — async/await correctness, ConfigureAwait, cancellation propagation (nearly all .NET code uses async)
  • references/solid-principles.md — SOLID, DRY, single responsibility, dependency inversion, anti-pattern detection
  • references/code-smells.md — common mistakes the agent should avoid without being told (async void, DI lifetime misuse, swallowed exceptions)
  • references/dotnet-releases.md — .NET 10/11 and C# 14/15 features, version matrix, TFM-specific code generation rules (compensates for training data cutoff)

On-Demand References

Load these when the topic matches (see Routing Table keywords):

Routing Table

TopicKeywordsDescriptionCompanion File
Coding standardsnaming, file layout, style rulesBaseline C# conventions (naming, layout, style rules)references/coding-standards.md
Async/awaitasync, Task, ConfigureAwait, cancellationasync/await, Task patterns, ConfigureAwait, cancellationreferences/async-patterns.md
Dependency injectionDI, services, scopes, keyed, lifetimesMS DI, keyed services, scopes, decoration, lifetimesreferences/dependency-injection.md
ConfigurationOptions pattern, user secrets, feature flagsOptions pattern, user secrets, feature flags, IOptions<T>references/configuration.md
Source generatorsIIncrementalGenerator, GeneratedRegex, LoggerMessageIIncrementalGenerator, GeneratedRegex, LoggerMessage, STJreferences/source-generators.md
Nullable reference typesannotations, migration, agent mistakesAnnotation strategies, migration, agent mistakesreferences/nullable-reference-types.md
SerializationSystem.Text.Json, Protobuf, MessagePack, AOTSystem.Text.Json source generators, Protobuf, MessagePackreferences/serialization.md
ChannelsChannel<T>, bounded/unbounded, backpressureChannel<T>, bounded/unbounded, backpressure, drainreferences/channels.md
LINQ optimizationIQueryable vs IEnumerable, compiled queriesIQueryable vs IEnumerable, compiled queries, allocationsreferences/linq-optimization.md
Domain modelingaggregates, value objects, domain eventsAggregates, value objects, domain events, repositoriesreferences/domain-modeling.md
SOLID principlesSRP, DRY, anti-patterns, compliance checksSOLID and DRY principles, C# anti-patterns, fixesreferences/solid-principles.md
Concurrencylock, SemaphoreSlim, Interlocked, concurrent collectionslock, SemaphoreSlim, Interlocked, concurrent collectionsreferences/concurrency-patterns.md
Roslyn analyzersDiagnosticAnalyzer, CodeFixProvider, multi-versionDiagnosticAnalyzer, CodeFixProvider, CodeRefactoringreferences/roslyn-analyzers.md
EditorconfigIDE/CA severity, AnalysisLevel, globalconfigIDE/CA severity, AnalysisLevel, globalconfig, enforcementreferences/editorconfig.md
File I/OFileStream, RandomAccess, FileSystemWatcher, pathsFileStream, RandomAccess, FileSystemWatcher, MemoryMappedFilereferences/file-io.md
Native interopP/Invoke, LibraryImport, ComWrappers, marshallingP/Invoke, LibraryImport, ComWrappers, marshalling, cross-platformreferences/native-interop.md
Input validation.NET 10 AddValidation, FluentValidation.NET 10 AddValidation, FluentValidation, ProblemDetailsreferences/input-validation.md
Validation patternsDataAnnotations, IValidatableObject, IValidateOptionsDataAnnotations, IValidatableObject, IValidateOptions<T>references/validation-patterns.md
Modern patternsrecords, pattern matching, primary constructorsRecords, pattern matching, primary constructors, C# 12-15references/modern-patterns.md
API designnaming, parameter ordering, return types, extensionsNaming, parameter ordering, return types, error patternsreferences/api-design.md
Type design/perfstruct vs class, sealed, Span/Memory, collectionsstruct vs class, sealed, Span/Memory, collectionsreferences/type-design-performance.md
Code smellsanti-patterns, async misuse, DI mistakes, fixesAnti-patterns, async misuse, DI mistakes, fixesreferences/code-smells.md
.NET releases.NET 10, .NET 11, C# 14, C# 15, TFM, version, union, extension blocks, field keywordVersion matrix, new features, TFM-specific code generationreferences/dotnet-releases.md
GlobalizationCultureInfo, StringComparison, TimeZoneInfo, Rune, encodingCulture-aware coding, string comparison, time zones, character processingreferences/globalization.md
WASM interopJSImport, JSExport, standalone WASM, wasm-experimental, browserJSImport/JSExport, standalone .NET WASM, browser APIs, WASM AOTreferences/wasm-interop.md

Scope

  • C# language features (C# 8-15)
  • .NET runtime patterns (async, DI, config, serialization, channels, LINQ)
  • Code quality (analyzers, editorconfig, code smells, SOLID)
  • Type design and domain modeling
  • File I/O and native interop
  • Globalization (string comparison, CultureInfo, time zones, character processing, encoding)
  • Input validation at the model level (DataAnnotations, IValidatableObject, FluentValidation, Options validation)

Out of scope

  • ASP.NET Core / web API patterns (request-level validation, endpoint filters) -> [skill:dotnet-api]
  • UI framework patterns -> [skill:dotnet-ui]
  • Testing patterns -> [skill:dotnet-testing]
  • Build/MSBuild/project setup -> [skill:dotnet-tooling]
  • Performance profiling tools -> [skill:dotnet-tooling]
Stats
Stars191
Forks10
Last CommitMar 8, 2026

Similar Skills