[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-dotnet-vectorization":3,"mdc-2yqo24-key":34,"related-repo-dotnet-vectorization":1070,"related-org-dotnet-vectorization":1176},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":29,"sourceUrl":32,"mdContent":33},"vectorization","optimize .NET code with SIMD vectorization","Design, implement, optimize, and review SIMD code in .NET. USE FOR: vectorizing scalar loops with TensorPrimitives, Vector64\u002F128\u002F256\u002F512, or platform hardware intrinsics; reviewing existing SIMD code, including Vector\u003CT>, for contract equivalence, tail handling, memory safety, portability, fallbacks, and measured performance. DO NOT USE FOR: performance work unrelated to SIMD or vectorization.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"dotnet",".NET (Microsoft)","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fdotnet.png",[12,16,19],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":17,"slug":18,"type":15},".NET","net",{"name":20,"slug":21,"type":15},"Engineering","engineering",5232,"https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills","2026-08-30T08:53:31.275119","MIT",392,[28],"agent-skills",{"repoUrl":23,"stars":22,"forks":26,"topics":30,"description":31},[28],"Repository for skills to assist AI coding agents with .NET and C#","https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills\u002Ftree\u002FHEAD\u002Fplugins\u002Fdotnet-advanced\u002Fskills\u002Fvectorization","---\nname: vectorization\ndescription: >\n  Design, implement, optimize, and review SIMD code in .NET.\n  USE FOR: vectorizing scalar loops with TensorPrimitives,\n  Vector64\u002F128\u002F256\u002F512, or platform hardware intrinsics; reviewing existing SIMD\n  code, including Vector\u003CT>, for contract equivalence, tail handling, memory\n  safety, portability, fallbacks, and measured performance. DO NOT USE FOR:\n  performance work unrelated to SIMD or vectorization.\nlicense: MIT\n---\n\n# .NET SIMD vectorization\n\nProduce a portable optimization that preserves the scalar contract, remains memory-safe at every\nlength, and earns its complexity with measured results. **Read the official\n[SIMD and hardware-intrinsics guidance](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fstandard\u002Fsimd) first**\nand follow its comprehensive implementation templates. In particular, use its self-contained\nper-width dispatch, dedicated small-input handling, loop, and remainder shapes rather than reducing\nthem to a chain of width checks. This skill supplies the decision rules and validation checks to\napply while changing real code.\n\n## Inputs and prerequisites\n\nDiscover these from the repository before asking the user:\n\n| Input | Required | What to establish |\n| --- | --- | --- |\n| Scalar implementation and tests | Yes | Existing contract, representative call sites, and supported overlap |\n| Target frameworks and platforms | Yes | Available SIMD APIs and architectures that must behave consistently |\n| Build and test workflow | Yes | The repository's normal commands and how to launch separate test processes |\n| Representative workload or benchmark | For optimization | Typical input sizes and the baseline to beat |\n\nDo not add a package merely because an API exists there. First check the target framework and the\nproject's existing dependency\u002Fversioning policy.\n\n## Core rules\n\n1. **Use the highest-level API that matches the contract, then stop.** `Span\u003CT>` and `string`\n   operations, `TensorPrimitives`, and tensor types already accelerate many operations. LINQ\n   reductions such as `Sum`, `Min`, `Max`, and `Average` can also accelerate when the source exposes\n   its underlying span. Verify empty-input and floating-point behavior rather than assuming similarly\n   named operations are interchangeable. Once an existing API preserves the contract, use it instead\n   of continuing into handwritten SIMD. Before writing an explicit loop, name the framework APIs\n   considered and why none applies. Fixed-shape `System.Numerics` types remain appropriate for\n   graphics and similar domains.\n2. **Start new explicit SIMD loops with `Vector128\u003CT>`.** It is accelerated across the broadest\n   hardware set. Add wider fixed-width paths only when measurements justify them.\n3. **Keep platforms consistent.** Prefer cross-platform operations on the fixed-width vector types;\n   they lower to the appropriate target instructions. For example,\n   `(vector & mask) == Vector128\u003Cbyte>.Zero` becomes `ptest` on x86\u002Fx64. Use\n   architecture-specific intrinsics only for a measured gap, guard them with `IsSupported`, and\n   retain equivalent portable or scalar behavior.\n4. **Read `IsHardwareAccelerated`, `IsSupported`, and `Count` directly.** The JIT treats them as\n   constants, so caching them adds no value and obscures which branches disappear.\n5. **Prefer operators where they are clear.** Parenthesize expressions that mix bitwise and\n   comparison operators so precedence is explicit.\n\nIf the task is review-only, do not rewrite the code. Report correctness and memory-safety defects\nbefore performance opportunities.\n\n## Authoring checklist\n\n- **Contract:** identify behavior for empty and short inputs, overlap, overflow, NaN, signed zero,\n  ordering, and exceptions before changing the implementation.\n- **Framework gate:** inspect the target framework and existing package references, then compile or\n  probe the highest-level candidate API with the required edge cases. A small contract adapter, such\n  as preserving special empty-input behavior, does not justify reimplementing the operation. If the\n  API preserves the contract, use it and stop; do not claim it is unavailable without checking.\n- **Structure:** for new explicit SIMD, implement `Vector128\u003CT>` and scalar first. Only after\n  measurements justify wider paths, check `Vector512\u003CT>`, then `Vector256\u003CT>`, optional `Vector\u003CT>`,\n  `Vector128\u003CT>`, and finally scalar. Omit paths the implementation does not need. Each outer\n  fixed-width guard checks only its `IsHardwareAccelerated` property and, for generic element types,\n  `IsSupported`. Inside that block, run the width-specific helper when the input has at least\n  `Count` elements; otherwise run a dedicated small-input helper, then return. Do not put the length\n  check in the outer guard and fall through to repeat dispatch at narrower widths. Keeping each\n  supported-width block self-contained lets the JIT remove unsupported blocks and avoids redundant\n  work on common small inputs.\n- **Loads and stores:** prefer span-based `Vector128.Create(span)` and `CopyTo`; the JIT keeps them\n  efficient and they require no pinning or reference arithmetic. Unsafe loads and stores are largely\n  unnecessary. When a path genuinely must walk a buffer by managed reference, use the element-offset\n  `LoadUnsafe(ref T, nuint)` and `StoreUnsafe` overloads rather than pointers or manually advanced\n  references.\n- **Empty inputs:** in a reference-based path, obtain the starting reference with\n  `MemoryMarshal.GetReference(span)` or `MemoryMarshal.GetArrayDataReference(array)`, not by indexing\n  element `0`.\n- **Unsupported element types:** the fixed-width vectors support primitive numeric element types,\n  not `char` or `bool`. Reinterpret with `MemoryMarshal.Cast` or `As\u003CTFrom, TTo>`; reinterpretation\n  changes only the type, not the bits. Keep Boolean data as `0` or `1` and characters as valid\n  UTF-16, normalizing results before storing when necessary.\n- **Offsets:** prove the input contains a full vector before subtracting `Count` or converting an\n  index to `nuint`; otherwise a negative value becomes a huge unsigned offset.\n- **Managed references:** do not form references before the start or past the end of a span,\n  including a one-past-end reference. The runtime permits a non-dereferenced managed pointer exactly\n  one past an object or array, but this guidance intentionally prohibits the pattern because it is\n  fragile and easy to misuse. Keep the base reference in range and express traversal with an element\n  offset.\n- **Remainders:** cover every length, including `0`, `Count - 1`, `Count`, `Count + 1`, and\n  nonmultiples of each width. Once the input contains a full vector, keep the tail vectorized by\n  reprocessing the last full vector. An idempotent operation can fold that overlap in directly. A\n  non-idempotent operation must use `ConditionalSelect` to replace repeated lanes with the\n  operation's identity before folding them in. This is the JIT-recognized general pattern; it can\n  reduce a zero-identity selection to a bitwise mask while retaining broader optimization\n  opportunities. For in-place transforms, preserve the original tail values before overlapping\n  stores and write only valid results.\n- **Buffer overlap:** choose a traversal direction or staging strategy that prevents stores from\n  corrupting values not yet loaded.\n- **Numeric behavior:** account for floating-point reassociation, NaN and signed-zero semantics,\n  checked or unchecked integer overflow, and endianness where the algorithm depends on byte order.\n  `Native` and `Estimate` operations can intentionally relax precision or IEEE edge-case behavior;\n  use them only when the contract permits it and measurements justify them.\n\nThe official guidance contains the complete dispatch, small-input, unrolling, and remainder\ntemplates; use those for the full implementation. The following excerpt illustrates only the inner\nsafe `Vector128\u003CT>` loop for an in-place elementwise transform, after its self-contained dispatch\nblock has established at least one full vector. `Transform` represents the operation being\nimplemented:\n\n```csharp\nSpan\u003Cint> tail = data.Slice(data.Length - Vector128\u003Cint>.Count);\nVector128\u003Cint> end = Vector128.Create\u003Cint>(tail);\nSpan\u003Cint> remaining = data;\n\nwhile (remaining.Length >= Vector128\u003Cint>.Count)\n{\n    Vector128\u003Cint> values = Vector128.Create\u003Cint>(remaining);\n    Transform(values).CopyTo(remaining);\n    remaining = remaining.Slice(Vector128\u003Cint>.Count);\n}\n\nif (!remaining.IsEmpty)\n{\n    Transform(end).CopyTo(tail);\n}\n```\n\nThe early `end` load preserves original values before overlapping stores. For a read-only reduction,\nload the same final span after the main loop and use `ConditionalSelect` to replace already-processed\nlanes with the operation's identity. Do not substitute `LoadUnsafe`\u002F`StoreUnsafe` or a scalar\nepilogue merely to avoid span bounds checks.\n\n## Testing checklist\n\n- Compare the optimized implementation with the scalar contract across boundary lengths,\n  randomized values, empty inputs, supported overlap, and numeric edge cases. Cover every\n  implemented width and the scalar path with inputs both large enough and too small to benefit.\n- Exercise every implemented width and the scalar fallback in separate processes. On x86\u002Fx64\n  CoreCLR, `DOTNET_EnableAVX2=0` disables AVX2 and `DOTNET_EnableHWIntrinsic=0` disables hardware\n  intrinsics. Use the repository's normal test command and do not change these process-wide\n  settings inside a unit test. These settings do not change code already compiled as ReadyToRun or\n  ahead of time, so confirm the target code is JIT-compiled when using them to force a path.\n- For unsafe loads and stores, use guard-page or equivalent boundary tests when available. Put the\n  inaccessible page after the buffer for forward iteration and before it for backwards iteration,\n  and include nonmultiple lengths. An ordinary array allocation does not reliably expose an\n  out-of-bounds read.\n\n## Benchmarking\n\nUse BenchmarkDotNet to measure representative small and large inputs before keeping the added\ncomplexity. Compare scalar, `Vector128\u003CT>`, and each wider implemented path in the same run. Small\ninputs can be slower because setup dominates, and speedups are rarely the theoretical vector-width\nmultiple because memory throughput, alignment, and latency still apply. Report throughput or time\nwith noise context and, when relevant, generated code size or instruction counts. Control allocation\nalignment for stable measurements or randomize it to observe the distribution. A wider vector is\nnot automatically faster.\n\nIf the project cannot target the required framework, run the relevant architecture, or execute the\nfallback configuration, state exactly which path remains unverified. Do not claim success from a\ndefault-hardware test alone.\n\n## Completion contract\n\n- **Authoring:** leave the scalar contract covered by tests; identify the framework or SIMD layer\n  selected; report measurements for the representative workload; name any architecture or fallback\n  path that could not be exercised.\n- **Review:** report only concrete findings, ordered by correctness, memory safety, portability,\n  tests, then performance evidence. If none remain, say so directly.\n- Do not call an optimization complete when it only builds, only passes on the current machine, or\n  has no comparison against the scalar baseline.\n\n## Review checklist\n\nReview in this order:\n\n1. Scalar-contract equivalence, including signed zero, NaN, overflow, and relevant endianness\n2. Reuse of an existing accelerated framework API\n3. Tail correctness for idempotent versus non-idempotent work\n4. Memory safety, unsigned offset arithmetic, empty inputs, and overlapping buffers\n5. Portable dispatch and behaviorally equivalent fallbacks\n6. Tests that force each width and the scalar path\n7. Benchmarks that justify explicit SIMD and additional widths\n",{"data":35,"body":36},{"name":4,"description":6,"license":25},{"type":37,"children":38},"root",[39,48,73,80,85,188,193,199,371,376,382,717,737,883,918,924,958,964,976,981,987,1015,1021,1026,1064],{"type":40,"tag":41,"props":42,"children":44},"element","h1",{"id":43},"net-simd-vectorization",[45],{"type":46,"value":47},"text",".NET SIMD vectorization",{"type":40,"tag":49,"props":50,"children":51},"p",{},[52,54,71],{"type":46,"value":53},"Produce a portable optimization that preserves the scalar contract, remains memory-safe at every\nlength, and earns its complexity with measured results. ",{"type":40,"tag":55,"props":56,"children":57},"strong",{},[58,60,69],{"type":46,"value":59},"Read the official\n",{"type":40,"tag":61,"props":62,"children":66},"a",{"href":63,"rel":64},"https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fstandard\u002Fsimd",[65],"nofollow",[67],{"type":46,"value":68},"SIMD and hardware-intrinsics guidance",{"type":46,"value":70}," first",{"type":46,"value":72},"\nand follow its comprehensive implementation templates. In particular, use its self-contained\nper-width dispatch, dedicated small-input handling, loop, and remainder shapes rather than reducing\nthem to a chain of width checks. This skill supplies the decision rules and validation checks to\napply while changing real code.",{"type":40,"tag":74,"props":75,"children":77},"h2",{"id":76},"inputs-and-prerequisites",[78],{"type":46,"value":79},"Inputs and prerequisites",{"type":40,"tag":49,"props":81,"children":82},{},[83],{"type":46,"value":84},"Discover these from the repository before asking the user:",{"type":40,"tag":86,"props":87,"children":88},"table",{},[89,113],{"type":40,"tag":90,"props":91,"children":92},"thead",{},[93],{"type":40,"tag":94,"props":95,"children":96},"tr",{},[97,103,108],{"type":40,"tag":98,"props":99,"children":100},"th",{},[101],{"type":46,"value":102},"Input",{"type":40,"tag":98,"props":104,"children":105},{},[106],{"type":46,"value":107},"Required",{"type":40,"tag":98,"props":109,"children":110},{},[111],{"type":46,"value":112},"What to establish",{"type":40,"tag":114,"props":115,"children":116},"tbody",{},[117,136,153,170],{"type":40,"tag":94,"props":118,"children":119},{},[120,126,131],{"type":40,"tag":121,"props":122,"children":123},"td",{},[124],{"type":46,"value":125},"Scalar implementation and tests",{"type":40,"tag":121,"props":127,"children":128},{},[129],{"type":46,"value":130},"Yes",{"type":40,"tag":121,"props":132,"children":133},{},[134],{"type":46,"value":135},"Existing contract, representative call sites, and supported overlap",{"type":40,"tag":94,"props":137,"children":138},{},[139,144,148],{"type":40,"tag":121,"props":140,"children":141},{},[142],{"type":46,"value":143},"Target frameworks and platforms",{"type":40,"tag":121,"props":145,"children":146},{},[147],{"type":46,"value":130},{"type":40,"tag":121,"props":149,"children":150},{},[151],{"type":46,"value":152},"Available SIMD APIs and architectures that must behave consistently",{"type":40,"tag":94,"props":154,"children":155},{},[156,161,165],{"type":40,"tag":121,"props":157,"children":158},{},[159],{"type":46,"value":160},"Build and test workflow",{"type":40,"tag":121,"props":162,"children":163},{},[164],{"type":46,"value":130},{"type":40,"tag":121,"props":166,"children":167},{},[168],{"type":46,"value":169},"The repository's normal commands and how to launch separate test processes",{"type":40,"tag":94,"props":171,"children":172},{},[173,178,183],{"type":40,"tag":121,"props":174,"children":175},{},[176],{"type":46,"value":177},"Representative workload or benchmark",{"type":40,"tag":121,"props":179,"children":180},{},[181],{"type":46,"value":182},"For optimization",{"type":40,"tag":121,"props":184,"children":185},{},[186],{"type":46,"value":187},"Typical input sizes and the baseline to beat",{"type":40,"tag":49,"props":189,"children":190},{},[191],{"type":46,"value":192},"Do not add a package merely because an API exists there. First check the target framework and the\nproject's existing dependency\u002Fversioning policy.",{"type":40,"tag":74,"props":194,"children":196},{"id":195},"core-rules",[197],{"type":46,"value":198},"Core rules",{"type":40,"tag":200,"props":201,"children":202},"ol",{},[203,278,296,330,361],{"type":40,"tag":204,"props":205,"children":206},"li",{},[207,212,214,221,223,229,231,237,239,245,247,253,254,260,262,268,270,276],{"type":40,"tag":55,"props":208,"children":209},{},[210],{"type":46,"value":211},"Use the highest-level API that matches the contract, then stop.",{"type":46,"value":213}," ",{"type":40,"tag":215,"props":216,"children":218},"code",{"className":217},[],[219],{"type":46,"value":220},"Span\u003CT>",{"type":46,"value":222}," and ",{"type":40,"tag":215,"props":224,"children":226},{"className":225},[],[227],{"type":46,"value":228},"string",{"type":46,"value":230},"\noperations, ",{"type":40,"tag":215,"props":232,"children":234},{"className":233},[],[235],{"type":46,"value":236},"TensorPrimitives",{"type":46,"value":238},", and tensor types already accelerate many operations. LINQ\nreductions such as ",{"type":40,"tag":215,"props":240,"children":242},{"className":241},[],[243],{"type":46,"value":244},"Sum",{"type":46,"value":246},", ",{"type":40,"tag":215,"props":248,"children":250},{"className":249},[],[251],{"type":46,"value":252},"Min",{"type":46,"value":246},{"type":40,"tag":215,"props":255,"children":257},{"className":256},[],[258],{"type":46,"value":259},"Max",{"type":46,"value":261},", and ",{"type":40,"tag":215,"props":263,"children":265},{"className":264},[],[266],{"type":46,"value":267},"Average",{"type":46,"value":269}," can also accelerate when the source exposes\nits underlying span. Verify empty-input and floating-point behavior rather than assuming similarly\nnamed operations are interchangeable. Once an existing API preserves the contract, use it instead\nof continuing into handwritten SIMD. Before writing an explicit loop, name the framework APIs\nconsidered and why none applies. Fixed-shape ",{"type":40,"tag":215,"props":271,"children":273},{"className":272},[],[274],{"type":46,"value":275},"System.Numerics",{"type":46,"value":277}," types remain appropriate for\ngraphics and similar domains.",{"type":40,"tag":204,"props":279,"children":280},{},[281,294],{"type":40,"tag":55,"props":282,"children":283},{},[284,286,292],{"type":46,"value":285},"Start new explicit SIMD loops with ",{"type":40,"tag":215,"props":287,"children":289},{"className":288},[],[290],{"type":46,"value":291},"Vector128\u003CT>",{"type":46,"value":293},".",{"type":46,"value":295}," It is accelerated across the broadest\nhardware set. Add wider fixed-width paths only when measurements justify them.",{"type":40,"tag":204,"props":297,"children":298},{},[299,304,306,312,314,320,322,328],{"type":40,"tag":55,"props":300,"children":301},{},[302],{"type":46,"value":303},"Keep platforms consistent.",{"type":46,"value":305}," Prefer cross-platform operations on the fixed-width vector types;\nthey lower to the appropriate target instructions. For example,\n",{"type":40,"tag":215,"props":307,"children":309},{"className":308},[],[310],{"type":46,"value":311},"(vector & mask) == Vector128\u003Cbyte>.Zero",{"type":46,"value":313}," becomes ",{"type":40,"tag":215,"props":315,"children":317},{"className":316},[],[318],{"type":46,"value":319},"ptest",{"type":46,"value":321}," on x86\u002Fx64. Use\narchitecture-specific intrinsics only for a measured gap, guard them with ",{"type":40,"tag":215,"props":323,"children":325},{"className":324},[],[326],{"type":46,"value":327},"IsSupported",{"type":46,"value":329},", and\nretain equivalent portable or scalar behavior.",{"type":40,"tag":204,"props":331,"children":332},{},[333,359],{"type":40,"tag":55,"props":334,"children":335},{},[336,338,344,345,350,351,357],{"type":46,"value":337},"Read ",{"type":40,"tag":215,"props":339,"children":341},{"className":340},[],[342],{"type":46,"value":343},"IsHardwareAccelerated",{"type":46,"value":246},{"type":40,"tag":215,"props":346,"children":348},{"className":347},[],[349],{"type":46,"value":327},{"type":46,"value":261},{"type":40,"tag":215,"props":352,"children":354},{"className":353},[],[355],{"type":46,"value":356},"Count",{"type":46,"value":358}," directly.",{"type":46,"value":360}," The JIT treats them as\nconstants, so caching them adds no value and obscures which branches disappear.",{"type":40,"tag":204,"props":362,"children":363},{},[364,369],{"type":40,"tag":55,"props":365,"children":366},{},[367],{"type":46,"value":368},"Prefer operators where they are clear.",{"type":46,"value":370}," Parenthesize expressions that mix bitwise and\ncomparison operators so precedence is explicit.",{"type":40,"tag":49,"props":372,"children":373},{},[374],{"type":46,"value":375},"If the task is review-only, do not rewrite the code. Report correctness and memory-safety defects\nbefore performance opportunities.",{"type":40,"tag":74,"props":377,"children":379},{"id":378},"authoring-checklist",[380],{"type":46,"value":381},"Authoring checklist",{"type":40,"tag":383,"props":384,"children":385},"ul",{},[386,396,406,475,515,548,602,627,637,682,692],{"type":40,"tag":204,"props":387,"children":388},{},[389,394],{"type":40,"tag":55,"props":390,"children":391},{},[392],{"type":46,"value":393},"Contract:",{"type":46,"value":395}," identify behavior for empty and short inputs, overlap, overflow, NaN, signed zero,\nordering, and exceptions before changing the implementation.",{"type":40,"tag":204,"props":397,"children":398},{},[399,404],{"type":40,"tag":55,"props":400,"children":401},{},[402],{"type":46,"value":403},"Framework gate:",{"type":46,"value":405}," inspect the target framework and existing package references, then compile or\nprobe the highest-level candidate API with the required edge cases. A small contract adapter, such\nas preserving special empty-input behavior, does not justify reimplementing the operation. If the\nAPI preserves the contract, use it and stop; do not claim it is unavailable without checking.",{"type":40,"tag":204,"props":407,"children":408},{},[409,414,416,421,423,429,431,437,439,445,447,452,454,459,461,466,468,473],{"type":40,"tag":55,"props":410,"children":411},{},[412],{"type":46,"value":413},"Structure:",{"type":46,"value":415}," for new explicit SIMD, implement ",{"type":40,"tag":215,"props":417,"children":419},{"className":418},[],[420],{"type":46,"value":291},{"type":46,"value":422}," and scalar first. Only after\nmeasurements justify wider paths, check ",{"type":40,"tag":215,"props":424,"children":426},{"className":425},[],[427],{"type":46,"value":428},"Vector512\u003CT>",{"type":46,"value":430},", then ",{"type":40,"tag":215,"props":432,"children":434},{"className":433},[],[435],{"type":46,"value":436},"Vector256\u003CT>",{"type":46,"value":438},", optional ",{"type":40,"tag":215,"props":440,"children":442},{"className":441},[],[443],{"type":46,"value":444},"Vector\u003CT>",{"type":46,"value":446},",\n",{"type":40,"tag":215,"props":448,"children":450},{"className":449},[],[451],{"type":46,"value":291},{"type":46,"value":453},", and finally scalar. Omit paths the implementation does not need. Each outer\nfixed-width guard checks only its ",{"type":40,"tag":215,"props":455,"children":457},{"className":456},[],[458],{"type":46,"value":343},{"type":46,"value":460}," property and, for generic element types,\n",{"type":40,"tag":215,"props":462,"children":464},{"className":463},[],[465],{"type":46,"value":327},{"type":46,"value":467},". Inside that block, run the width-specific helper when the input has at least\n",{"type":40,"tag":215,"props":469,"children":471},{"className":470},[],[472],{"type":46,"value":356},{"type":46,"value":474}," elements; otherwise run a dedicated small-input helper, then return. Do not put the length\ncheck in the outer guard and fall through to repeat dispatch at narrower widths. Keeping each\nsupported-width block self-contained lets the JIT remove unsupported blocks and avoids redundant\nwork on common small inputs.",{"type":40,"tag":204,"props":476,"children":477},{},[478,483,485,491,492,498,500,506,507,513],{"type":40,"tag":55,"props":479,"children":480},{},[481],{"type":46,"value":482},"Loads and stores:",{"type":46,"value":484}," prefer span-based ",{"type":40,"tag":215,"props":486,"children":488},{"className":487},[],[489],{"type":46,"value":490},"Vector128.Create(span)",{"type":46,"value":222},{"type":40,"tag":215,"props":493,"children":495},{"className":494},[],[496],{"type":46,"value":497},"CopyTo",{"type":46,"value":499},"; the JIT keeps them\nefficient and they require no pinning or reference arithmetic. Unsafe loads and stores are largely\nunnecessary. When a path genuinely must walk a buffer by managed reference, use the element-offset\n",{"type":40,"tag":215,"props":501,"children":503},{"className":502},[],[504],{"type":46,"value":505},"LoadUnsafe(ref T, nuint)",{"type":46,"value":222},{"type":40,"tag":215,"props":508,"children":510},{"className":509},[],[511],{"type":46,"value":512},"StoreUnsafe",{"type":46,"value":514}," overloads rather than pointers or manually advanced\nreferences.",{"type":40,"tag":204,"props":516,"children":517},{},[518,523,525,531,533,539,541,547],{"type":40,"tag":55,"props":519,"children":520},{},[521],{"type":46,"value":522},"Empty inputs:",{"type":46,"value":524}," in a reference-based path, obtain the starting reference with\n",{"type":40,"tag":215,"props":526,"children":528},{"className":527},[],[529],{"type":46,"value":530},"MemoryMarshal.GetReference(span)",{"type":46,"value":532}," or ",{"type":40,"tag":215,"props":534,"children":536},{"className":535},[],[537],{"type":46,"value":538},"MemoryMarshal.GetArrayDataReference(array)",{"type":46,"value":540},", not by indexing\nelement ",{"type":40,"tag":215,"props":542,"children":544},{"className":543},[],[545],{"type":46,"value":546},"0",{"type":46,"value":293},{"type":40,"tag":204,"props":549,"children":550},{},[551,556,558,564,565,571,573,579,580,586,588,593,594,600],{"type":40,"tag":55,"props":552,"children":553},{},[554],{"type":46,"value":555},"Unsupported element types:",{"type":46,"value":557}," the fixed-width vectors support primitive numeric element types,\nnot ",{"type":40,"tag":215,"props":559,"children":561},{"className":560},[],[562],{"type":46,"value":563},"char",{"type":46,"value":532},{"type":40,"tag":215,"props":566,"children":568},{"className":567},[],[569],{"type":46,"value":570},"bool",{"type":46,"value":572},". Reinterpret with ",{"type":40,"tag":215,"props":574,"children":576},{"className":575},[],[577],{"type":46,"value":578},"MemoryMarshal.Cast",{"type":46,"value":532},{"type":40,"tag":215,"props":581,"children":583},{"className":582},[],[584],{"type":46,"value":585},"As\u003CTFrom, TTo>",{"type":46,"value":587},"; reinterpretation\nchanges only the type, not the bits. Keep Boolean data as ",{"type":40,"tag":215,"props":589,"children":591},{"className":590},[],[592],{"type":46,"value":546},{"type":46,"value":532},{"type":40,"tag":215,"props":595,"children":597},{"className":596},[],[598],{"type":46,"value":599},"1",{"type":46,"value":601}," and characters as valid\nUTF-16, normalizing results before storing when necessary.",{"type":40,"tag":204,"props":603,"children":604},{},[605,610,612,617,619,625],{"type":40,"tag":55,"props":606,"children":607},{},[608],{"type":46,"value":609},"Offsets:",{"type":46,"value":611}," prove the input contains a full vector before subtracting ",{"type":40,"tag":215,"props":613,"children":615},{"className":614},[],[616],{"type":46,"value":356},{"type":46,"value":618}," or converting an\nindex to ",{"type":40,"tag":215,"props":620,"children":622},{"className":621},[],[623],{"type":46,"value":624},"nuint",{"type":46,"value":626},"; otherwise a negative value becomes a huge unsigned offset.",{"type":40,"tag":204,"props":628,"children":629},{},[630,635],{"type":40,"tag":55,"props":631,"children":632},{},[633],{"type":46,"value":634},"Managed references:",{"type":46,"value":636}," do not form references before the start or past the end of a span,\nincluding a one-past-end reference. The runtime permits a non-dereferenced managed pointer exactly\none past an object or array, but this guidance intentionally prohibits the pattern because it is\nfragile and easy to misuse. Keep the base reference in range and express traversal with an element\noffset.",{"type":40,"tag":204,"props":638,"children":639},{},[640,645,647,652,653,659,660,665,666,672,674,680],{"type":40,"tag":55,"props":641,"children":642},{},[643],{"type":46,"value":644},"Remainders:",{"type":46,"value":646}," cover every length, including ",{"type":40,"tag":215,"props":648,"children":650},{"className":649},[],[651],{"type":46,"value":546},{"type":46,"value":246},{"type":40,"tag":215,"props":654,"children":656},{"className":655},[],[657],{"type":46,"value":658},"Count - 1",{"type":46,"value":246},{"type":40,"tag":215,"props":661,"children":663},{"className":662},[],[664],{"type":46,"value":356},{"type":46,"value":246},{"type":40,"tag":215,"props":667,"children":669},{"className":668},[],[670],{"type":46,"value":671},"Count + 1",{"type":46,"value":673},", and\nnonmultiples of each width. Once the input contains a full vector, keep the tail vectorized by\nreprocessing the last full vector. An idempotent operation can fold that overlap in directly. A\nnon-idempotent operation must use ",{"type":40,"tag":215,"props":675,"children":677},{"className":676},[],[678],{"type":46,"value":679},"ConditionalSelect",{"type":46,"value":681}," to replace repeated lanes with the\noperation's identity before folding them in. This is the JIT-recognized general pattern; it can\nreduce a zero-identity selection to a bitwise mask while retaining broader optimization\nopportunities. For in-place transforms, preserve the original tail values before overlapping\nstores and write only valid results.",{"type":40,"tag":204,"props":683,"children":684},{},[685,690],{"type":40,"tag":55,"props":686,"children":687},{},[688],{"type":46,"value":689},"Buffer overlap:",{"type":46,"value":691}," choose a traversal direction or staging strategy that prevents stores from\ncorrupting values not yet loaded.",{"type":40,"tag":204,"props":693,"children":694},{},[695,700,702,708,709,715],{"type":40,"tag":55,"props":696,"children":697},{},[698],{"type":46,"value":699},"Numeric behavior:",{"type":46,"value":701}," account for floating-point reassociation, NaN and signed-zero semantics,\nchecked or unchecked integer overflow, and endianness where the algorithm depends on byte order.\n",{"type":40,"tag":215,"props":703,"children":705},{"className":704},[],[706],{"type":46,"value":707},"Native",{"type":46,"value":222},{"type":40,"tag":215,"props":710,"children":712},{"className":711},[],[713],{"type":46,"value":714},"Estimate",{"type":46,"value":716}," operations can intentionally relax precision or IEEE edge-case behavior;\nuse them only when the contract permits it and measurements justify them.",{"type":40,"tag":49,"props":718,"children":719},{},[720,722,727,729,735],{"type":46,"value":721},"The official guidance contains the complete dispatch, small-input, unrolling, and remainder\ntemplates; use those for the full implementation. The following excerpt illustrates only the inner\nsafe ",{"type":40,"tag":215,"props":723,"children":725},{"className":724},[],[726],{"type":46,"value":291},{"type":46,"value":728}," loop for an in-place elementwise transform, after its self-contained dispatch\nblock has established at least one full vector. ",{"type":40,"tag":215,"props":730,"children":732},{"className":731},[],[733],{"type":46,"value":734},"Transform",{"type":46,"value":736}," represents the operation being\nimplemented:",{"type":40,"tag":738,"props":739,"children":744},"pre",{"className":740,"code":741,"language":742,"meta":743,"style":743},"language-csharp shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Span\u003Cint> tail = data.Slice(data.Length - Vector128\u003Cint>.Count);\nVector128\u003Cint> end = Vector128.Create\u003Cint>(tail);\nSpan\u003Cint> remaining = data;\n\nwhile (remaining.Length >= Vector128\u003Cint>.Count)\n{\n    Vector128\u003Cint> values = Vector128.Create\u003Cint>(remaining);\n    Transform(values).CopyTo(remaining);\n    remaining = remaining.Slice(Vector128\u003Cint>.Count);\n}\n\nif (!remaining.IsEmpty)\n{\n    Transform(end).CopyTo(tail);\n}\n","csharp","",[745],{"type":40,"tag":215,"props":746,"children":747},{"__ignoreMap":743},[748,759,768,777,787,796,805,814,823,832,841,849,858,866,875],{"type":40,"tag":749,"props":750,"children":753},"span",{"class":751,"line":752},"line",1,[754],{"type":40,"tag":749,"props":755,"children":756},{},[757],{"type":46,"value":758},"Span\u003Cint> tail = data.Slice(data.Length - Vector128\u003Cint>.Count);\n",{"type":40,"tag":749,"props":760,"children":762},{"class":751,"line":761},2,[763],{"type":40,"tag":749,"props":764,"children":765},{},[766],{"type":46,"value":767},"Vector128\u003Cint> end = Vector128.Create\u003Cint>(tail);\n",{"type":40,"tag":749,"props":769,"children":771},{"class":751,"line":770},3,[772],{"type":40,"tag":749,"props":773,"children":774},{},[775],{"type":46,"value":776},"Span\u003Cint> remaining = data;\n",{"type":40,"tag":749,"props":778,"children":780},{"class":751,"line":779},4,[781],{"type":40,"tag":749,"props":782,"children":784},{"emptyLinePlaceholder":783},true,[785],{"type":46,"value":786},"\n",{"type":40,"tag":749,"props":788,"children":790},{"class":751,"line":789},5,[791],{"type":40,"tag":749,"props":792,"children":793},{},[794],{"type":46,"value":795},"while (remaining.Length >= Vector128\u003Cint>.Count)\n",{"type":40,"tag":749,"props":797,"children":799},{"class":751,"line":798},6,[800],{"type":40,"tag":749,"props":801,"children":802},{},[803],{"type":46,"value":804},"{\n",{"type":40,"tag":749,"props":806,"children":808},{"class":751,"line":807},7,[809],{"type":40,"tag":749,"props":810,"children":811},{},[812],{"type":46,"value":813},"    Vector128\u003Cint> values = Vector128.Create\u003Cint>(remaining);\n",{"type":40,"tag":749,"props":815,"children":817},{"class":751,"line":816},8,[818],{"type":40,"tag":749,"props":819,"children":820},{},[821],{"type":46,"value":822},"    Transform(values).CopyTo(remaining);\n",{"type":40,"tag":749,"props":824,"children":826},{"class":751,"line":825},9,[827],{"type":40,"tag":749,"props":828,"children":829},{},[830],{"type":46,"value":831},"    remaining = remaining.Slice(Vector128\u003Cint>.Count);\n",{"type":40,"tag":749,"props":833,"children":835},{"class":751,"line":834},10,[836],{"type":40,"tag":749,"props":837,"children":838},{},[839],{"type":46,"value":840},"}\n",{"type":40,"tag":749,"props":842,"children":844},{"class":751,"line":843},11,[845],{"type":40,"tag":749,"props":846,"children":847},{"emptyLinePlaceholder":783},[848],{"type":46,"value":786},{"type":40,"tag":749,"props":850,"children":852},{"class":751,"line":851},12,[853],{"type":40,"tag":749,"props":854,"children":855},{},[856],{"type":46,"value":857},"if (!remaining.IsEmpty)\n",{"type":40,"tag":749,"props":859,"children":861},{"class":751,"line":860},13,[862],{"type":40,"tag":749,"props":863,"children":864},{},[865],{"type":46,"value":804},{"type":40,"tag":749,"props":867,"children":869},{"class":751,"line":868},14,[870],{"type":40,"tag":749,"props":871,"children":872},{},[873],{"type":46,"value":874},"    Transform(end).CopyTo(tail);\n",{"type":40,"tag":749,"props":876,"children":878},{"class":751,"line":877},15,[879],{"type":40,"tag":749,"props":880,"children":881},{},[882],{"type":46,"value":840},{"type":40,"tag":49,"props":884,"children":885},{},[886,888,894,896,901,903,909,911,916],{"type":46,"value":887},"The early ",{"type":40,"tag":215,"props":889,"children":891},{"className":890},[],[892],{"type":46,"value":893},"end",{"type":46,"value":895}," load preserves original values before overlapping stores. For a read-only reduction,\nload the same final span after the main loop and use ",{"type":40,"tag":215,"props":897,"children":899},{"className":898},[],[900],{"type":46,"value":679},{"type":46,"value":902}," to replace already-processed\nlanes with the operation's identity. Do not substitute ",{"type":40,"tag":215,"props":904,"children":906},{"className":905},[],[907],{"type":46,"value":908},"LoadUnsafe",{"type":46,"value":910},"\u002F",{"type":40,"tag":215,"props":912,"children":914},{"className":913},[],[915],{"type":46,"value":512},{"type":46,"value":917}," or a scalar\nepilogue merely to avoid span bounds checks.",{"type":40,"tag":74,"props":919,"children":921},{"id":920},"testing-checklist",[922],{"type":46,"value":923},"Testing checklist",{"type":40,"tag":383,"props":925,"children":926},{},[927,932,953],{"type":40,"tag":204,"props":928,"children":929},{},[930],{"type":46,"value":931},"Compare the optimized implementation with the scalar contract across boundary lengths,\nrandomized values, empty inputs, supported overlap, and numeric edge cases. Cover every\nimplemented width and the scalar path with inputs both large enough and too small to benefit.",{"type":40,"tag":204,"props":933,"children":934},{},[935,937,943,945,951],{"type":46,"value":936},"Exercise every implemented width and the scalar fallback in separate processes. On x86\u002Fx64\nCoreCLR, ",{"type":40,"tag":215,"props":938,"children":940},{"className":939},[],[941],{"type":46,"value":942},"DOTNET_EnableAVX2=0",{"type":46,"value":944}," disables AVX2 and ",{"type":40,"tag":215,"props":946,"children":948},{"className":947},[],[949],{"type":46,"value":950},"DOTNET_EnableHWIntrinsic=0",{"type":46,"value":952}," disables hardware\nintrinsics. Use the repository's normal test command and do not change these process-wide\nsettings inside a unit test. These settings do not change code already compiled as ReadyToRun or\nahead of time, so confirm the target code is JIT-compiled when using them to force a path.",{"type":40,"tag":204,"props":954,"children":955},{},[956],{"type":46,"value":957},"For unsafe loads and stores, use guard-page or equivalent boundary tests when available. Put the\ninaccessible page after the buffer for forward iteration and before it for backwards iteration,\nand include nonmultiple lengths. An ordinary array allocation does not reliably expose an\nout-of-bounds read.",{"type":40,"tag":74,"props":959,"children":961},{"id":960},"benchmarking",[962],{"type":46,"value":963},"Benchmarking",{"type":40,"tag":49,"props":965,"children":966},{},[967,969,974],{"type":46,"value":968},"Use BenchmarkDotNet to measure representative small and large inputs before keeping the added\ncomplexity. Compare scalar, ",{"type":40,"tag":215,"props":970,"children":972},{"className":971},[],[973],{"type":46,"value":291},{"type":46,"value":975},", and each wider implemented path in the same run. Small\ninputs can be slower because setup dominates, and speedups are rarely the theoretical vector-width\nmultiple because memory throughput, alignment, and latency still apply. Report throughput or time\nwith noise context and, when relevant, generated code size or instruction counts. Control allocation\nalignment for stable measurements or randomize it to observe the distribution. A wider vector is\nnot automatically faster.",{"type":40,"tag":49,"props":977,"children":978},{},[979],{"type":46,"value":980},"If the project cannot target the required framework, run the relevant architecture, or execute the\nfallback configuration, state exactly which path remains unverified. Do not claim success from a\ndefault-hardware test alone.",{"type":40,"tag":74,"props":982,"children":984},{"id":983},"completion-contract",[985],{"type":46,"value":986},"Completion contract",{"type":40,"tag":383,"props":988,"children":989},{},[990,1000,1010],{"type":40,"tag":204,"props":991,"children":992},{},[993,998],{"type":40,"tag":55,"props":994,"children":995},{},[996],{"type":46,"value":997},"Authoring:",{"type":46,"value":999}," leave the scalar contract covered by tests; identify the framework or SIMD layer\nselected; report measurements for the representative workload; name any architecture or fallback\npath that could not be exercised.",{"type":40,"tag":204,"props":1001,"children":1002},{},[1003,1008],{"type":40,"tag":55,"props":1004,"children":1005},{},[1006],{"type":46,"value":1007},"Review:",{"type":46,"value":1009}," report only concrete findings, ordered by correctness, memory safety, portability,\ntests, then performance evidence. If none remain, say so directly.",{"type":40,"tag":204,"props":1011,"children":1012},{},[1013],{"type":46,"value":1014},"Do not call an optimization complete when it only builds, only passes on the current machine, or\nhas no comparison against the scalar baseline.",{"type":40,"tag":74,"props":1016,"children":1018},{"id":1017},"review-checklist",[1019],{"type":46,"value":1020},"Review checklist",{"type":40,"tag":49,"props":1022,"children":1023},{},[1024],{"type":46,"value":1025},"Review in this order:",{"type":40,"tag":200,"props":1027,"children":1028},{},[1029,1034,1039,1044,1049,1054,1059],{"type":40,"tag":204,"props":1030,"children":1031},{},[1032],{"type":46,"value":1033},"Scalar-contract equivalence, including signed zero, NaN, overflow, and relevant endianness",{"type":40,"tag":204,"props":1035,"children":1036},{},[1037],{"type":46,"value":1038},"Reuse of an existing accelerated framework API",{"type":40,"tag":204,"props":1040,"children":1041},{},[1042],{"type":46,"value":1043},"Tail correctness for idempotent versus non-idempotent work",{"type":40,"tag":204,"props":1045,"children":1046},{},[1047],{"type":46,"value":1048},"Memory safety, unsigned offset arithmetic, empty inputs, and overlapping buffers",{"type":40,"tag":204,"props":1050,"children":1051},{},[1052],{"type":46,"value":1053},"Portable dispatch and behaviorally equivalent fallbacks",{"type":40,"tag":204,"props":1055,"children":1056},{},[1057],{"type":46,"value":1058},"Tests that force each width and the scalar path",{"type":40,"tag":204,"props":1060,"children":1061},{},[1062],{"type":46,"value":1063},"Benchmarks that justify explicit SIMD and additional widths",{"type":40,"tag":1065,"props":1066,"children":1067},"style",{},[1068],{"type":46,"value":1069},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1071,"total":1175},[1072,1087,1102,1120,1134,1153,1163],{"slug":1073,"name":1073,"fn":1074,"description":1075,"org":1076,"tags":1077,"stars":22,"repoUrl":23,"updatedAt":1086},"analyzing-dotnet-performance","analyze .NET code for performance anti-patterns","Scans .NET code for ~50 performance anti-patterns across async, memory, strings, collections, LINQ, regex, serialization, and I\u002FO with tiered severity classification. Use when analyzing .NET code for optimization opportunities, reviewing hot paths, or auditing allocation-heavy patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1078,1079,1082,1085],{"name":17,"slug":18,"type":15},{"name":1080,"slug":1081,"type":15},"Code Analysis","code-analysis",{"name":1083,"slug":1084,"type":15},"Debugging","debugging",{"name":13,"slug":14,"type":15},"2026-07-12T08:23:25.400375",{"slug":1088,"name":1088,"fn":1089,"description":1090,"org":1091,"tags":1092,"stars":22,"repoUrl":23,"updatedAt":1101},"android-tombstone-symbolication","symbolicate .NET runtime frames in Android tombstones","Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app crash from a tombstone, resolving native backtrace frames in libmonosgen-2.0.so or libcoreclr.so to .NET runtime source code, or investigating SIGABRT, SIGSEGV, or other native signals originating from the .NET runtime on Android. DO NOT USE FOR pure Java\u002FKotlin crashes, managed .NET exceptions that are already captured in logcat, or iOS crash logs. INVOKES Symbolicate-Tombstone.ps1 script, llvm-symbolizer, Microsoft symbol server.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1093,1094,1097,1098],{"name":17,"slug":18,"type":15},{"name":1095,"slug":1096,"type":15},"Android","android",{"name":1083,"slug":1084,"type":15},{"name":1099,"slug":1100,"type":15},"Microsoft","microsoft","2026-07-12T08:23:21.595572",{"slug":1103,"name":1103,"fn":1104,"description":1105,"org":1106,"tags":1107,"stars":22,"repoUrl":23,"updatedAt":1119},"apple-crash-symbolication","symbolicate .NET runtime frames in crash logs","Symbolicate .NET runtime frames in Apple platform .ips crash logs (iOS, tvOS, Mac Catalyst, macOS). Extracts UUIDs and addresses from the native backtrace, locates dSYM debug symbols, and runs atos to produce function names with source file and line numbers. Automatically downloads .dwarf symbols from the Microsoft symbol server using Mach-O UUIDs. USE FOR triaging a .NET MAUI or Mono app crash from an .ips file on any Apple platform, resolving native backtrace frames in libcoreclr or libmonosgen-2.0 to .NET runtime source code, retrieving .ips crash logs from a connected iOS device or iPhone, or investigating EXC_CRASH, EXC_BAD_ACCESS, SIGABRT, or SIGSEGV originating from the .NET runtime. DO NOT USE FOR pure Swift\u002FObjective-C crashes with no .NET components, or Android tombstone files. INVOKES Symbolicate-Crash.ps1 script, atos, dwarfdump, idevicecrashreport.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1108,1109,1110,1113,1116],{"name":17,"slug":18,"type":15},{"name":1083,"slug":1084,"type":15},{"name":1111,"slug":1112,"type":15},"iOS","ios",{"name":1114,"slug":1115,"type":15},"macOS","macos",{"name":1117,"slug":1118,"type":15},"Observability","observability","2026-07-12T08:23:20.369986",{"slug":1121,"name":1121,"fn":1122,"description":1123,"org":1124,"tags":1125,"stars":22,"repoUrl":23,"updatedAt":1133},"assertion-quality","evaluate assertion quality in test suites","Report assertion quality in existing tests. ALWAYS USE for weak, shallow, trivial, always-true, self-referential, assertion-free, presence\u002Ftruthiness-only, or insufficiently diverse assertions. Polyglot. DO NOT USE for direct fixes: writing-mstest-tests owns supplied MSTest assertions; code-testing-agent owns new cases. Use test-gap-analysis for mutation reasoning and test-anti-patterns for general severity-ranked audits.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1126,1127,1130],{"name":1080,"slug":1081,"type":15},{"name":1128,"slug":1129,"type":15},"QA","qa",{"name":1131,"slug":1132,"type":15},"Testing","testing","2026-08-30T08:32:16.907922",{"slug":1135,"name":1135,"fn":1136,"description":1137,"org":1138,"tags":1139,"stars":22,"repoUrl":23,"updatedAt":1152},"author-component","create and review Blazor components","Create or review Blazor components (.razor files) with correct architecture. USE FOR: writing new Blazor components that do NOT involve JavaScript interop, implementing parameters and EventCallback, RenderFragment slots, component lifecycle (OnInitializedAsync, OnParametersSet), async patterns, IAsyncDisposable, CancellationToken, CSS isolation, code-behind. DO NOT USE FOR: creating new projects (use create-blazor-project), JavaScript interop or calling browser APIs from Blazor (use use-js-interop), forms and validation (use collect-user-input), prerendering issues (use support-prerendering), HTTP data fetching patterns (use fetch-and-send-data), coordinating state between unrelated components (use coordinate-components).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1140,1141,1144,1146,1149],{"name":17,"slug":18,"type":15},{"name":1142,"slug":1143,"type":15},"Blazor","blazor",{"name":1145,"slug":742,"type":15},"C#",{"name":1147,"slug":1148,"type":15},"UI Components","ui-components",{"name":1150,"slug":1151,"type":15},"Web Development","web-development","2026-07-15T06:03:29.216359",{"slug":1154,"name":1154,"fn":1155,"description":1156,"org":1157,"tags":1158,"stars":22,"repoUrl":23,"updatedAt":1162},"binlog-failure-analysis","analyze MSBuild binary logs","Analyze MSBuild binary logs to diagnose build failures. USE FOR: build errors that are unclear from console output, diagnosing cascading failures across multi-project builds, tracing MSBuild target execution order, and generally any MSBuild build issues. Requires an existing .binlog file. DO NOT USE FOR: generating binlogs (use binlog-generation), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1159,1160,1161],{"name":1080,"slug":1081,"type":15},{"name":1083,"slug":1084,"type":15},{"name":1099,"slug":1100,"type":15},"2026-08-07T04:38:20.048408",{"slug":1164,"name":1164,"fn":1165,"description":1166,"org":1167,"tags":1168,"stars":22,"repoUrl":23,"updatedAt":1174},"binlog-generation","generate MSBuild binary logs for diagnostics","Generate MSBuild binary logs (binlogs) for build diagnostics and analysis. USE FOR: adding \u002Fbl:{} to any dotnet build, test, pack, publish, or restore command to capture a full build execution trace, prerequisite for binlog-failure-analysis and build-perf-diagnostics skills, enabling post-build investigation of errors or performance. Requires MSBuild 17.8+ \u002F .NET 8 SDK+ for {} placeholder; PowerShell needs -bl:{{}}. DO NOT USE FOR: non-MSBuild build systems (npm, Maven, CMake), analyzing an existing binlog (use binlog-failure-analysis instead).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1169,1172,1173],{"name":1170,"slug":1171,"type":15},"Build","build",{"name":1083,"slug":1084,"type":15},{"name":20,"slug":21,"type":15},"2026-07-19T05:38:19.340791",98,{"items":1177,"total":1282},[1178,1190,1197,1204,1212,1218,1226,1232,1238,1248,1261,1272],{"slug":1179,"name":1179,"fn":1180,"description":1181,"org":1182,"tags":1183,"stars":1187,"repoUrl":1188,"updatedAt":1189},"multithreaded-task-migration","migrate MSBuild tasks to multithreaded mode","Guide for migrating MSBuild tasks to multithreaded mode support, including compatibility red-team review. Use this when converting tasks to thread-safe versions, implementing IMultiThreadableTask, adding TaskEnvironment support, or auditing migrations for behavioral compatibility.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1184,1185,1186],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},5542,"https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fmsbuild","2026-08-26T03:41:05.257646",{"slug":1073,"name":1073,"fn":1074,"description":1075,"org":1191,"tags":1192,"stars":22,"repoUrl":23,"updatedAt":1086},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1193,1194,1195,1196],{"name":17,"slug":18,"type":15},{"name":1080,"slug":1081,"type":15},{"name":1083,"slug":1084,"type":15},{"name":13,"slug":14,"type":15},{"slug":1088,"name":1088,"fn":1089,"description":1090,"org":1198,"tags":1199,"stars":22,"repoUrl":23,"updatedAt":1101},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1200,1201,1202,1203],{"name":17,"slug":18,"type":15},{"name":1095,"slug":1096,"type":15},{"name":1083,"slug":1084,"type":15},{"name":1099,"slug":1100,"type":15},{"slug":1103,"name":1103,"fn":1104,"description":1105,"org":1205,"tags":1206,"stars":22,"repoUrl":23,"updatedAt":1119},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1207,1208,1209,1210,1211],{"name":17,"slug":18,"type":15},{"name":1083,"slug":1084,"type":15},{"name":1111,"slug":1112,"type":15},{"name":1114,"slug":1115,"type":15},{"name":1117,"slug":1118,"type":15},{"slug":1121,"name":1121,"fn":1122,"description":1123,"org":1213,"tags":1214,"stars":22,"repoUrl":23,"updatedAt":1133},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1215,1216,1217],{"name":1080,"slug":1081,"type":15},{"name":1128,"slug":1129,"type":15},{"name":1131,"slug":1132,"type":15},{"slug":1135,"name":1135,"fn":1136,"description":1137,"org":1219,"tags":1220,"stars":22,"repoUrl":23,"updatedAt":1152},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1221,1222,1223,1224,1225],{"name":17,"slug":18,"type":15},{"name":1142,"slug":1143,"type":15},{"name":1145,"slug":742,"type":15},{"name":1147,"slug":1148,"type":15},{"name":1150,"slug":1151,"type":15},{"slug":1154,"name":1154,"fn":1155,"description":1156,"org":1227,"tags":1228,"stars":22,"repoUrl":23,"updatedAt":1162},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1229,1230,1231],{"name":1080,"slug":1081,"type":15},{"name":1083,"slug":1084,"type":15},{"name":1099,"slug":1100,"type":15},{"slug":1164,"name":1164,"fn":1165,"description":1166,"org":1233,"tags":1234,"stars":22,"repoUrl":23,"updatedAt":1174},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1235,1236,1237],{"name":1170,"slug":1171,"type":15},{"name":1083,"slug":1084,"type":15},{"name":20,"slug":21,"type":15},{"slug":1239,"name":1239,"fn":1240,"description":1241,"org":1242,"tags":1243,"stars":22,"repoUrl":23,"updatedAt":1247},"build-parallelism","optimize MSBuild build parallelism","Diagnose and fix under-parallelized MSBuild builds. USE WHEN a multi-project solution build is slower than expected, doesn't speed up when you add cores, pegs a single core while others idle, or you want to know why `-m` isn't helping. Note: `\u002Fmaxcpucount` default is 1 (sequential) — always pass `-m` for parallel builds. Covers finding the critical path (longest serial ProjectReference chain), graph build (`\u002Fgraph`), BuildInParallel, and solution filters (`.slnf`). DO NOT USE FOR: single-project builds, incremental issues (use incremental-build), compilation slowness inside one project (use build-perf-diagnostics), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1244,1245,1246],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-19T05:38:18.364937",{"slug":1249,"name":1249,"fn":1250,"description":1251,"org":1252,"tags":1253,"stars":22,"repoUrl":23,"updatedAt":1260},"build-perf-baseline","establish and optimize build performance baselines","Establish build performance baselines and apply systematic optimization techniques. USE FOR: diagnosing slow builds, establishing before\u002Fafter measurements (cold, warm, no-op scenarios), applying optimization strategies like MSBuild Server, static graph builds, artifacts output, and dependency graph trimming. Start here before diving into build-perf-diagnostics, incremental-build, or build-parallelism. DO NOT USE FOR: non-MSBuild build systems, detailed bottleneck analysis (use build-perf-diagnostics after baselining).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1254,1255,1258,1259],{"name":20,"slug":21,"type":15},{"name":1256,"slug":1257,"type":15},"Monitoring","monitoring",{"name":13,"slug":14,"type":15},{"name":1131,"slug":1132,"type":15},"2026-07-12T08:21:35.865649",{"slug":1262,"name":1262,"fn":1263,"description":1264,"org":1265,"tags":1266,"stars":22,"repoUrl":23,"updatedAt":1271},"build-perf-diagnostics","diagnose MSBuild build performance bottlenecks","Diagnose MSBuild build performance bottlenecks using binary log analysis. USE FOR: identifying why builds are slow by analyzing binlog performance summaries, detecting ResolveAssemblyReference (RAR) taking >5s, Roslyn analyzers consuming >30% of Csc time, single targets dominating >50% of build time, node utilization below 80%, excessive Copy tasks, NuGet restore running every build. Covers timeline analysis, Target\u002FTask Performance Summary interpretation, and 7 common bottleneck categories. Use after build-perf-baseline has established measurements. DO NOT USE FOR: establishing initial baselines (use build-perf-baseline first), fixing incremental build issues (use incremental-build), parallelism tuning (use build-parallelism), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1267,1268,1269,1270],{"name":17,"slug":18,"type":15},{"name":1083,"slug":1084,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-12T08:21:40.961722",{"slug":1273,"name":1273,"fn":1274,"description":1275,"org":1276,"tags":1277,"stars":22,"repoUrl":23,"updatedAt":1281},"check-bin-obj-clash","detect MSBuild output path conflicts","Detects MSBuild projects with conflicting OutputPath or IntermediateOutputPath. USE FOR: builds failing with 'Cannot create a file when that file already exists', 'The process cannot access the file because it is being used by another process', intermittent build failures that succeed on retry, or missing\u002Foverwritten outputs in multi-project or multi-targeting builds where bin\u002Fobj (or project.assets.json) collide. Common causes: shared OutputPath, missing AppendTargetFrameworkToOutputPath, extra global properties (e.g. PublishReadyToRun), or SetTargetFramework on a ProjectReference to a single-targeting project. DO NOT USE FOR: file access errors unrelated to MSBuild (OS-level locking), single-project single-TFM builds, non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1278,1279,1280],{"name":1083,"slug":1084,"type":15},{"name":20,"slug":21,"type":15},{"name":1128,"slug":1129,"type":15},"2026-07-19T05:38:14.336279",146]