Skip to main content
skill CX Codex

dotnet-inspect-correctness — Claude Code skill

A skill that inspects .NET assemblies: what a method can throw, where unsafe operations sit, and how resource ownership is handled.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add richlander/dotnet-inspect --skill dotnet-inspect-correctness -a claude-code
npx skills add richlander/dotnet-inspect --skill correctness -a claude-code
Open on GitHub

What dotnet-inspect-correctness does

The skill sits on top of the dotnet-inspect CLI and answers questions about correctness: which exceptions a method raises, how it handles them, and where it leaves safe managed execution. Exception behaviour comes from method-body analysis rather than a dedicated section, so the picture is built from Exception Regions, call-graph fields and hidden facts. For a single method that means -S "Exception Regions", -S "Call Graph" with Throws, ThrowSites, ExceptionTypes, Catch and Finally, or -S Facts --tsv.

Unsafe code is inspected with -S "Unsafe Operations,IL", which points at specific IL inside one method body. There is also a coordinate mode for a crash or profiler frame: library coordinate 0x06000001+0x5 --library Foo.dll returns source-location, member, instruction, exception and return-address context, with safety evidence behind -S "Context: Safety". To find when an unsafe operation first appeared, compare two package versions with diff --package [email protected] -t MyType -m Method --finding analysis.unsafety. A PairFinding.Added row is the introduction proof; Present and Removed separate persistence from disappearance.

The review follows the official .NET unsafe-code guidance, but the tool supplies compiled evidence instead of a single compliance verdict. Rows are captured into JSONL sets through a capture wrapper, then sliced and joined with jq and the agent, and only consequential members get drilled into.

What it helps with

  • find out which exceptions a given method throws
  • locate unsafe operations in a method body with IL evidence
  • pin down the version where an unsafe operation first appeared
  • resolve a crash or profiler coordinate down to method and instruction
  • gather evidence about pooled-resource ownership

Example prompts for the agent

  • Show the exception regions and call-graph fields for Method:1 on MyType
  • Find unsafe operations in MyType.Method inside MyLib.dll
  • Diff [email protected] for the analysis.unsafety finding on MyType.Method

How to install dotnet-inspect-correctness

1Skills CLI (Vercel)

npx skills add richlander/dotnet-inspect --skill dotnet-inspect-correctness -a claude-code
npx skills add richlander/dotnet-inspect --skill correctness -a claude-code

2Manually: put the files in place

~/.claude/skills/correctness/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/correctness/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about dotnet-inspect-correctness

How do I install dotnet-inspect-correctness in Claude Code?

Run npx skills add richlander/dotnet-inspect --skill dotnet-inspect-correctness -a claude-code. The skill then lives at ~/.claude/skills/correctness/SKILL.md.

What does dotnet-inspect-correctness do?

It inspects .NET code for correctness and safety: exception surface, unsafe operations, interop boundaries and resource-ownership evidence. It runs on top of the dotnet-inspect CLI.

How is it different from the compatibility skill?

This one analyses a single version. How signals change between versions is handled by the compatibility skill.

Similar skills

All skills for Code review and refactoring →

From the same set4

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor