csharp-conventionslisted
Install: claude install-skill tmj-90/gaffer
# Write idiomatic modern C#
Modern C# puts nullability in the type system, values in records, and asynchrony in a
first-class model with cancellation. Code that suppresses warnings, blocks on tasks, or
news up its dependencies gives that back. For the builder and the reviewer of a .NET diff; the solution's config and existing code win over it.
## Procedure
1. **Discover the solution's conventions first.** Call `search_lore` for .NET conventions.
Read `global.json` (SDK pin), `Directory.Build.props` and `Directory.Packages.props`
(central package versions; a new or bumped package is a blocker:
`mark_ticket_blocked` with the exact command a human should run), the `.csproj`
(`TargetFramework`, `LangVersion`, `Nullable`, `TreatWarningsAsErrors`,
`AnalysisLevel`/`AnalysisMode`, `ImplicitUsings`), `.editorconfig` (naming and
diagnostic severities), `.config/dotnet-tools.json`, and the CI workflow. Identify the
test framework (xUnit v2/v3, NUnit, MSTest), assertion and mocking libraries, the
error policy (exceptions vs a `Result` type) and minimal APIs vs controllers. Copy a
sibling class and its test.
2. **Pin the exact commands** from CI (the `run-tests` and `run-lint` skills). Use the
defaults below only when the repo defines none.
3. **Write the change with the idioms below**, then walk the concurrency section for every
task, disposable, shared field, `DbContext` and outbound call you touched.
4. **Test each acceptance criterion's own behaviou