<< All versions

Skill v1.0.0

currentAutomated scan100/100
alizainx/intelligence-systems-skills/csharp-dotnet-simd
──Details
PublishedNovember 4, 2026 at 01:03 AM
Content Hashsha256:dda4296179f69e7d...
Git SHA4446b059cc96
──Files
Files (1 file, 1.5 KB)
SKILL.md1.5 KBactive
SKILL.md · 27 lines · 1.5 KB

name: csharp-dotnet-simd id: ISS-018 token_budget: 700 chain_with: [cpp-modern-raii, fsharp-algebraic-async, java-low-latency-jvm] description: "C# 12 / .NET 8+ Span<T>/Memory<T> zero-allocation pipelines, readonly record struct, ValueTask, and Vector256<T> SIMD." metadata: version: "1.0.0"


csharp-dotnet-simd (ISS-018)

1. First-Principles Invariant

  • Hejlsberg Zero-Alloc Span Law: Process network, file, and UTF-8 payloads via Span<byte>, ReadOnlySequence<byte>, and ArrayPool<T>.Shared so hot loops trigger zero Gen0 GC collections.

2. Fast-Pass Low-Token Protocol (Web & Coding Agents)

  • Enable <Nullable>enable</Nullable> and <TreatWarningsAsErrors>true</TreatWarningsAsErrors>, pass CancellationToken to every async API, and use ConfigureAwait(false) in library code.

3. Zero-Bug & Zero-Vulnerability Guards

  1. Ban async void, .Result, and .Wait() sync-over-async deadlocks; await Task/ValueTask all the way.
  2. Await ValueTask<T> exactly once and never concurrently or after storing in a field.
  3. Return pooled buffers in finally { ArrayPool<T>.Shared.Return(buf, clearArray: true); }.
  4. Mark value-type structs readonly struct or readonly record struct to eliminate defensive struct copies on in parameters.
  5. Vectorize numerical reductions using System.Runtime.Intrinsics.Vector256<T> with scalar tail fallback.

4. Verification Gate

  • dotnet build -warnaserror /p:Nullable=enable && dotnet test
All versions