跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 dump-collect

Dump Collect

为现代.NET应用程序配置并收集崩溃垃圾堆. 使用for:为 CoreCLR 或 土著AOT 启用自动崩溃垃圾堆,从运行中捕获垃圾堆。 NET进程,在多克克或库伯内特斯建立垃圾堆放收集,使用多特涅-dump收集或创建um. 不使用下列方法:分析或调试垃圾场,用lldb/windbg/dotnet-dump分析、剖析或追踪进行验尸调查,或用于.NET框架进程.

4404 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

为现代.NET应用程序配置并收集崩溃垃圾堆. 使用for:为 CoreCLR 或 土著AOT 启用自动崩溃垃圾堆,从运行中捕获垃圾堆。 NET进程,在多克克或库伯内特斯建立垃圾堆放收集,使用多特涅-dump收集或创建um. 不使用下列方法:分析或调试垃圾场,用lldb/windbg/dotnet-dump分析、剖析或追踪进行验尸调查,或用于.NET框架进程.

何时用

官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:.NET Crash Dump Collection、Stop Signals、Step 1 — Identify the Scenario、Detecting CoreCLR vs NativeAOT、CoreCLR — has IL metadata / managed entry point、NativeAOT — has Redhawk runtime symbols。 其中含规范建议的小节:分步指令。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/coreclr-dumps.md、references/nativeaot-dumps.md、references/container-dumps.md,属于带资源的技能包,这些文件按需再读。

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

.NET Crash Dump CollectionStop SignalsStep 1 — Identify the ScenarioDetecting CoreCLR vs NativeAOTCoreCLR — has IL metadata / managed entry pointNativeAOT — has Redhawk runtime symbolsOn macOS/Linux, also try:CoreCLR — has a CLI header (IL entry point)NativeAOT — no CLI header, has Redhawk symbolsResolve the binary, then use the same file checksResolve the binary path from the running processCoreCLR — loads coreclr.dll

· 许可:MIT

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
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.
许可
MIT
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 3
  • references/coreclr-dumps.md
  • references/nativeaot-dumps.md
  • references/container-dumps.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「dump-collect」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-91d54855be07960e-Dump-Collect.html
请存为 .cursor/skills/dump-collect/SKILL.md 或 .claude/skills/dump-collect/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/dotnet/skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/dotnet/skills' --list

npx skills add 'https://github.com/dotnet/skills' --skill 'dump-collect'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- 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 | grep -q "CorExeMain" && echo "CoreCLR" # NativeAOT — has Redhawk runtime symbols strings | grep -q "Rhp" && echo "NativeAOT" # On macOS/Linux, also try: nm 2>/dev/null | grep -qi "Rhp" && echo "NativeAOT" ``` **From a binary file (Windows):** ```powershell # CoreCLR — has a CLI header (IL entry point) dumpbin /clrheader | Select-String "CLI Header" -Quiet # NativeAOT — no CLI header, has Redhawk symbols dumpbin /symbols | Select-String "Rhp" -Quiet ``` **From a running process (Linux):** ```bash # Resolve the binary, then use the same file checks BINARY=$(readlink /proc//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 ) strings "$BINARY" | grep -q "CorExeMain" && echo "CoreCLR" || echo "NativeAOT" ``` **From a running process (Windows PowerShell):** ```powershell # CoreCLR — loads coreclr.dll (Get-Process -Id ).Modules.ModuleName -contains "coreclr.dll" # .NET Framework — loads clr.dll (this skill does not apply) (Get-Process -Id ).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.

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…