New to Claude Skills? Learn how to install them โ†’

dotnet on GitHub

.NET Crash Dump Collection

Free

Easily configure and collect crash dumps for .NET apps.

by dotnet5.1k stars on dotnet/skills
3 views
Updated Aug 10, 2026
Get this skill

Free ยท Opens the source repo

What .NET Crash Dump Collection does

The .NET Crash Dump Collection skill is designed for developers working with modern .NET applications, specifically those using CoreCLR and NativeAOT runtimes. It provides a streamlined process to enable and collect crash dumps across various platforms, including Linux, macOS, and Windows, as well as within containerized environments like Docker and Kubernetes. This skill is particularly useful for automating the collection of crash dumps without needing to delve into analysis or debugging processes, which are outside its scope.

When using this skill, users will follow a structured approach to identify their specific scenario, which involves determining whether they need to enable automatic crash dumps or capture a dump from a running process. It outlines clear steps to differentiate between CoreCLR and NativeAOT applications, ensuring that users only apply the skill in appropriate contexts. The skill emphasizes the importance of proper environment configuration and permissions to facilitate successful dump collection.

The skill also includes reference files tailored to different scenarios, guiding users through the necessary steps to configure or collect dumps based on the runtime and platform in use. Users are reminded to verify their configurations and to manage the lifecycle of the dump files responsibly, including disabling automatic dump collection when it is no longer needed.

This skill is ideal for developers who need to set up crash dump collection in their .NET applications quickly and efficiently, allowing them to focus on resolving issues without getting bogged down in the complexities of dump analysis.

When to use it

Use this skill when you need to enable automatic crash dumps or capture dumps from running .NET processes in a straightforward manner.

When not to use it

This skill is not suitable for analyzing crash dumps or debugging issues; it focuses solely on the collection aspect.

What you can build with it

Automatic Crash Dump Configuration

Set up automatic crash dumps for a CoreCLR application running in a Docker container.

On-Demand Dump Capture

Capture a crash dump from a running NativeAOT process on a macOS system.

Multi-Platform Dump Collection

Configure and collect dumps for a .NET application running across Linux and Windows environments.

How to install .NET Crash Dump Collection

View source

1. Install with the skills CLI

npx skills add dotnet/skills/dump-collect --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by dotnet

.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.

Frequently asked questions about .NET Crash Dump Collection

Similar skills