csharp-conventions
Skill2 starsChanged 18 days agoMITView on GitHub
C# and .NET engineering conventions, design patterns, and language-feature guidance distilled from external books and articles, curated for the GeoAssets codebase (.NET 10). Use when writing or reviewing C# code, choosing between design patterns or type-hierarchy shapes, or evaluating whether a new C#/.NET language feature is safe to adopt.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- code-gen-dagSkill
- outer-loop-dag-orchestratorSkill
- plan-gen-dagSkill
- solid-code-synthesizerSkill
- jira-conventionsSkill
- observability-conventionsSkill
- outer-loop-dag-orchestratorSkill
- solid-code-synthesizerSkill
- ui-ux-pro-maxSkill
- solid-code-synthesizerSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Every entry records status: current (usable today on .NET 10 / C# 14) or future (depends on a language/runtime version GeoAssets doesn't …
- Distinctive: line 32
write code that uses it,
- Distinctive: line 33
treat its syntax/behavior as final — preview features change shape before GA.
- Distinctive: line 35
Do surface it when the user is explicitly asking about roadmap, upcoming language features, or planning a future migration.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.
Files
C# Conventions
Distilled, source-attributed engineering guidance — not a restatement of things you already know. Each reference file below traces back to a specific book or article; when a claim from a source turns out to be wrong or superseded, fix it at the source file, don't just override it in a conversation.
How this skill is organized
references/holds one file per topic. Read only the file relevant to the task at hand — don't load the whole set speculatively.- Every entry records status:
current(usable today on .NET 10 / C# 14) orfuture(depends on a language/runtime version GeoAssets doesn't target yet).
Before recommending anything from a future entry
GeoAssets targets .NET 10. Any entry marked future describes a
preview or unshipped feature. Do not:
- suggest it as the fix for a current code review or design question,
- write code that uses it,
- treat its syntax/behavior as final — preview features change shape before GA.
Do surface it when the user is explicitly asking about roadmap, upcoming language features, or planning a future migration.
References
| File | Topic | Status |
| future-language-features.md | Closed hierarchies, union types, closed enums (C# 15 / .NET 11) | future — GA targeted November 2026 |
| code-quality-metrics-and-safe-coding.md | Cyclomatic complexity, coupling, IDisposable, static analysis tooling | current |
| code-reusability-and-net-libraries.md | DRY, the reuse lifecycle, .NET Standard vs. netX.0, refactoring triggers, NuGet/OpenAPI | current |
| design-patterns-and-dotnet.md | SOLID, GoF patterns, dependency injection lifetimes, .NET Generic Host, AI-agent patterns | current |
| domain-driven-design.md | Bounded contexts, entities/value objects/aggregates, Onion architecture, repository/UoW, CQRS | current |
| testing-strategy-and-dotnet-tooling.md | Unit/integration/acceptance tiers, TDD/BDD, xUnit/Moq, subcutaneous-test pitfalls | current |
| entity-framework-core-and-onion-architecture.md | EF Core configuration/migrations, global query filters, EF-entity-vs-aggregate tension | current |
| async-and-concurrency-conventions.md | async/await naming, ConfigureAwait, Task vs ValueTask, cancellation, fire-and-forget | current |
| nullable-reference-types.md | ?/!/required usage, nullable-oblivious boundaries, entity/persistence nullability | current |
| error-handling-and-result-pattern.md | Exceptions vs. Result, translating domain exceptions across a REST boundary | current |
| records-vs-classes.md | General type-shape decision rule: identity/lifecycle vs. value/data-in-motion | current |
| project-and-solution-structure.md | Folder-as-dependency-lane rules, namespace-mirrors-path, one project per backend | current |
| configuration-and-options-pattern.md | Options classes, SectionName convention, IOptions vs IOptionsSnapshot/Monitor | current |
| api-design-conventions.md | Minimal API grouping, route/verb conventions, request validation, error-shape conventions | current |
| domain-test-data-builders.md | When/how to promote ad-hoc geometry/topology test construction into shared builders | current |
| rest-provider-contract-testing.md | Closing the untested seam between the REST server endpoints and REST client repository | current |
| timeprovider-and-clock-abstraction.md | Never DateTime.Now/Stopwatch/raw timers — inject TimeProvider; ties to active XD01-34 migration | current |
As more books/articles are added, list them here with topic and status so this table stays the single index of what's been curated.
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
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.

