# dotnet-inspect-correctness

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

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 415 installs · ★ 156
- Author: richlander
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/richlander/dotnet-inspect/tree/HEAD/skills/correctness/SKILL.md
- Updated: 2026-10-25
- HTML: https://affpapa.org/en/nevibecode/skills/dotnet-inspect-correctness

## What it 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 MyLib@1.4.0..1.5.0 -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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add richlander/dotnet-inspect --skill dotnet-inspect-correctness -a claude-code
```
```bash
npx skills add richlander/dotnet-inspect --skill correctness -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/correctness/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/correctness/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add richlander/dotnet-inspect --skill correctness -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/correctness/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add richlander/dotnet-inspect --skill correctness -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/correctness/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install richlander/dotnet-inspect correctness
```

2. **Manually: put the files in place**
- File: `.github/skills/correctness/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add richlander/dotnet-inspect --skill correctness -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/richlander/dotnet-inspect --path skills/correctness
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/correctness/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add richlander/dotnet-inspect --skill correctness -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/richlander/dotnet-inspect/tree/HEAD/skills/correctness/SKILL.md

## When to use it
- 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
- Show the exception regions and call-graph fields for `Method:1` on `MyType`
- Find unsafe operations in `MyType.Method` inside `MyLib.dll`
- Diff `MyLib@1.4.0..1.5.0` for the `analysis.unsafety` finding on `MyType.Method`

## Similar
- [improve-codebase-architecture](https://affpapa.org/en/nevibecode/skills/improve-codebase-architecture.md) — skill · 1163035 installs
- [tdd](https://affpapa.org/en/nevibecode/skills/tdd.md) — skill · 1141062 installs
- [triage](https://affpapa.org/en/nevibecode/skills/triage.md) — skill · 990453 installs
- [codebase-design](https://affpapa.org/en/nevibecode/skills/codebase-design.md) — skill · 850344 installs
- [code-review](https://affpapa.org/en/nevibecode/skills/code-review.md) — skill · 789521 installs
- [implement](https://affpapa.org/en/nevibecode/skills/implement.md) — skill · 774700 installs

From the same set: [richlander/dotnet-inspect](https://affpapa.org/en/nevibecode/by/richlander/dotnet-inspect.md) — 4 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
