/dotnet-inspect:dotnet-inspect-performancefrom dotnet-inspect
Finds .NET performance optimization candidates via static analysis of allocations, loops, and call graphs using dotnet-inspect, then drills into IL.
Ships in dotnet-inspect. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill to find Members worth investigating, not to infer measured wins.
Run dnx dotnet-inspect -y -- <command>. This static analysis is experimental;
use installed discovery for current shapes, fields and query rules.
dnx dotnet-inspect -y -- library MyLib.dll -S "Top Leverage"
dnx dotnet-inspect -y -- library MyLib.dll -S "Performance:*" \
--where "Priority>=high" --top 20 --tsv
dnx dotnet-inspect -y -- library -D @Performance
dnx dotnet-inspect -y -- library -Q "Performance: Arrays" --json
Top Leverage ranks call-graph reach, not execution frequency. Intersect its Members with performance candidates to choose a focused drill. A large call-graph footprint can matter even when a local cost is small.
Library triage has kind-scoped sections; Type/Member scope uses
Performance Triage. Use --all for non-public Type/Member targets.
--top selects a curated ranked prefix, while -n/--rows shape output;
they are not interchangeable. @Performance includes heterogeneous sections,
so use concrete sections or Performance:* for compatible row output.
Focus first on IL-visible costs such as boxing, arrays, delegates and materialization. Do not prescribe rewrites for work the JIT may remove without runtime evidence. A scan-in-loop candidate needs evidence that the scanned population grows; a small-array candidate needs escape/lifetime evidence before recommending stack allocation.
For an unfamiliar shape, use explain "<question>" and follow its returned
resource and binding. Use -Q before constructing predicates or field orders;
displayed fields do not automatically support either.
dnx dotnet-inspect -y -- member MyType Method:1 --library MyLib.dll \
-S "Performance Triage" --json
dnx dotnet-inspect -y -- member MyType Method:1 --library MyLib.dll \
-S "Call Graph" --fields "Alloc,Loop" --tree
dnx dotnet-inspect -y -- member MyType Method:1 --library MyLib.dll \
-S "Annotated Source,IL" --offline
Choose a copyable stable selector from the inventory rather than inferring one from a formatted label. Retain Candidate, Finding, provenance and physical Member/IL coordinates. Exact, aggregate and unmatched provenance are different claims: an aggregate candidate is not an exact allocation occurrence. Generated async bodies may own the physical IL receipt even when the displayed Member is the source-facing method.
Follow calls toward public entrypoints and callers, then inspect the local operation. A function load or callback registration does not establish invocation. Source or IL explains the candidate; a representative benchmark, allocation trace or profiler establishes runtime cost and rewrite benefit.
Call Graph machine rows are available through --jsonl/--tsv; a separate
Member Share URL opens its public API Overview, not this performance lens.
| Question | Entrance |
|---|---|
| How much implementation is concentrated in a few Members? | library MyLib.dll -S "Library Metrics" |
| Where do allocations fan out through construction paths? | library MyLib.dll --triage-shape allocation-fanout --top 20 --tsv |
| Which costs repeat through caller loops? | library MyLib.dll -S "Performance:*" --where "CallerLoop=direct" --json |
| Does pooled-resource cleanup deserve attention? | library MyLib.dll -S "Resource Triage" --jsonl |
| When did one allocation appear? | diff --history --package [email protected] -t MyType -m Method --finding analysis.allocation --at first --at last |
Pool churn on exception paths is a hardening/profiling candidate, not a proven
permanent leak or memory-corruption finding. Resource Triage has no positive
completion receipt: describe pooled-resource coverage as unverified, even
when rows are present. Load skill correctness for ownership interpretation.
History checkpoints locate a window, not exact onset. Confirm the adjacent
pair with diff --package [email protected] -t MyType -m Method --finding analysis.allocation; a native Added occurrence establishes introduction,
unlike an aggregate count delta. Load skill compatibility for the search
policy and boundary interpretation.
Stop when each pursued candidate is confirmed, dismissed or explicitly open. Report static observations separately from measured cost, proposed rewrites and unverified coverage.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
dotnet, performance, static-analysis, il-inspection, allocations
Generated from the plugin's indexed repository (richlander/dotnet-inspect) — no native marketplace selected
npx claudepluginhub p/richlander-dotnet-inspect13 skills in this plugin
/dotnet-inspect-compatibilityCompare .NET library versions for API breaks, implementation changes and static analysis shifts; follow exact API correspondence and history without treating comparisons as safe-upgrade verdicts./dotnet-inspect-correctnessInvestigate .NET exception handling, unsafe operations, interop boundaries and pooled-resource ownership using exact Member and IL evidence; static findings do not establish overall safety./dotnet-inspect-decompilerRead .NET method and type implementations as authored-first source, decompiled C#, annotated source or IL; interpret reconstruction fidelity and locate exact code coordinates. Use --offline to prohibit network acquisition.Other plugins' skills for the same job