About dotnet-inspect
dotnet-inspect is a command-line skill for developers who need evidence about .NET APIs, libraries, packages, and dependencies. It supports discovery, detailed inspection, comparisons, and portable workspace definitions.
Key features
- 01Discover APIs and packages
- 02Inspect types, members, and libraries
- 03Compare API and implementation changes
- 04Trace API history across versions
- 05Build and edit portable workspaces
Use cases
- 01Find a .NET API in platform libraries
- 02Inspect a package's dependencies and license files
- 03Compare package versions for breaking changes
- 04Track when an API changed across releases
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ richlander/ dotnet-inspect --skill dotnet-inspectAfter installing, type/dotnet-inspectin Claude Code to confirm it loaded.
Details
From the project READMEdotnet-inspect
Use dotnet-inspect to find evidence from direct local libraries, packages from configured sources, and Platform libraries, including APIs and dependencies.
Run dnx dotnet-inspect -y -- <command-or-target>. -y skips confirmation,
and -- passes the remaining arguments to dotnet-inspect. Start by identifying
the kind of result needed. If the intent or result space is unclear, use a bare
target and let the router choose. Otherwise, enter the matching space directly.
Platform queries use installed packs when the requested version is available;
otherwise they use a package-backed source. For a non-conventional install,
verify <root>/packs and set process-scoped DOTNET_ROOT, not PATH.
Common starts
| Goal | Command |
|---|---|
| Discover an installed capability | When you know the task but not the command, key, or section, run explain <task-text> to similarity-search installed capabilities. For example, run explain literal, copy the result's Explain path into explain <path> .hal --json, then follow its production binding: package query Microsoft.Azure.SignalR --where "library-literal=https://" --tfm net8.0 --json. Use -D or -Q directly when you already know the route. |
| Discover or inspect a package | package query Foo discovers an exact package ID; use package query 'Foo.*' for a literal package-ID prefix. Then use package <exact-id> to inspect the known package. |
| Discover an API symbol | Without an explicit scope, find searches installed .NET Runtime, ASP.NET Core, and .NET Standard platform populations, including Microsoft.Extensions assemblies shipped in the framework populations. Try find JsonSerializer -n 5 --table, find ControllerBase -n 5 --table, or find OptionsBuilder -n 5 --table. Package APIs enter scope through explicit --package Foo@version, a restored --project path/to/project, or --package-prefix PREFIX with a type/member pattern: find IChatClient --package Microsoft.Extensions.AI.Abstractions -n 5 --table returns Microsoft.Extensions.AI.IChatClient. Use package query Pattern to discover package IDs; add --members for member names. Explicit Package or Platform searches with --tfm preserve Find's Markdown, tips, tables, root-array JSON, exact implementation asset, and compatible TFM. |
| Inspect a type | type Type --package Foo; add --all for non-public/hidden members. -k selects logical declaration kinds: explicit properties/events use property/event, while explicit-interface-implementation selects uncomposed explicit methods. Select -S Source for authored-first source with explicit fallback context; PDB Source and Decompiled Source remain provider-specific views. |
| Inspect overloads | member Type --platform Lib -m Name -S "Member Index" |
| Select an overload | member Type --platform Lib Name:1 or Name~digest |
| Correlate one member's Findings | member Type Method:1 --package Foo -S "Finding Census" --json returns one receipt-scoped Facts and annotated-source envelope. Load skill query for selection and format constraints. |
| Discover legal query values or demos | explain vocabularies --json lists installed vocabularies. Copy a returned path into explain <path> .hal --json; read its embedded values and related vocabularies. Use demo list for product-home scenarios. |
| Discover query facets and operators | library -Q lists query-capable sections; type -Q "Body Shapes" or library -Q "Performance: Arrays" --json describes accepted keys and operators without inspection. |
| Find rendered body syntax | library path/to.dll --where "Kind=ObjectCreationExpression", type Type --library path/to.dll --where "Kind=InvocationExpression", or member Type Method:1 --library path/to.dll --where "Kind=InvocationExpression"; load skill decompiler for stable kinds and coordinates. |
| Compare APIs or method bodies | diff --package [email protected] --breaking (--additive new APIs; --alloc-regressions for allocation regressions; --implementation for the exact Implementation Diff section). Single-Library API Diff supports complete Content with unprojected --json or the complete service value with --envelope; its Share is currently non-projectable. Use type or member ... --match --envelope when one API coordinate's complete correspondence outcome and diagnostics are the question; ordered match endpoints are also non-projectable. match Type.MethodA Type.MethodB --package Foo --body adds C#/IL body differences to the structural result; match Type.Method --similar --package Foo ranks structural candidates for discovery. |
| Trace API evolution | diff --history --package [email protected] --type Type --members --at all; omit --at for full-population evaluation, repeat it for explicit checkpoints, use --max-probes for adaptive bisection, add --sample-percent P for a deterministic population-relative survey with an optional --max-probes cap, or use --major-versions for one representative per major. Major-version API history uses the first stable version, with the latest prerelease fallback for preview-only majors; Analysis history uses the latest admitted version per major. |
| Inspect packages and ecosystems | package Foo inspects a known exact package ID; use package Foo --version 1.2.3 to verify an exact version, package Foo --versions -n 1 for the newest listed version row, or package Foo@latest --versions to force a fresh latest-version check. Use -D to discover sections, -S Licenses to list shipped license documents, and -S "Signals,Audit: Findings" to audit text-bearing files and SourceLink mappings. package activity --ecosystem aspire scans the named ecosystem's exact package set over the previous 42 days; add --security-only, paired exact --from/--through UTC timestamps, or complete Content --json; use --envelope for the full service value. Load skill private-feeds for custom/authenticated sources. |
| Query packages | package query Foo selects the latest eligible listed version; use 'Foo.*' for a literal package-ID prefix. The closed nuspec license values are any, MIT, and OSMF; use them with --where and --nuspec-only to avoid opening archives. Use explain <facet-path> to inspect a discovered facet's operators and relationships before composing it with --where. The Product planner authors library-target from --tfm; metadata-expensive queries admit at most five candidates. Final Results retain typed selected-library context, exact Root reopening, and complete occurrences. -n and --rows select package Results, not occurrences. --envelope retains complete package-query Content and diagnostics, but Package Query Share is currently non-projectable. |
| Author or inventory a Workspace | workspace --register-ecosystem runtime emits a portable packet without acquisition; add --share url for an activation URL or use --json for packet JSON. workspace --packet "$w" validates and re-emits a packet without realizing content. Add --inventory for exhaustive live inventory across all contexts; --kind, -n, --rows and --count narrow its typed entries. Use ordinary package, library, type and member commands with admitted --workspace "$w" context for subject inspection. package Foo --workspace "$w" can reuse or add-and-activate an admitted Package in a derived Workspace. Apply with dotnet-inspect -w "$w" or raw packet input: Workspace prints inventory; saved Package Libraries prints its ordinary hierarchy. Other saved facets/queries fail visibly. |
| Edit a portable Workspace | Use workspace component list --packet "$w" to obtain canonical paths. Then use workspace package add PACKAGE@VERSION --packet "$w", workspace package update packages/ID@VERSION/TFM/RID --packet "$w" --version NEW, or workspace package remove packages/ID@VERSION/TFM/RID --packet "$w". Edits emit a new packet by default; add and update can select a context or TFM as supported, and update can emit --json --envelope. Use workspace packet encode or workspace packet decode for packet conversion. |
| Discover or inspect a library | library Foo or library path/to.dll inspects a known source; use library query ./bin --where "references=System.Text.Json" or library query --platform runtime ... for Library-grain discovery. Use -D to discover sections, -D --details to add structural format capabilities, -S "Library Metrics" for a whole-library structural report, and -S "Unsafe Members" for standalone unsafe evidence. Exact Library --count counts public Type declarations; type Type --library path/to.dll --count counts Members. Load skill metadata for raw ECMA-335 tables/heaps. |
| Dependencies and relationships | depends --package Foo@version --tfm net10.0 for a package graph plus declaration evidence; add -S Dependencies for evidence only or explicitly select -S Pruning to compare direct package candidates with an installed platform inventory. Use graph calls TYPE MEMBER --root-package Foo@version --root-tfm net10.0 for an external-focused member graph that automatically follows the root package dependencies. Its default baseline highlights third-party Package boundaries; use --baseline self or --baseline nothing to change that focus. Use graph libraries --library ./Consumer.dll --library ./Provider.dll -S "Direct Use Clusters" for exact pairwise call-use clusters. Use depends Type, extensions Type, type Interface -S Implementers, or type Base -S "Derived Types" for type relationships. Positional depends Type supports complete Content with --json or the complete service value with --envelope; asset mode does not support envelopes. Load skill relationships for scopes and semantics. |
Member lookup
Run find Name when scope is unknown, inspect the type, then -S "Member Index" to list overloads. Select with Name:N (1-based) or Name~digest (stable). A selected overload defaults to Signature. A fully-qualified Namespace.Type.Member needs no scope.
Tips
packageandlibraryproduce terse, token-efficient, high-value domain content by default. Output supports Markdown, tables, TSV, JSONL, and JSON; loaddotnet-inspect skill queryfor selection, envelopes, Share URLs, projection, and limits. For discovered vocabulary, query-space, or query-facet paths, useexplain <path> .hal --json. HAL uses_linksfor navigation and_embeddedfor included data; inspect embedded data before fetching links, follow emitted hrefs unchanged withexplain "$href" --json, and retaindata_scopewhen filtering with jq.- Add
--project <csproj|dir|project.assets.json>when project-referenced packages should be in scope; it reads existing restored assets, so restore/build first if dependencies changed. workspace --inventoryreports committed Packages before inert Exact Library, Package Prefix and Ecosystem registrations; JSON/JSONL retain typed entry arms. This inventories existing Workspace content; Find searches its admitted populations for matches. Ordinary Workspace output is the portable definition, and nestedworkspace component,workspace package,workspace ecosystemandworkspace prefixcommands own component inspection and immutable edits.- Common BCL types resolve without scope:
type string,type 'List<T>'. Quote generics and patterns:member 'Dictionary<TKey,TValue>',-S "Async*". Unpinned packages use latest stable; add--previewfor prerelease APIs.
Interpret fixed text
[Text omitted: required containment]: a complete value or document was not shared because it carried a text concern; this does not imply malicious intent.REDACTED: a URL query or credential-bearing path segment was removed.<unparsable-url>: no original locator was shown because an authority-like value could not be parsed into URL components.<absent>or(absent): a requested package document was not present; this is not containment or redaction.\u202E,\U0001F600,\^[, and similar backslash forms preserve source text as reversible visual spellings. They are not replacements; do not decode them into live control or format characters before display or persistence.