migrate-nullable-references

Enable nullable reference types in C# projects and resolve warnings.

Updated May 28, 2026
One-click install
npx skills add https://github.com/ojrojas/AgentsInstructions --skill migrate-nullable-references-ojrojas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-nullable-references
Source: https://github.com/ojrojas/AgentsInstructions/tree/main/.claude/skills/dotnet-upgrade/skills/migrate-nullable-references
Command: npx skills add https://github.com/ojrojas/AgentsInstructions --skill migrate-nullable-references-ojrojas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires powershell, nuget, psmodule, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive workflow for enabling nullable reference types in C# projects, systematically resolving all associated warnings, and ensuring accurate nullability information for both the compiler and consumers.

Core Features & Use Cases

  • Nullable Reference Type Enablement: Automates the process of enabling nullable reference types in C# projects, including setting the necessary compiler flags and analyzing project settings.
  • Warning Resolution: Identifies and resolves nullable warnings (CS8602, CS8600, CS8603, CS8604), ensuring the project compiles without errors.
  • Annotation and Attribute Application: Provides guidelines for annotating API surfaces and applying nullable attributes for advanced nullability scenarios.
  • Suppression Auditing: Helps in auditing and removing unnecessary suppressions to maintain code quality and maintainability.
  • Validation: Validates the migration outcome to ensure the project meets the required nullability standards without runtime issues.

Quick Start

Run the skill with the project path as input to enable nullable reference types and resolve all warnings: migrate-nullable-references /path/to/project.

Frequently Asked Questions about migrate-nullable-references

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable nullable reference types in a C# project without breaking the build?

To enable nullable reference types in C#, you need to set the necessary compiler flags and systematically resolve generated warnings like CS8602 and CS8604. This workflow automates the enablement, warning resolution, and validation to ensure the project compiles without errors.

What is the best way to resolve C# nullable warnings during a migration?

The best way to resolve C# nullable warnings is to identify specific compiler errors such as CS8600 and CS8603, then apply proper nullability annotations and attributes to API surfaces. This process also includes auditing unnecessary suppressions to maintain accurate compiler information.

Do I need PowerShell to automate nullable reference type migration?

Yes, you need PowerShell along with specific NuGet packages to automate nullable reference type migration. This Skill relies on PowerShell scripts to analyze project settings, apply annotations, and validate the migration outcome for C# projects.

Can I use this nullable migration workflow for .NET Core 3.0 projects?

Yes, this nullable migration workflow applies to C# projects targeting .NET Core 3.0 or later. It requires prior knowledge of C# nullable reference types and migration strategies to properly annotate APIs and audit suppressions.

Why do I still have nullable suppressions after enabling nullable reference types?

Nullable suppressions often remain when API surfaces are not fully annotated or when temporary fixes are applied during migration. Auditing and removing these unnecessary suppressions is required to maintain code quality and ensure accurate nullability information for consumers.