dotnet-essentials
.NET product discipline — SDK commands, nullable enable, DI, parameterized data access, Docker-always services. Use when the product stack is dotnet.
- License 许可
- MIT
- 最近更新
- 2026-10-20
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- dotnet-essentials
- license
- MIT
- description
- .NET product discipline — SDK commands, nullable enable, DI, parameterized data access, Docker-always services. Use when the product stack is dotnet.
- compatibility
- opencode
03 SKILL.md 正文
What I do
- Keep .NET products consistent per learn.microsoft.com conventions: nullable-aware, DI-first, warning-clean.
When to use me
Use on every task whose effective stack (task.stack ?? roadmap.stack, or workspace/*.sln / **/*.csproj) is dotnet.
Rules
- Toolchain only:
dotnet add package/dotnet run/dotnet test/dotnet build. Treat warnings as errors in CI (<TreatWarningsAsErrors>true</TreatWarningsAsErrors>);dotnet formatbefore exit. - Verify:
dotnet test(0 failures, coverage collected every run, <80% on new domain logic fails review) before exit; paste real output intoworkspace/TASK_PROGRESS.md. xUnit facts+theories, FluentAssertions, Moq/NSubstitute for boundaries;WebApplicationFactoryfor HTTP (through middleware, not around it) — never a live background server in tests. Name tests by behavior:FindByIdAsync_ReturnsOrder_WhenOrderExists. - Language:
<Nullable>enable</Nullable>+<ImplicitUsings>enable</ImplicitUsings>; file-scoped namespaces;async/awaitend-to-end withCancellationTokenon I/O;IOptions<T>for config (bind env, never hardcode). Mirrorsrc/undertests/; target 80%+ on domain logic, validation, auth, failure paths. - Architecture: DI-first (constructor injection,
AddScopedservices over statics); thin controllers/endpoints over services; EF Core with parameterized LINQ/raw (FromSqlInterpolated, never concatenated SQL) + code-first migrations, neverEnsureCreateddrift. - Data access: connect via env to declared Docker services. No fallback data layers — fail fast (health checks unhealthy) when a service is unreachable.
Depth (vendored ECC reference, MIT © 2026 Affaan Mustafa — read on demand)
-
vendor/ecc/rules/csharp/coding-style.md,patterns.md,security.md,testing.md -
vendor/ecc/skills/dotnet-patterns/SKILL.md,vendor/ecc/skills/csharp-testing/SKILL.md -
Review checklist:
vendor/ecc/agents/csharp-reviewer.md -
Reloadable staged IDs:
ecc-dotnet-patterns,ecc-csharp-testing(skill tool, on-demand — staged by workflow/runner, never auto-injected)
04 同仓库更多 Skills
demo-skill
暂无简介
web-accessibility
WCAG 2.2 AA practice for keyboard, screen reader, contrast, and motion. Use when building or auditing user interfaces.
ui-conventions
Black/white token system, accessible components, and copy rules for frontend work. Use when building screens, components, or design tokens.
test-evidence
stack-toolchain test matrices, concurrency cases, and TASK_PROGRESS proof format for QA verification. Use when writing tests or proving deliverables work.
test-driven-development
RED-GREEN-REFACTOR cycle for new behavior. Use when implementing any feature, fix, or endpoint before writing production code.
systematic-debugging
Reproduce-isolate-fix-verify loop for defects and flaky behavior. Use when facing a bug, test failure, or unexpected behavior.