agentleFS
NicoGentiNicoGenti/opencode-orchestrator-kit/skills/examples/dotnet-conventions/SKILL.md

dotnet-conventions

Skill9 starsChanged 8 days agoMITView on GitHub

C#/.NET naming, structure, and style conventions to apply when writing or reviewing C# code. Load before implementing or reviewing any .csproj-based feature.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. dennisrongo/claude-skills★ 1same name
    2. techmefr/mentis★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use language keywords for built-in types (string, int) instead of runtime type names (String, Int32) [web:61].

    line 18
  2. Very specific:

    Use int rather than unsigned types unless interop specifically requires it [web:61].

    line 19
  3. Very specific:

    Use var only when the type is obvious from the right-hand side.

    line 23
  4. Distinctive:

    Use modern language features (pattern matching, records, nullable reference types) over outdated constructs [web:61].

    line 24
  5. Distinctive:

    Use LINQ for collection manipulation where it improves readability.

    line 25
  6. Very specific:

    Use async/await for I/O-bound work.

    line 26
  7. Distinctive:

    Keep methods short (aim under ~50 lines).

    line 28
  8. Distinctive:

    Prefer dependency injection via constructor over static/service-locator patterns.

    line 34
  9. Distinctive:

    Prefer the repository/service pattern already used in the codebase over introducing a new abstraction layer — check 2-3 existing services …

    line 35

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

.NET Conventions

Apply these conventions consistently. Prefer clarity and modern C# features over legacy patterns [web:61].

Naming

  • PascalCase for types, methods, and public members.
  • camelCase for local variables and parameters.
  • Prefix interfaces with I (e.g., IRepository).
  • Prefix private fields with _ (e.g., _httpClient).
  • Use language keywords for built-in types (string, int) instead of runtime type names (String, Int32) [web:61].
  • Use int rather than unsigned types unless interop specifically requires it [web:61].

Style

  • Use var only when the type is obvious from the right-hand side; otherwise use the explicit type [web:61].
  • Use modern language features (pattern matching, records, nullable reference types) over outdated constructs [web:61].
  • Use LINQ for collection manipulation where it improves readability; avoid LINQ chains so long they hurt readability.
  • Use async/await for I/O-bound work; be careful with ConfigureAwait in library code to avoid deadlocks [web:61].
  • Catch specific exception types with meaningful messages; do not catch bare Exception without a filter [web:61].
  • Keep methods short (aim under ~50 lines); if a method grows past that, extract private helper methods.

Structure

  • One primary type per file; file name matches the type name.
  • Group namespace imports alphabetically, System.* first, at the top of the file, outside the namespace block.
  • Prefer dependency injection via constructor over static/service-locator patterns.
  • Prefer the repository/service pattern already used in the codebase over introducing a new abstraction layer — check 2-3 existing services before adding a new pattern.

When Reviewing

Flag violations of the above, but prioritize behavior-affecting issues (nullability bugs, unawaited tasks, exception swallowing) over pure style nits.

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.

Reviews can't be read right now.

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.