agentleFS
MicrosoftKnown publishermicrosoft/fluentui-blazor/.github/skills/csharp-naming-conventions/SKILL.md

csharp-naming-conventions

Skill4.8k starsChanged 4 months agoMITView on GitHub

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.

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 2 mentionsFeb 2026: 0 mentionsMar 2026: 1 mentionApr 2026: 1 mentionMay 2026: 1 mentionJun 2026: 2 mentionsJul 2026: 2 mentionsAug 2026: 1 mentionSep 2026: 5 mentionsOct 2026: 8 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/fluentui-blazor repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/fluentui-blazor

The biggest 5 of 39 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 39

Talked about on GitHub and Bluesky (39 times).

On GitHub · 36

31 more on GitHub

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the linked rule files above for detailed explanations and code examples.

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

PriorityCategoryImpactPrefix
1Naming & CasingCRITICALnaming-
2Code Layout & FormattingHIGHlayout-
3Code PatternsHIGHcode-
4Unit TestingHIGHtesting-
5Blazor ConventionsMEDIUM-HIGHblazor-

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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.