P/Invoke and LibraryImport for .NET
dotnet/skills
Helps write, review and debug .NET declarations that call native C and C++ libraries, covering signatures, string marshalling, memory lifetime and SafeHandle.
Stack Trace Crash Analysis for dd-trace-dotnet. An agent skill from DataDog/dd-trace-dotnet.
The automated check flagged lines worth reading first. See the safety section below.
$ npx skills add DataDog/dd-trace-dotnet --skill analyze-crash -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install DataDog/dd-trace-dotnet analyze-crash --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/DataDog/dd-trace-dotnet.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/analyze-crash .claude/skills/analyze-crash && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "analyze-crash" agent skill from https://github.com/DataDog/dd-trace-dotnet/tree/master/.claude/skills/analyze-crash into .claude/skills/analyze-crash/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "analyze-crash", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/DataDog/dd-trace-dotnet/tree/master/.claude/skills/analyze-crashType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add DataDog/dd-trace-dotnet --skill analyze-crash -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install DataDog/dd-trace-dotnet analyze-crash --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DataDog/dd-trace-dotnet.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/analyze-crash .agents/skills/analyze-crash && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "analyze-crash" agent skill from https://github.com/DataDog/dd-trace-dotnet/tree/master/.claude/skills/analyze-crash into .agents/skills/analyze-crash/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "analyze-crash", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add DataDog/dd-trace-dotnet --skill analyze-crash -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install DataDog/dd-trace-dotnet analyze-crash --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DataDog/dd-trace-dotnet.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/analyze-crash .cursor/skills/analyze-crash && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "analyze-crash" agent skill from https://github.com/DataDog/dd-trace-dotnet/tree/master/.claude/skills/analyze-crash into .cursor/skills/analyze-crash/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "analyze-crash", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/DataDog/dd-trace-dotnet.git --path .claude/skills/analyze-crash--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add DataDog/dd-trace-dotnet --skill analyze-crash -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install DataDog/dd-trace-dotnet analyze-crash --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DataDog/dd-trace-dotnet.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/analyze-crash .gemini/skills/analyze-crash && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "analyze-crash" agent skill from https://github.com/DataDog/dd-trace-dotnet/tree/master/.claude/skills/analyze-crash into .gemini/skills/analyze-crash/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "analyze-crash", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install DataDog/dd-trace-dotnet analyze-crashInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add DataDog/dd-trace-dotnet --skill analyze-crash -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/DataDog/dd-trace-dotnet.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/analyze-crash .github/skills/analyze-crash && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "analyze-crash" agent skill from https://github.com/DataDog/dd-trace-dotnet/tree/master/.claude/skills/analyze-crash into .github/skills/analyze-crash/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "analyze-crash", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add DataDog/dd-trace-dotnet --skill analyze-crash -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install DataDog/dd-trace-dotnet analyze-crash --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DataDog/dd-trace-dotnet.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/analyze-crash .opencode/skills/analyze-crash && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "analyze-crash" agent skill from https://github.com/DataDog/dd-trace-dotnet/tree/master/.claude/skills/analyze-crash into .opencode/skills/analyze-crash/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "analyze-crash", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
analyze-crashStack Trace Crash Analysis for dd-trace-dotnet. An agent skill from DataDog/dd-trace-dotnet.
Analyze Crash is an agent skill from DataDog/dd-trace-dotnet, published by the product's own GitHub organization. Stack Trace Crash Analysis for dd-trace-dotnet
Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Debugging and Mobile performance. It works with .NET, Datadog and C++. The repository describes itself as: .NET Client Library for Datadog APM. The licence is Apache-2.0.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 512b980. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Analyze Crash loads about 2.6k tokens when it runs. Until then it costs about 15 tokens; SKILL.md has 534 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found patterns that need a careful read before installing.
⟨U+200B⟩```cpp⟨U+200B⟩```⟨U+200B⟩```cpp⟨U+200B⟩```Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from DataDog/dd-trace-dotnet at commit 512b980, republished under its Apache-2.0 licence (© DataDog). 534 words, ~2,616 tokens.
.claude/skills/analyze-crash/SKILL.md (or your agent's skills folder).You are analyzing a crash stack trace for the dd-trace-dotnet repository. Perform a comprehensive investigation to help engineers understand and triage the crash. Focus on de-mystifying the crashing thread and explaining how the crash occurred.
The user has provided a crash stack trace. Parse and analyze it systematically.
When referencing files in the dd-trace-dotnet repository, always provide clickable GitHub links in addition to local paths:
Format:
[filename:line](https://github.com/DataDog/dd-trace-dotnet/blob/master/path/to/file#Lline)Examples:
[cor_profiler.cpp:1430](https://github.com/DataDog/dd-trace-dotnet/blob/master/tracer/src/Datadog.Tracer.Native/cor_profiler.cpp#L1430)[rejit_handler.cpp:263-296](https://github.com/DataDog/dd-trace-dotnet/blob/master/tracer/src/Datadog.Tracer.Native/rejit_handler.cpp#L263-L296)When to use:
Path construction:
https://github.com/DataDog/dd-trace-dotnet/blob/master/C:\Users\...\dd-trace-dotnet\ or similar prefixes)#L{lineNumber} for single line or #L{start}-L{end} for rangesC:\Users\...\dd-trace-dotnet\tracer\src\Datadog.Tracer.Native\cor_profiler.cpp:1430 becomes [cor_profiler.cpp:1430](https://github.com/DataDog/dd-trace-dotnet/blob/master/tracer/src/Datadog.Tracer.Native/cor_profiler.cpp#L1430)Extract all stack frames and classify each one:
Classification Categories:
ReJitManager::, ProfToEEInterfaceImpl::, ICorProfiler*, CLR DLL references (clr.dll, coreclr.dll, mscorwks.dll)trace::, debugger::, fault_tolerant::, iast::), or paths containing Datadog.Tracer.NativeDatadog.Trace.dll!Create a classification table showing frame number, type, location, and brief description.
For each dd-trace-dotnet frame that includes file path and line number:
Extract and normalize path: Remove build-specific prefixes
c:\mnt\, D:\a\_work\1\s\, /home/runner/work/dd-trace-dotnet/, etc.tracer/src/Datadog.Tracer.Native/{filename}Find file in repository:
**/Datadog.Tracer.Native/**/{filename}**/{filename}Read code with context:
For each critical dd-trace-dotnet frame:
// >>> CRASH POINT <<<Format each code section as:
### Frame X: {function_name} ([{file}:{line}](GitHub link))
```cpp
// {file}:{start_line}-{end_line}
{code with crash line marked}Analysis: {Explanation of what this code does and why it failed}
### Phase 4: Reconstruct Crash Flow
Build a narrative explaining the execution flow leading to the crash. This is the primary goal of the analysis - to help engineers understand what happened:
1. **Entry point**: Where did execution start? (e.g., profiler callback, background thread loop)
2. **Key operations**: What was the code trying to do?
3. **Critical transitions**: Where did control flow between components?
4. **Failure point**: Where and why did it crash?
5. **Crash type**: Describe what type of crash this is (e.g., null pointer dereference, access violation, invalid module reference, race condition, etc.)
Write this as a clear, step-by-step narrative that someone unfamiliar with the code can follow. Focus on explaining HOW the crash happened based on the evidence in the stack trace and code, without prescribing a specific fix.
### Phase 5: Identify Related Code
Use Bash tool with git commands to find relevant context, focusing on commits associated with PRs:
1. Check recent commits to the affected files: `git log --oneline -10 {file}`
2. Search for related changes: `git log --grep="crash" --grep="fix" --oneline -20` (use keywords relevant to the crash area)
3. For each relevant commit, check if it's associated with a PR:
- Look for PR numbers in commit messages (e.g., "(#1234)" or "PR #1234")
- If found, construct PR link: `https://github.com/DataDog/dd-trace-dotnet/pull/{number}`
4. Prioritize commits with PR associations - these have more context
5. Look for similar code patterns in other files that might provide context
**Focus on commits with PR links** - PRs provide valuable context including descriptions, discussions, and rationale that individual commits lack.
## Output Format
Generate a well-formatted markdown document with these sections:
```markdown
# Crash Analysis Report
**Generated**: {ISO 8601 timestamp}
## Executive Summary
{2-3 sentence summary of what crashed and where in the code. Focus on demystifying the crash location and describing what the crashing thread was doing.}
## Stack Trace Classification
### Crashed Thread: #{thread_number}
| # | Type | Location | Description |
|---|------|----------|-------------|
| 0 | {type} | {function/location} | {brief description} |
| 1 | {type} | {function/location} | {brief description} |
| ... | ... | ... | ... |
{If multiple threads provided, note other interesting threads but focus on crashed thread}
## Code Context
{For each critical dd-trace-dotnet frame, show code with analysis}
### Frame X: {function} ([{file}:{line}](GitHub link))
```cpp
{code snippet with crash line marked}Analysis: {Explanation of what this code does}
{Step-by-step narrative explaining the execution flow from start to crash point}
Crash Type: {Description of what type of crash this is - e.g., null pointer dereference, access violation, invalid module reference, race condition}
How it happened: {Clear explanation of the sequence of events that led to the crash based on the stack trace and code analysis}
Relevant PRs and commits:
{Only include commits without PR associations if they are particularly relevant}
Related code locations:
{Any additional useful context about the application environment, runtime, features in use, or relevant background}
Analysis generated by Claude Code /analyze-crash command This analysis is intended to help understand and triage the crash. Engineers should review this analysis to determine if a code fix is needed.
## Output File Management
1. **Create output directory**:
- On Windows: Use `powershell.exe -NoProfile -Command 'New-Item -ItemType Directory -Force -Path (Join-Path $env:USERPROFILE ".claude\analysis") | Select-Object -ExpandProperty FullName'`
- On Linux/Mac: Use `mkdir -p ~/.claude/analysis && echo ~/.claude/analysis`
- **IMPORTANT**: On Windows, you MUST use single quotes around the PowerShell command to prevent bash from interpreting `$env:USERPROFILE`
2. **Generate filename**: Use format `crash-analysis-{YYYYMMDD-HHMMSS}.md` (e.g., `crash-analysis-20250316-143022.md`)
3. **Save file**: Write the markdown analysis to the file
4. **Return path**: Tell the user the full path where the analysis was saved
## Important Guidelines
- **Focus on triage and understanding**: The goal is to help engineers understand HOW the crash happened, not to prescribe specific fixes
- **Describe crash types**: It's okay to identify what type of crash this is (e.g., null pointer, race condition, invalid reference), but don't match against fixed "patterns"
- **End at explanation**: Phase 4 (Crash Flow Reconstruction) should provide a clear explanation of how the crash occurred. Engineers will then decide on fixes
- **No fix suggestions**: Do not suggest code changes, patches, or specific implementation fixes. Focus on analysis only
- **Handle path variations gracefully**: Stack traces from different build environments will have different path prefixes
- **Continue with missing information**: If a file can't be located, note this but continue the analysis with available information
- **Focus on the crashed thread**: If multiple threads are provided, focus primarily on the crashed thread but mention other relevant threads
- **Be concise but thorough**: Provide enough detail to understand the issue without unnecessary verbosity
- **Always include GitHub links**: Every file:line reference should have a clickable GitHub link to master branch
- **Prefer PR links over commits**: When git log finds relevant commits, prioritize those associated with PRs. Extract PR numbers from commit messages (e.g., "(#1234)") and link to the PR: `https://github.com/DataDog/dd-trace-dotnet/pull/{number}`. Only include standalone commit links if particularly relevant and not part of a PR
- **Mark uncertainties**: If something is unclear or speculative, explicitly state this
## Now Analyze
Parse the stack trace provided by the user and follow the workflow above to generate a comprehensive crash analysis.© DataDog, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. 4 hidden characters (zero-width or bidirectional) removed. Raw file
Just SKILL.md in .claude/skills/analyze-crash of DataDog/dd-trace-dotnet.
Open the folder on GitHubat commit 512b980
Analyze Crash next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Analyze Crash this skillDataDog/dd-trace-dotnet | 573 | — | ~2.6k | Automated safety check: Warn | Apache-2.0 | |
| P/Invoke and LibraryImport for .NETdotnet/skills | 5.6k | 1 repos | ~4.8k | Automated safety check: Pass | MIT | |
| Winapp CLIboshi-xixixi/TraeSkill | 275 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Sokol Netelix22/Sokol.NET | 154 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Debugging CodeJetBrains/skills | 364 | 1 repos | ~3.8k | Automated safety check: Pass | None | |
| Dbgtheodo-group/debug-that | 158 | — | ~2.2k | Automated safety check: Pass | MIT |
dotnet/skills
Helps write, review and debug .NET declarations that call native C and C++ libraries, covering signatures, string marshalling, memory lifetime and SafeHandle.
boshi-xixixi/TraeSkill
Windows App Development CLI (winapp) for building, packaging, signing, debugging, and UI-automating Windows applications.
elix22/Sokol.NET
Sokol.NET framework development — use for ANY work in this repo: creating or debugging examples, building/running for desktop/Android/iOS/Web, writing or compiling shaders, adding a new C/C++…
JetBrains/skills
A skill your agent uses for debugger-driven runtime root-cause analysis in Rider-supported solutions and projects, including .NET/C, F, VB, C++, Unity, Unreal Engine, and other GameDev or…
theodo-group/debug-that
Debug applications using the dbg CLI debugger. An agent skill from theodo-group/debug-that.
dotnet/maui
Traces a reported dotnet/maui issue back to the commit or pull request that introduced it, separating confirmed causes from likely candidates.
DataDog/dd-trace-dotnet
Update/bump the libdatadog native library version in dd-trace-dotnet.
DataDog/dd-trace-dotnet
Analyze Azure DevOps CI build failures in dd-trace-dotnet pipeline.
DataDog/dd-trace-dotnet
Dev/test workflow for tracer engineers working on the Datadog .NET tracer — build a local Datadog.AzureFunctions NuGet package, deploy it to a test Azure Function App, trigger it, and analyze…
DataDog/dd-trace-dotnet
Error Stack Trace Analysis for dd-trace-dotnet. An agent skill from DataDog/dd-trace-dotnet.
DataDog/dd-trace-dotnet
Perform a review on a GitHub PR, leaving comments on the PR. An agent skill from DataDog/dd-trace-dotnet.
Categories
Stack Trace Crash Analysis for dd-trace-dotnet. An agent skill from DataDog/dd-trace-dotnet. Analyze Crash is an agent skill from DataDog/dd-trace-dotnet, published by the product's own GitHub organization.
Analyze Crash fits situations like: tasks that involve Debugging; tasks that involve Mobile performance.
Run `npx skills add DataDog/dd-trace-dotnet --skill analyze-crash -a claude-code`. Or copy the skill folder (.claude/skills/analyze-crash in DataDog/dd-trace-dotnet) into .claude/skills/analyze-crash in your project. Claude Code loads it when a task matches its description.
Run `npx skills add DataDog/dd-trace-dotnet --skill analyze-crash -a codex`. Or copy the skill folder (.claude/skills/analyze-crash in DataDog/dd-trace-dotnet) into .agents/skills/analyze-crash in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DataDog/dd-trace-dotnet --skill analyze-crash -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/analyze-crash, .gemini/skills/analyze-crash, .github/skills/analyze-crash and .opencode/skills/analyze-crash in your project.
SKILL.md names no scripts, command-line tools or credentials: Analyze Crash is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md flagged 4 warning(s): contains zero-width characters. Read the flagged lines before installing; the check is not a guarantee either way.
Analyze Crash is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Analyze Crash: P/Invoke and LibraryImport for .NET (dotnet/skills, 5.6k stars), Winapp CLI (boshi-xixixi/TraeSkill, 275 stars), Sokol Net (elix22/Sokol.NET, 154 stars) and Debugging Code (JetBrains/skills, 364 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
DataDog (a GitHub organization, an official publisher) maintains it in DataDog/dd-trace-dotnet, which has 573 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 8, 2026.
Source: DataDog/dd-trace-dotnet on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.