dump-collect — скилл для Claude Code: что делает и как установить
Скилл для Claude Code и других агентов: настраивает автоматические краш-дампы .NET и снимает дамп с живого процесса на Linux, macOS и Windows, включая контейнеры.
npx skills add dotnet/skills --skill dump-collect -a claude-codeЧто делает dump-collect
Скилл ведёт агента по трём шагам. Сначала выясняет цель: включить дампы на будущее или снять дамп с работающего процесса. Потом платформу и рантайм, затем подгружает нужный справочник — references/coreclr-dumps.md, references/nativeaot-dumps.md или references/container-dumps.md для Docker и Kubernetes. Дальше работа идёт по инструкции из этого файла.
CoreCLR от NativeAOT скилл отличает по самому бинарнику: strings <binary> | grep "CorExeMain" на Linux и macOS, nm, dumpbin /clrheader на Windows, а для живого процесса хватает списка модулей. Настройка остаётся внешней: переменные окружения вроде DOTNET_DbgEnableMiniDump, параметры ОС, спецификация контейнера. Код приложения не правится.
Границы прописаны в самом скилле. Он останавливается, когда дамп включён или снят. Анализ, dotnet-dump analyze, windbg, разбор первопричины падения — не его дело. Процессы .NET Framework, которые грузят clr.dll, тоже мимо: скилл рассчитан на CoreCLR и NativeAOT. Включили дампы на время — потом снимите DOTNET_DbgEnableMiniDump, иначе файлы копятся.
Какие задачи решает
- включить автоматические краш-дампы для CoreCLR-сервиса
- снять дамп с работающего процесса по
<pid> - настроить сбор дампов в поде Kubernetes
- отличить NativeAOT-сборку от CoreCLR по бинарнику
Примеры запросов агенту
- Включи автоматические краш-дампы для нашего .NET-сервиса в Docker, файлы складывай в
/var/dumps - Сними дамп с процесса
<pid>, он висит на проде, и скажи путь к файлу - Определи, NativeAOT у нас сборка или CoreCLR, и настрой дампы под неё
Как установить dump-collect
1Через Skills CLI (Vercel)
npx skills add dotnet/skills --skill dump-collect -a claude-code2Вручную: положить файлы
~/.claude/skills/dump-collect/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/dump-collect/
1Через Skills CLI (Vercel)
npx skills add dotnet/skills --skill dump-collect -a codex2Вручную: положить файлы
.agents/skills/dump-collect/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add dotnet/skills --skill dump-collect -a cursor2Вручную: положить файлы
.cursor/skills/dump-collect/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install dotnet/skills dump-collect2Вручную: положить файлы
.github/skills/dump-collect/SKILL.md1Через Skills CLI (Vercel)
npx skills add dotnet/skills --skill dump-collect -a gemini-cli2Командой платформы
gemini skills install https://github.com/dotnet/skills --path plugins/dotnet-diag/skills/dump-collectВручную: положить файлы
.devin/skills/dump-collect/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add dotnet/skills --skill dump-collect -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о dump-collect
Как установить dump-collect в Claude Code?
Командой npx skills add dotnet/skills --skill dump-collect -a claude-code. Файл скилла окажется в ~/.claude/skills/dump-collect/SKILL.md.
Что делает dump-collect?
Помогает агенту включить автоматические краш-дампы для приложения на CoreCLR или NativeAOT либо снять дамп с уже запущенного процесса. Работает на Linux, macOS и Windows, в том числе внутри контейнеров.
Скилл разберёт готовый дамп?
Нет. Он останавливается на сборе и сообщает путь к файлу, а dotnet-dump analyze, windbg и поиск первопричины падения заявлены вне его задач.
Исходный текст
SKILL.md · MIT
--- 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):** ```bash # 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):** ```powershell # 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):** ```bash # 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):** ```bash # 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):** ```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: 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.
© dotnet · MIT · dotnet/skills