fix-dotnet-nullcheck-warnings
Installation
SKILL.md
Skill fix-dotnet-nullcheck-warnings
Goal
Fixes nullable and NullReference warnings in C# projects systematically and in a technically correct way.
When to use
- When warnings like
CS8600toCS8777occur during the build. - When a user explicitly wants to "fix NullReference warnings".
- When nullable annotations are inconsistent and lead to potential runtime
NullReferenceExceptions.
Core principle
First determine all warnings completely, then decide per warning on a technical basis:
- Can
nullactually occur from a domain point of view? - If yes: model nullability correctly (
?) and ensure null-safe usage. - If no: tighten the API/types so that
nullis no longer possible (remove nullability, add guards), without introducing errors.