Dotnet inspect

From CommunityToolkit/Aspire · View interactive version

Dotnet inspect is an AI agent skill from the GitHub repository CommunityToolkit/Aspire. Query .NET APIs across NuGet packages, platform libraries, and local files. Search for types, list API surfaces, compare and diff versions, find extension methods and implementors. Use whenever you need to answer questions about .NET library contents.

How to use this skill

Skill file

dotnet-inspect

Query .NET library APIs — the same commands work across NuGet packages, platform libraries (System., Microsoft.AspNetCore.), and local .dll/.nupkg files.

Quick Decision Tree

When to Use This Skill

Key Patterns

Use --oneline as the default for scanning — it works on type, member, find, diff, and implements:

dnx dotnet-inspect -y -- member JsonSerializer --package System.Text.Json --oneline  # scan members
dnx dotnet-inspect -y -- type --package System.Text.Json --oneline                   # scan types
dnx dotnet-inspect -y -- diff --package System.CommandLine@2.0.0-beta4.22272.1..2.0.3 --oneline  # triage changes

Use --shape to understand a type's hierarchy and surface at a glance:

dnx dotnet-inspect -y -- type 'HashSet<T>' --platform System.Collections --shape

Use diff first when fixing broken code — --oneline for triage, then full detail on specific types:

dnx dotnet-inspect -y -- diff --package System.CommandLine@2.0.0-beta4.22272.1..2.0.3 --oneline  # what changed?
dnx dotnet-inspect -y -- diff -t Command --package System.CommandLine@2.0.0-beta4.22272.1..2.0.3  # detail on Command
dnx dotnet-inspect -y -- member Command --package System.CommandLine@2.0.3 --oneline              # new API surface

Search Scope

Search commands (find, extensions, implements, depends) use scope flags:

type, member, library, diff accept --platform <name> as a string for a specific platform library.

Command Reference

| Command | Purpose |

| ------- | ------- |

| type | Discover types — terse output, no docs, use --shape for hierarchy |

| member | Inspect members — docs on by default, supports dotted syntax (-m Type.Member) |

| find | Search for types by glob pattern across any scope |

| diff | Compare API surfaces between versions — breaking/additive classification |

| extensions | Find extension methods/properties for a type |

| implements | Find types implementing an interface or extending a base class |

| depends | Walk the type dependency hierarchy upward (interfaces, base classes) |

| package | Package metadata, files, versions, dependencies, search for NuGet discovery |

| library | Library metadata, symbols, references, dependencies |

| demo | Run curated showcase queries — list, invoke, or feeling-lucky |

Output Limiting

Do not pipe output through head, tail, or Select-Object. The tool has built-in line limiting that preserves headers and formatting:

dnx dotnet-inspect -y -- member JsonSerializer --package System.Text.Json --oneline -10  # first 10 lines
dnx dotnet-inspect -y -- find "*Logger*" -n 5                                            # first 5 lines
dnx dotnet-inspect -y -- member JsonSerializer --package System.Text.Json -v:q -s Methods  # select specific section

Key Syntax

Installation

Use dnx (like npx). Always use -y and -- to prevent interactive prompts:

dnx dotnet-inspect -y -- <command>

Full Documentation

For comprehensive syntax, edge cases, and the flag compatibility matrix:

dnx dotnet-inspect -y -- llmstxt
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.