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.
npx skills add richlander/dotnet-inspect --skill dotnet-inspect-correctness -a claude-code
npx skills add richlander/dotnet-inspect --skill correctness -a claude-codeWhat 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:1onMyType - Find unsafe operations in
MyType.MethodinsideMyLib.dll - Diff
[email protected]for theanalysis.unsafetyfinding onMyType.Method
How to install dotnet-inspect-correctness
1Skills CLI (Vercel)
npx skills add richlander/dotnet-inspect --skill dotnet-inspect-correctness -a claude-codenpx skills add richlander/dotnet-inspect --skill correctness -a claude-code2Manually: put the files in place
~/.claude/skills/correctness/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/correctness/
1Skills CLI (Vercel)
npx skills add richlander/dotnet-inspect --skill correctness -a codex2Manually: put the files in place
.agents/skills/correctness/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add richlander/dotnet-inspect --skill correctness -a cursor2Manually: put the files in place
.cursor/skills/correctness/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install richlander/dotnet-inspect correctness2Manually: put the files in place
.github/skills/correctness/SKILL.md1Skills CLI (Vercel)
npx skills add richlander/dotnet-inspect --skill correctness -a gemini-cli2Platform CLI
gemini skills install https://github.com/richlander/dotnet-inspect --path skills/correctnessManually: put the files in place
.devin/skills/correctness/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add richlander/dotnet-inspect --skill correctness -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.