Skip to content
.NET Crash Dump Collection

.NET Crash Dump Collection Skill

The .NET team's official skill for capturing crash dumps from CoreCLR and NativeAOT apps on Linux, macOS, Windows and inside containers — collection only, no analysis.

GitHub Docs

Install

Install with the skills CLI

One command for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf and dozens of other agents. Needs Node.js; the skill is fetched straight from dotnet/skills.

$ npx skills add dotnet/skills --skill dump-collect

Run it in a terminal. The CLI finds the agents installed on your machine, asks which ones to add the skill to, and whether to install it into the folder you ran it from or for all your projects.

Other ways to install

Copy the whole skill folder — SKILL.md and any scripts or references beside it — into ~/.claude/skills/dump-collect/, where Claude Code picks it up in every project. Only git is needed.

tmp=$(mktemp -d) && \
  git clone --depth 1 --branch main https://github.com/dotnet/skills.git "$tmp" && \
  mkdir -p ~/.claude/skills && \
  cp -R "$tmp"/plugins/dotnet-diag/skills/dump-collect ~/.claude/skills/dump-collect

No scripts or references next to it? Saving the SKILL.md alone as ~/.claude/skills/dump-collect/SKILL.md works too.

Using another agent? Its personal skills folder
Codex
~/.agents/skills/
Cursor
~/.cursor/skills/
GitHub Copilot
~/.copilot/skills/
Gemini CLI
~/.gemini/skills/
Windsurf
~/.codeium/windsurf/skills/
OpenCode
~/.config/opencode/skills/

About

  • CoreCLR vs NativeAOT detection from a binary or a live process
  • Automatic crash-dump configuration and on-demand collection
  • Docker and Kubernetes dump collection, including required capabilities
  • Hard stop signals: no analysis, no code changes, no .NET Framework

Getting a usable crash dump out of a .NET process is a configuration problem, not a debugging one, and the configuration differs by runtime, operating system and whether the process is in a container. Guessing wrong usually means the crash happens again with nothing to show for it.

This official skill from the .NET team walks the decision explicitly. First it establishes the scenario — enable automatic dumps on crash, or capture from a live process — then the platform and the runtime, with concrete commands for telling CoreCLR from NativeAOT from a binary (CorExeMain versus Redhawk Rhp symbols) or from a running process on Linux, macOS and Windows. From there it routes to the right reference: DOTNET_DbgEnableMiniDump environment configuration, dotnet-dump collect, createdump, and the Docker and Kubernetes specifics such as volume mounts and SYS_PTRACE.

What makes it unusually well-behaved as an agent skill is the stop signals section. The skill refuses to open, triage or root-cause a dump, refuses to install analysis tooling such as dotnet-dump analyze or WinDbg, refuses to modify application code, and bails out entirely if the process turns out to be .NET Framework. It reports where the dump landed and stops — which is exactly what you want from a step that runs inside a larger incident workflow.

Try it

Once installed, ask your agent something like:

"Our ASP.NET Core pod is crash-looping in Kubernetes. Configure it so the next crash writes a full dump to a persistent volume."

SKILL.md

The instructions your agent loads, as published by .NET Foundation.

SKILL.md
name
dump-collect
description
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.
license
MIT

.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 lldb for 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:

  1. Goal: Enable automatic crash dumps, or capture a dump from a running process right now?
  2. Platform: Linux, macOS, or Windows? Running in a container (Docker/Kubernetes)?
  3. 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:

ScenarioReference
CoreCLR app (any platform)references/coreclr-dumps.md
NativeAOT app (any platform)references/nativeaot-dumps.md
Any app in Docker or Kubernetesreferences/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:

  1. Confirm the dump output directory exists and has write permissions before enabling collection.
  2. Report the dump file path back to the user after collection succeeds.
  3. Verify configuration took effect — for env vars, echo them; for OS settings, read them back.
  4. Remind the user to disable automatic dumps if they were enabled temporarily — remove or unset DOTNET_DbgEnableMiniDump and related env vars to avoid accumulating dump files.
Install

Skill: MSBuild Binlog Failure Analysis

by .NET Team at Microsoft

Diagnose an MSBuild build failure from a .binlog file — query the binary log through a dedicated MCP server instead of grepping console output, with a text-replay fallback.

Browse all skills →