microsoft/fluentui-blazor/csharp-naming-conventions
Claude Code and agent skill by microsoft/fluentui-blazor
- community
Checking that the SKILL.md file is still in the repository.
C# and .NET naming conventions, coding best practices, layout rules, unit testing, and Blazor component guidelines. Use when writing, reviewing, or refactoring C# / .NET / Blazor code or writing unit tests with xUnit and bUnit.
Install
npx vskill@latest install microsoft/fluentui-blazor/csharp-naming-conventionsSKILL.md
The same SKILL.md was published earlier as microsoft/fluentui-blazor/csharp-naming-conventions.
C# Naming Conventions and Best Practices
Comprehensive coding guidelines for .NET and C# developments, covering naming, layout, code patterns, unit testing, and Blazor conventions. Prioritized by impact to guide automated code generation and review.
When to Apply
Reference these guidelines when:
- Writing new C# / .NET code
- Reviewing or refactoring existing C# code
- Naming classes, methods, variables, properties, or parameters
- Formatting and laying out source files
- Working with async/await patterns
- Writing if/else, string, exception, or conversion logic
- Writing or reviewing unit tests (xUnit, bUnit)
- Building Blazor components and pages
- Organizing project file structures
Rule Categories by Priority
| Priority | Category | Impact | Prefix | |
|---|---|---|---|---|
| 1 | Naming & Casing | CRITICAL | naming- | |
| 2 | Code Layout & Formatting | HIGH | layout- | |
| 3 | Code Patterns | HIGH | code- | |
| 4 | Unit Testing | HIGH | testing- | |
| 5 | Blazor Conventions | MEDIUM-HIGH | blazor- |
Quick Reference
1. Naming & Casing (CRITICAL)
- naming-casing - Pascal case and Camel case conventions for all C# identifiers
- naming-files - File organization: one class per file, namespace matches folder
- naming-items - Explicit, unabbreviated, English-only names without prefixes
- naming-async - Postfix async methods with Async, eliding guidelines
2. Code Layout & Formatting (HIGH)
- layout-formatting - Indentation, braces, line length, and formatting rules
- layout-members-order - Member ordering within classes and no #region usage
3. Code Patterns (HIGH)
- code-variables - Variable declarations, var usage, access modifiers
- code-comments - Commenting conventions and XML documentation
- code-using-namespace - Using directives and file-scoped namespaces
- code-if-pattern - If braces, no-else-return, and guard pattern
- code-strings - String interpolation and StringBuilder usage
- code-exceptions - Exception handling and avoiding generic catches
- code-operators - Allowed and denied C# operators
- code-conversion - Data type conversion rules, never use ToString()
- code-datetime - DateTimeProvider for testable date/time code
- code-static - Avoid static classes except for extension methods
4. Unit Testing (HIGH)
- testing-practices - Seven best practices for unit tests
- testing-coverage - Code coverage with Coverlet and ReportGenerator
- testing-blazor - Blazor unit tests with bUnit and Verifier
5. Blazor Conventions (MEDIUM-HIGH)
- blazor-components - Component naming, routing, and file structure
- blazor-structure - Project folder organization with SOLID principles
- blazor-code - Methods, properties order, inject, and nullable defaults
- blazor-css - CSS isolation, root class and attribute selectors
- blazor-javascript - JavaScript interop and collocated JS files
- blazor-css - CSS isolation and ::deep pseudo-element usage
- blazor-performance - Rendering, cascading parameters, and optimization
How to Use
Use the linked rule files above for detailed explanations and code examples. Each rule file contains:
- Brief explanation of why it matters
- Correct code examples
- Incorrect patterns to avoid (when applicable)
- References to external guidelines
Security
- Security scanPassedPattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/csharp-naming-conventions/SKILL.md
Popularity
- Repository stars
- 4,840
- Repository forks
- 485
- 7-day trend score
- 42
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoft/fluentui-blazor/csharp-naming-conventions)