/sota-skills:sota-dotnetfrom SOTA Engineering Skills
Applies modern C# / .NET engineering rules when building or auditing .NET code. Covers idioms, async, security, performance, and build tooling for .NET LTS releases.
Ships in SOTA Engineering Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Expert-level rules for producing and auditing production .NET. The runtime is
memory-safe, so risk concentrates in injection, deserialization, async
correctness, and dependency supply chain. Written for .NET 10 LTS (released
Nov 2025, supported to Nov 2028) and C# 14 (records, nullable reference
types, pattern matching, spans, extension members, the field keyword) — flag
where a control needs a specific version. Every rule states the why; every
rules file ends with an audit checklist of grep/analyzer patterns.
Two consumers, one source of truth:
02, 03, 04; a parser of
untrusted bytes also gets a fuzz target (rules/06 §4).<Nullable>enable</Nullable>,
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>,
<AnalysisLevel>latest-Recommended</AnalysisLevel> plus
<AnalysisModeSecurity>All</AnalysisModeSecurity> (Recommended alone leaves most
security CA rules off — rules/06 §2), NuGet lockfile +
RestoreLockedMode in CI, and dotnet format from day one (rules/06)..Result/.Wait()/
GetAwaiter().GetResult()) (rules/03). Use CancellationToken end to end.rules/04).unsafe, DynamicMethod, suppressing
a nullable/analyzer warning), leave a // NOTE(sota): explaining why.Coverage: every rules/ file's Audit checklist applies in AUDIT mode. Mark one not applicable only with its reason in the report — never skip a file because the thing it checks for is absent, since that absence may be the finding.
Work each relevant rules file's audit checklist against the target. Run the greps and the Roslyn analyzers (incl. the security CA rules); confirm hits manually. Check the dependency tree against known-CVE databases.
| Severity | Meaning | Examples |
|---|---|---|
| CRITICAL | Exploitable on reachable input | SQL via string interpolation/concat into FromSqlRaw/ExecuteSqlRaw/Dapper, BinaryFormatter/NetDataContractSerializer/LosFormatter or JSON TypeNameHandling.All on untrusted data, command injection, deserialization gadget |
| HIGH | Likely incident or security weakness | Missing auth on an endpoint, disabled cert validation (ServerCertificateCustomValidationCallback => true), MD5/SHA-1 or DES/ECB for security, Random for tokens, blocking on async causing deadlock/thread-pool starvation, secrets in config/source |
| MEDIUM | Correctness/maintainability hazard | async void (non-handler), missing ConfigureAwait(false) in a library, IDisposable not disposed / no using, nullable warnings suppressed with !, swallowed exceptions, mutable static state |
| LOW | Idiom/perf debt | Sync-over-collection LINQ on hot path, needless allocations/boxing, class where a record/struct fits, not using Span/pooling on hot path |
| INFO | Style/doc/hygiene | formatting, naming, missing XML docs, nullable annotations absent (not enabled) |
Expands the router's canonical row (file:line | rule | severity | effort | fix, which wins on a
cross-domain roll-up); evidence block and report order: sota rules/03 §2 and §5.
[SEVERITY] File.cs:LINE — short title
Rule: rules/NN-name.md § section
Evidence: the offending line(s), verbatim
Impact: one sentence — what executes/leaks/deadlocks, under what input
Fix: concrete replacement code or action
Effort: trivial | small | medium | large
Group findings by severity, CRITICAL first. End with: counts per severity, the three highest-leverage fixes, and which checklists/analyzers were run.
| File | Read this when... |
|---|---|
rules/01-idioms.md | Writing/reviewing any C#: records & record struct, nullable reference types, pattern matching/switch expressions, spans, LINQ discipline, var, expression vs statement, file-scoped namespaces, error handling, modern C# 12–14 features, undefined enum values from input (Enum.IsDefined) |
rules/02-design-api.md | Designing types/APIs: nullable reference type discipline, int? over a magic int and using TryParse's bool (its out is 0 on failure), immutability, IDisposable/IAsyncDisposable and using, exceptions, value vs reference types, internal/visibility, DI (the built-in container), options pattern, UseExceptionHandler first in the pipeline; ASP.NET Core rate limiting and request limits (AddRateLimiter/UseRateLimiter after authentication, RequireRateLimiting/[EnableRateLimiting], per-caller partitions, 503 default rejection, auth endpoints; Kestrel MaxRequestBodySize, FormOptions, MaxConcurrentConnections defaults); a compiled worked minimal-API example; failures that end the process (an uncatchable StackOverflowException) and parser depth (MaxDepth, Newtonsoft below 13.0.1) |
rules/03-async-concurrency.md | Anything async/Task/threads: async-all-the-way, never block (.Result/.Wait()), ConfigureAwait(false) in libraries, CancellationToken flow, async void, Channel<T>, IAsyncEnumerable, TPL/Parallel, thread-safety, ValueTask, injected TimeProvider/FakeTimeProvider for testable time, System.Threading.Lock (.NET 9+, CS9216) |
rules/04-security.md | Any input crossing a trust boundary: SQL (EF Core/Dapper parameterization), legacy serializers (BinaryFormatter removed .NET 9 — and its opt-back-in package) + JSON TypeNameHandling + DataSet.ReadXml, command/path injection (Path.Combine dropping the root, Zip Slip, regex timeouts, \z not $ for whole-input anchoring), SSRF (address check in SocketsHttpHandler.ConnectCallback, lenient IPAddress.TryParse, redirects on by default, proxy blinds the callback), ASP.NET Core authn/authz, antiforgery/CORS, Data Protection, crypto (RandomNumberGenerator, AES-GCM, Pbkdf2 over the legacy Rfc2898DeriveBytes ctor, no hard-coded TLS version), secrets; OWASP .NET; default-deny FallbackPolicy; JsonSerializerOptions.Strict; SqlQueryRaw; escape hatches into raw memory: unsafe code and P/Invoke; ASP.NET Core defaults that fail open — attribute-less cookies, open redirect, Html.Raw/MarkupString, verb-less actions that skip antiforgery, JWT validation switched off, forwarded headers that trust any peer; XML consumers (XPathDocument, XSLT) that inherit an unsafe reader; a shared Data Protection key ring; SPKI pinning on top of chain validation; legacy System.Web config (request/event validation off, the web.config chain and allowOverride) |
rules/05-performance.md | Latency/throughput/memory work: GC (gen/SOH/LOH, server vs workstation, DATAS on by default with Server GC), allocation reduction, Span<T>/Memory<T>/ArrayPool, struct/record struct, BenchmarkDotNet, async overhead, Native AOT / trimming, string handling |
rules/06-build-tooling-ci.md | Setting up or auditing build/CI: SDK/TFM targeting (and whether it is past end of support), Directory.Build.props, nullable + warnings-as-errors, Roslyn analyzers (incl. security CA rules — off by default, opted in with AnalysisModeSecurity), dotnet format, NuGet lockfiles + supply chain (lock mode, source mapping, signed packages, strong name vs publisher signature, CVE scan, package code that runs at build — build/*.targets, analyzers, ExcludeAssets), vetting a new dependency and the insecure defaults of what you consume, SBOM, runtime/framework patch level (Kestrel CVE-2025-55315, incl. the 2.3.x Kestrel.Core package), signatureValidationMode=require (measured enforced on Linux; bypassed by a warm package cache and DOTNET_NUGET_SIGNATURE_VERIFICATION=false; config file name matched case-insensitively). Test strategy lives in sota-testing; this owns .NET build/test mechanics (xUnit/NUnit, Testcontainers). Also: suppressions that name a rule and a reason (IDE0079 is IDE-only, so no CLI gate), exempting tests by project (IsTestProject in Directory.Build.targets) or .editorconfig path, the implicit unlocked restore (RestoreLockedMode; --locked-mode with no lock file passes), build-time SBOM for AOT/single-file, ASan on the P/Invoke native side. |
FromSql/interpolated FromSql, never FromSqlRaw/ExecuteSqlRaw with
concatenation); Dapper with parameters. Interpolated/concatenated SQL is
CRITICAL. (rules/04)BinaryFormatter is removed in .NET 9+ (throws);
never reintroduce it or NetDataContractSerializer/LosFormatter/SoapFormatter,
and never use Json.NET TypeNameHandling.Auto/All or JsonSerializer with
an unrestricted type resolver on untrusted data. Use System.Text.Json with
known types. (rules/04).Result, .Wait(),
.GetAwaiter().GetResult() on a hot/request path (deadlock + thread-pool
starvation). async void only for event handlers. (rules/03)CancellationToken end to end through async APIs and honor it.
(rules/03)ConfigureAwait(false) in library code (code with no sync context that
doesn't need to resume on the original context). (rules/03)<Nullable>enable</Nullable>;
don't paper over warnings with the null-forgiving !. (rules/01, rules/02)IDisposable/IAsyncDisposable is in a
using/await using or owned by a DI-managed lifetime — HttpClient via
IHttpClientFactory, not new-per-call. (rules/02)RandomNumberGenerator (never Random)
for tokens/keys/IVs; AES-GCM (not ECB); no MD5/SHA-1 for security; ASP.NET
Core Data Protection for at-rest tokens; never disable TLS cert
validation. (rules/04)[Authorize]/policies/endpoint auth), antiforgery for cookie-auth POSTs,
CORS locked to known origins. (rules/04)TreatWarningsAsErrors,
Roslyn analyzers (security CA rules explicitly opted in — AnalysisModeSecurity), dotnet format --verify-no-changes,
NuGet locked-mode restore + CVE scan. (rules/06)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
dotnet, csharp, aspnet-core, entity-framework, async-programming
npx claudepluginhub martinholovsky/sota-skills --plugin sota-skills43 skills in this plugin
/sotaMaster router for the SOTA engineering skills library. Use this skill whenever the user asks to build, design, implement, refactor, harden, optimize, review, or audit an application, service, or codebase and the request spans more than one domain — or when you are unsure which specific sota-* skill applies. Also use when working on a codebase you do not own: reviewing a pull request or diff, responding to code review, evaluating someone else's patch, or preparing an upstream contribution — including mid-session, once you are already reading source, a diff, or CI config. It maps the task (build or audit mode) to the right domain and language skills (Rust, Go, C/C++, JVM, Python, JS/TS, .NET/C#, PHP, Ruby, Swift). Trigger keywords: SOTA, best practices, audit my code, security review, compliance, hardening, prod readiness, code quality, pull request, PR review, review comment, maintainer feedback, patch, diff, upstream, contribute, merge request./sota-api-designState-of-the-art API design and audit guidance (2026) covering REST/HTTP, GraphQL, gRPC, WebSockets/SSE/realtime, webhooks, versioning/evolution, and API security/operations. Use when designing or building any API surface (endpoints, schemas, protos, realtime channels, webhook senders/receivers) AND when auditing/reviewing existing APIs for correctness, evolvability, security, and operational robustness. Not for browser UI, rendering, or client-framework concerns — use sota-web-frameworks or sota-frontend-design. Trigger keywords: API, REST, GraphQL, gRPC, endpoint, websocket, SSE, realtime, WebRTC, webhook, versioning, OpenAPI, pagination, idempotency, rate limit, problem+json, protobuf, deprecation./sota-architectureState-of-the-art software and system architecture rules (2026) for both building and auditing. Use when designing, building, refactoring, or extending system architecture — boundaries, DDD, hexagonal/clean architecture, event-driven design, CQRS, sagas, messaging, caching, sharding, multi-tenancy, resilience, scalability, 12-factor/cloud-native — AND when auditing existing architecture for quality (design review, anti-patterns like distributed monolith or shared database, reliability/scalability assessment). Trigger keywords: architecture, system design, microservices, monolith, serverless, bounded context, DDD, aggregate, hexagonal, clean architecture, event-driven, Kafka, NATS, JetStream, messaging, pub/sub, stream, consumer, queue, saga, outbox, idempotency, CQRS, resilience, circuit breaker, retry, timeout, backpressure, caching, sharding, partitioning, multi-tenant, 12-factor, cloud-native, feature flag, ADR, scalability, anti-pattern, design review, architecture audit./sota-async-concurrencyState-of-the-art rules for writing and auditing asynchronous and concurrent code across runtimes (Python asyncio, JS/Node, Go, Rust, JVM). Use when building anything with async/await, threads, processes, event loops, task groups, channels, or queues — and when auditing existing code for race conditions, deadlocks, leaked tasks, blocked event loops, missing cancellation, or backpressure failures. Not for latency/throughput profiling and optimization — use sota-performance. Trigger keywords: async, await, concurrency, parallelism, threads, race condition, deadlock, event loop, channels, queues, semaphore, mutex, cancellation, timeout, backpressure, task group, goroutine, tokio, asyncio./sota-c-cppState-of-the-art C and C++ engineering rules that Claude applies when writing or auditing C/C++. Covers modern idioms (RAII, value semantics, smart pointers, C++23), memory safety (lifetimes, bounds, sanitizers, hardening flags), undefined behavior, security (SEI CERT C/C++, MISRA, integer/buffer/format-string, injection), concurrency (C/C++ memory model, atomics, data races), build/tooling/CI (CMake, clang-tidy, cppcheck, ASan/UBSan/TSan, vcpkg/Conan, supply chain), and performance. Trigger keywords - C, C++, RAII, smart pointer, unique_ptr, shared_ptr, undefined behavior, UB, buffer overflow, use-after-free, sanitizer, ASan, UBSan, TSan, valgrind, CMake, clang-tidy, cppcheck, MISRA, CERT C, memory safety, std::thread, atomics, std::move. Use for BOTH building C/C++ libraries/systems and reviewing or auditing them. Owns firmware's LANGUAGE layer; does NOT own its SYSTEMS layer — ISRs, DMA coherency, MMIO, RTOS scheduling, priority inversion, WCET, linker scripts — unowned library-wide./sota-cli-uxState-of-the-art CLI and developer-tool UX guidance (2026) covering command and flag design, output and interaction (stdout/stderr, --json, TTY detection, exit codes, prompts), runtime behavior and lifecycle (signals, dry-run, idempotency, XDG paths, completions, telemetry), and distribution (packaging, checksums, docs). Use when designing or building any command line tool, subcommand, TUI, or developer tool — in any framework (argparse, click, typer, clap, cobra, oclif, commander) — AND when auditing an existing CLI for usability, scriptability, and compatibility. Not for shell-script correctness or security — use sota-shell-scripting. Trigger keywords: CLI, command line tool, flags, subcommands, terminal output, TUI, developer tool, argparse, clap, cobra, exit code, shell completion, man page, stdin, stdout.2 plugins ship this exact skill · first indexed Oct 28, 2026
Other plugins' skills for the same job