Agent skill
dump-collect
Configure and collect crash dumps for modern .NET applications. USE FOR: enabling automatic crash dumps for CoreCLR or NativeAOT, capturing dumps from running .NET processes, setting up dump collection in Docker or Kubernetes, using dotnet-dump collect or createdump. DO NOT USE FOR: analyzing or debugging dumps, post-mortem investigation with lldb/windbg/dotnet-dump analyze, profiling or tracing, or for .NET Framework processes.
Install this agent skill to your Project
npx add-skill https://github.com/managedcode/dotnet-skills/tree/main/catalog/Tools/Official-DotNet-Diagnostics/skills/dump-collect
SKILL.md
.NET Crash Dump Collection
This skill configures and collects crash dumps for modern .NET applications (CoreCLR and NativeAOT) on Linux, macOS, and Windows — including containers.
Stop Signals
🚨 Read before starting any workflow.
- Stop after dumps are enabled or collected. Do not open, analyze, or triage dump files.
- If the user already has a dump file, this skill does not cover analysis. Let them know analysis is out of scope.
- Do not install analysis tools (dotnet-dump analyze, windbg). Only install collection tools (dotnet-dump collect). Using
lldbfor on-demand dump capture on macOS is allowed — it ships with Xcode command-line tools and is not being used for analysis. - Do not trace root cause of crashes. Report the dump file location and move on.
- Do not modify application code. Configuration is environment-only (env vars, OS settings, container specs).
Step 1 — Identify the Scenario
Ask or determine:
- Goal: Enable automatic crash dumps, or capture a dump from a running process right now?
- Platform: Linux, macOS, or Windows? Running in a container (Docker/Kubernetes)?
- Runtime: CoreCLR or NativeAOT?
Detecting CoreCLR vs NativeAOT
From a binary file (Linux/macOS):
# CoreCLR — has IL metadata / managed entry point
strings <binary> | grep -q "CorExeMain" && echo "CoreCLR"
# NativeAOT — has Redhawk runtime symbols
strings <binary> | grep -q "Rhp" && echo "NativeAOT"
# On macOS/Linux, also try:
nm <binary> 2>/dev/null | grep -qi "Rhp" && echo "NativeAOT"
From a binary file (Windows):
# CoreCLR — has a CLI header (IL entry point)
dumpbin /clrheader <binary.exe> | Select-String "CLI Header" -Quiet
# NativeAOT — no CLI header, has Redhawk symbols
dumpbin /symbols <binary.exe> | Select-String "Rhp" -Quiet
From a running process (Linux):
# Resolve the binary, then use the same file checks
BINARY=$(readlink /proc/<pid>/exe)
strings "$BINARY" | grep -q "CorExeMain" && echo "CoreCLR" || echo "NativeAOT"
From a running process (macOS):
# Resolve the binary path from the running process
BINARY=$(ps -o comm= -p <pid>)
strings "$BINARY" | grep -q "CorExeMain" && echo "CoreCLR" || echo "NativeAOT"
From a running process (Windows PowerShell):
# CoreCLR — loads coreclr.dll
(Get-Process -Id <pid>).Modules.ModuleName -contains "coreclr.dll"
# .NET Framework — loads clr.dll (this skill does not apply)
(Get-Process -Id <pid>).Modules.ModuleName -contains "clr.dll"
If the app is .NET Framework (
clr.dll), stop. This skill covers modern .NET (CoreCLR and NativeAOT) only.If neither CoreCLR nor NativeAOT is detected, stop. This skill only applies to .NET applications — do not proceed.
Step 2 — Load the Appropriate Reference
Based on the scenario identified in Step 1, read the relevant reference file:
| Scenario | Reference |
|---|---|
| CoreCLR app (any platform) | references/coreclr-dumps.md |
| NativeAOT app (any platform) | references/nativeaot-dumps.md |
| Any app in Docker or Kubernetes | references/container-dumps.md (then also load the runtime-specific reference) |
Step 3 — Execute
Follow the instructions in the loaded reference to configure or collect dumps. Always:
- Confirm the dump output directory exists and has write permissions before enabling collection.
- Report the dump file path back to the user after collection succeeds.
- Verify configuration took effect — for env vars, echo them; for OS settings, read them back.
- Remind the user to disable automatic dumps if they were enabled temporarily — remove or unset
DOTNET_DbgEnableMiniDumpand related env vars to avoid accumulating dump files.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
dotnet-project-setup
Create or reorganize .NET solutions with clean project boundaries, repeatable SDK settings, and a maintainable baseline for libraries, apps, tests, CI, and local development.
csharp-scripts
Run single-file C# programs as scripts (file-based apps) for quick experimentation, prototyping, and concept testing. Use when the user wants to write and execute a small C# program without creating a full project.
dotnet-pinvoke
Correctly call native (C/C++) libraries from .NET using P/Invoke and LibraryImport. Covers function signatures, string marshalling, memory lifetime, SafeHandle, and cross-platform patterns. USE FOR: writing new P/Invoke or LibraryImport declarations, reviewing or debugging existing native interop code, wrapping a C or C++ library for use in .NET, diagnosing crashes, memory leaks, or corruption at the managed/native boundary. DO NOT USE FOR: COM interop, C++/CLI mixed-mode assemblies, or pure managed code with no native dependencies.
nuget-trusted-publishing
Set up NuGet trusted publishing (OIDC) on a GitHub Actions repo — replaces long-lived API keys with short-lived tokens. USE FOR: trusted publishing, NuGet OIDC, keyless NuGet publish, migrate from NuGet API key, NuGet/login, secure NuGet publishing. DO NOT USE FOR: publishing to private feeds or Azure Artifacts (OIDC is nuget.org only). INVOKES: shell (powershell or bash), edit, create, ask_user for guided repo setup.
dotnet-legacy-aspnet
Maintain classic ASP.NET applications on .NET Framework, including Web Forms, older MVC, and legacy hosting patterns, while planning realistic modernization boundaries.
dotnet-code-review
Review .NET changes for bugs, regressions, architectural drift, missing tests, incorrect async or disposal behavior, and platform-specific pitfalls before you approve or merge them.
Didn't find tool you were looking for?