Stack Trace Crash Analysis for dd-trace-dotnet
npx skills add https://github.com/DataDog/dd-trace-py --skill analyze-crash
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:1430rejit_handler.cpp:263-296When 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:1430Extract 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:
c:\mnt\, D:\a\_work\1\s\, /home/runner/work/dd-trace-dotnet/, etc.tracer/src/Datadog.Tracer.Native/{filename}/Datadog.Tracer.Native//{filename}**/{filename}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}
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:
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.
Use Bash tool with git commands to find relevant context, focusing on commits associated with PRs:
git log --oneline -10 {file}git log --grep="crash" --grep="fix" --oneline -20 (use keywords relevant to the crash area)https://github.com/DataDog/dd-trace-dotnet/pull/{number}Focus on commits with PR links - PRs provide valuable context including descriptions, discussions, and rationale that individual commits lack.
Generate a well-formatted markdown document with these sections:
# 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}
## Crash Flow Reconstruction
{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}
## Related Code
**Relevant PRs and commits**:
- [#{PR number}](https://github.com/DataDog/dd-trace-dotnet/pull/{PR number}): {PR title/description} - {why relevant}
- [#{PR number}](https://github.com/DataDog/dd-trace-dotnet/pull/{PR number}): {PR title/description} - {why relevant}
{Only include commits without PR associations if they are particularly relevant}
**Related code locations**:
- [{file}:{line}](GitHub link) - {description}
- [{file}:{line}](GitHub link) - {description}
## Additional Context
{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.*
powershell.exe -NoProfile -Command 'New-Item -ItemType Directory -Force -Path (Join-Path $env:USERPROFILE ".claude\analysis") | Select-Object -ExpandProperty FullName'mkdir -p ~/.claude/analysis && echo ~/.claude/analysis$env:USERPROFILEcrash-analysis-{YYYYMMDD-HHMMSS}.md (e.g., crash-analysis-20250316-143022.md)https://github.com/DataDog/dd-trace-dotnet/pull/{number}. Only include standalone commit links if particularly relevant and not part of a PRParse the stack trace provided by the user and follow the workflow above to generate a comprehensive crash analysis.
Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take datadog/analyze-crash from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.