modern-csharp-coding-standards · wshaddix — Claude Code skill for C#
This skill guides C# implementation and refactoring, from strongly typed models to async methods and buffer handling.
npx skills add wshaddix/dotnet-skills --skill modern-csharp-coding-standards -a claude-code
npx skills add wshaddix/dotnet-skills --skill csharp-coding-standards -a claude-codeWhat modern-csharp-coding-standards does
The skill steers agents toward modern C# constructs such as record, readonly record struct, pattern matching, nullable reference types, and composition over inheritance. It also lays out conventions for names, file organization, namespaces, and access modifiers.
For asynchronous code, it recommends cancellation support. For performance-critical paths, it points to Span<T> and Memory<T>. The guidance also covers focused interfaces and public API design. It draws on C# 12+ features, so check whether those fit your project’s target version.
Use it when creating a C# service, shaping a library API, or refactoring an existing codebase. The skill provides coding guidance; you still need to verify that suggested syntax works with your target .NET version.
What it helps with
- apply consistent conventions to new C# code
- refactor models with stronger typing
- design a library’s public API
- add cancellation support to async methods
- handle buffers with Span<T> or Memory<T>
Example prompts for the agent
- Refactor this C# class using the skill’s guidance while preserving its behavior.
- Design a public API for this library with nullable reference types in mind.
- Rewrite this buffer-handling code with Span<T> if it fits the use case.
How to install modern-csharp-coding-standards
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill modern-csharp-coding-standards -a claude-codenpx skills add wshaddix/dotnet-skills --skill csharp-coding-standards -a claude-code2Manually: put the files in place
~/.claude/skills/csharp-coding-standards/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/csharp-coding-standards/
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill csharp-coding-standards -a codex2Manually: put the files in place
.agents/skills/csharp-coding-standards/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill csharp-coding-standards -a cursor2Manually: put the files in place
.cursor/skills/csharp-coding-standards/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wshaddix/dotnet-skills csharp-coding-standards2Manually: put the files in place
.github/skills/csharp-coding-standards/SKILL.md1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill csharp-coding-standards -a gemini-cli2Platform CLI
gemini skills install https://github.com/wshaddix/dotnet-skills --path skills/csharp-coding-standardsManually: put the files in place
.devin/skills/csharp-coding-standards/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill csharp-coding-standards -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about modern-csharp-coding-standards
How do I install modern-csharp-coding-standards in Claude Code?
Run npx skills add wshaddix/dotnet-skills --skill modern-csharp-coding-standards -a claude-code.
What does modern-csharp-coding-standards do?
It gives agents C# conventions and design guidance for types, async code, APIs, and buffer handling.
Can I use this skill with a C# version earlier than 12?
The guidance draws on C# 12+ features, so some suggestions may not fit projects targeting an earlier version.
Similar skills
All skills for Programming languages →modern-csharp-coding-standards by other authors comes first.