migrate-nullable-references

migrate-nullable-references is a skill for Claude Code, Codex from managedcode/dotnet-skills. It costs 142 tokens per session (7,888 once invoked), scanned A, a copy of migrate-nullable-references, MIT.

A guide to enabling nullable reference types in an existing C# project and fixing the warnings they reveal. Nullable reference types help the compiler identify code that may use a missing value.

In plain words
What is it for?
Use it when adopting nullable reference types, resolving CS86xx warnings, annotating public APIs, or reviewing old null-forgiving operators.
Why use it?
It replaces scattered warning suppressions with code and API declarations that accurately describe when values can be missing. This helps prevent null-related errors and gives library users clearer information.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adopting nullable reference types, resolving CS86xx warnings, annotating public APIs, or reviewing old null-forgiving operators.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/managedcode/dotnet-skills/migrate-nullable-references
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add managedcode/dotnet-skills --skill migrate-nullable-references
Clone the repo
git clone --depth 1 https://github.com/managedcode/dotnet-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for migrate-nullable-references

README.md
[![agentmods](https://agentmods.dev/badge/skills/managedcode/dotnet-skills/migrate-nullable-references/github.svg)](https://agentmods.dev/skills/managedcode/dotnet-skills/migrate-nullable-references)
Your own site
<a href="https://agentmods.dev/skills/managedcode/dotnet-skills/migrate-nullable-references"><img src="https://agentmods.dev/badge/skills/managedcode/dotnet-skills/migrate-nullable-references/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for migrate-nullable-references

Your own site · 80×15
<a href="https://agentmods.dev/skills/managedcode/dotnet-skills/migrate-nullable-references"><img src="https://agentmods.dev/badge/skills/managedcode/dotnet-skills/migrate-nullable-references.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 142 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,888 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00142 $0.07888
Opus 5.5 $0.00057 $0.03155
Sonnet 5.5 $0.00028 $0.01578
Haiku 4.5 $0.00014 $0.00789

Measured 2mo ago against content hash 4c229d8b7626, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

migrate-nullable-references scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/Get-NullableReadiness.ps1), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to migrate-nullable-references — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

catalog/Platform/Official-DotNet-Upgrade/skills/migrate-nullable-references/SKILL.md · 292 lines

How it starts

The opening of the file, as written. The whole thing — 292 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Nullable Reference Migration

Enable C# nullable reference types (NRTs) in an existing codebase and systematically resolve all warnings. The outcome is a project (or solution) with <Nullable>enable</Nullable>, zero nullable warnings, and accurately annotated public API surfaces — giving both the compiler and consumers reliable nullability information.

When to Use

  • Enabling nullable reference types in an existing C# project or solution
  • Systematically resolving CS86xx nullable warnings after enabling the feature
  • Annotating a library's public API surface so consumers get accurate nullability information
  • Upgrading a dependency that has added nullable annotations and new warnings appear
  • Analyzing suppressions in a code base that has already enabled NRTs to determine whether they can be removed

When Not to Use

  • The project already has <Nullable>enable</Nullable> and zero warnings — the migration is done unless the user wants to re-examine suppressions with a view to removing unnecessary ones (see Step 6)
  • The user only wants to suppress warnings without fixing them (recommend against this)
  • The code targets C# 7.3 or earlier, which does not support nullable reference types

Inputs

Input Required Description
Project or solution path Yes The .csproj, .sln, or build entry point to migrate
Migration scope No project-wide (default) or file-by-file — controls the rollout strategy
Build command No How to build the project (e.g., dotnet build, msbuild, or a repo-specific build script). Detect from the repo if not provided
Test command No How to run tests (e.g., dotnet test, or a repo-specific test script). Detect from the repo if not provided

Workflow

🛑 Zero runtime behavior changes. NRT migration is strictly a metadata and annotation exercise. The generated IL must not change — no new branches, no new null checks, no changed control flow, no added or removed method calls. The only acceptable changes are nullable annotations (?), nullable attributes ([NotNullWhen], etc.), ! operators (metadata-only), and #nullable directives. If you discover a missing runtime null guard or a latent bug during migration, do not fix it inline. Instead, offer to insert a // TODO: Consider adding ArgumentNullException.ThrowIfNull(param) comment at the site so the user can address it as a separate change. Never mix behavioral fixes into an annotation commit.

Read the full file on GitHub · 292 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 292 lines · 142 tokens per session scan A 4c229d8b7626

Subscribe to this mod's changes

migrate-nullable-references is a skill published in the GitHub repository managedcode/dotnet-skills (527 stars, last pushed 16d ago), licensed MIT. It adds 142 tokens to every session and 7,888 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to migrate-nullable-references, differing in 0 lines, and is treated as a copy.

Related

migrate-nullable-references compared with skills from other repositories

migrate-nullable-references next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
migrate-nullable-referencesmanagedcode/dotnet-skillsSkill52716d agoMITA142Claude Code, Codex
cs0618-hunterjoslat/maf-doctorSkill1414d agoMITA85Claude Code, Codex
nuget-diff-analyzerjoslat/maf-doctorSkill1414d agoMITA56Claude Code, Codex
agents-sdk-dotnet-debuggingmicrosoft/AgentsSkill1.1k5d agoMITA136Claude Code
roslyn-codelensMarcelRoozekrans/roslyn-codelens-mcpSkill78todayMITA104Claude Code
clean-architecture-dotnetSebastienDegodez/copilot-instructionsSkill19923d agoApache-2.0A50Claude Code, Codex
creating-dotnet-mcp-serversSebastienDegodez/copilot-instructionsSkill19923d agoApache-2.0A43Claude Code, Codex