dotnet-trace-collect
Guide developers through capturing diagnostic artifacts to diagnose production .NET performance issues. Use when the user needs help choosing diagnostic tools, collecting performance data, or understanding tool trade-offs across different environments (Windows/Linux, .NET Framework/modern .NET, container/non-container).
npx skills add dotnet/skills --skill dotnet-trace-collect --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
The skill helps developers diagnose production performance issues by recommending the right diagnostic tools for their environment, guiding data collection, and suggesting analysis approaches. It does not analyze code for anti-patterns or perform the analysis itself.
How it works
- Step 1: Understand the environment by eliciting Symptom, Runtime, OS, Deployment, Admin privileges, and Repro characteristics, then determine workload context.
- Step 2: Recommend diagnostic tools based on environment using a reference lookup and a quick decision matrix. Load the corresponding reference file for detailed command-line usage depending on the environment (Windows/Linux, modern .NET vs .NET Framework, admin rights, container/kubernetes, etc.).
- The workflow includes environment assessment, tool selection, and guidance on commands to run for data collection, with attention to trade-offs between tools (e.g., PerfView vs dotnet-trace).
- For various scenarios (memory dumps, memory leaks, excessive GC, slow requests, hangs, networking issues), it prescribes tool choices and how to collect data (e.g., trace collection, dumps) and cautions against certain actions (e.g., not providing dump commands directly for modern .NET when dumps are needed).
When to use it
Use when investigating production performance issues, choosing diagnostic tools for a specific runtime/OS/deployment, setting up and running diagnostic commands, understanding trade-offs between tools, or collecting diagnostics from containerized or Kubernetes workloads.
What it can touch
- Tools referenced include PerfView, dotnet-trace (and dotnet-trace-linux), perfcollect, dotnet-monitor, and dump-collect. It specifies command-line usage like PerfView collect /ThreadTime, dotnet-trace collect-linux, dotnet-trace collect -p <PID>, and provider configurations for System.Net.* events.
Caveats
- The skill focuses on tool selection and data collection; it does not perform analysis of collected traces or dumps.
- It differentiates behavior across Windows vs Linux, modern .NET vs .NET Framework, container contexts, and administrative privileges, with explicit guidance on when admin rights are required or not.
- It mentions that for memory dumps, certain tools are not supported on specific runtimes (e.g., dump-collect supports modern .NET; for .NET Framework, provide dump commands directly).
# .NET Trace Collect This skill helps developers diagnose production performance issues by recommending the right diagnostic tools for their environment, guiding data collection, and suggesting analysis approaches. It does not analyze code for anti-patterns or perform the analysis itself. ## When to Use - A developer needs to investigate a production performance issue (high CPU, memory leak, slow requests, excessive GC, networking errors, etc.) - Choosing the right diagnostic tool for a specific runtime, OS, or deployment topology - Setting up and running diagnostic tool commands for data collection - Understanding trade-offs between available tools (e.g. PerfView vs dotnet-trace) - Collecting diagnostics from containerized or Kubernetes workloads ## When Not to Use - Reviewing source code for performance anti-patterns (use a code review skill instead) - Benchmarking during development (e.g. BenchmarkDotNet setup) - Analyzing collected trace or dump files (this skill recommends tools for analysis, but does not perform it) ## Inputs | Input | Required | Description | |-------|----------|-------------| | Symptom | Yes | What the developer is observing (high CPU, memory growth, slow r
- When to Use
- When Not to Use
- Inputs
- Workflow
- Step 1: Understand the environment
- Step 2: Recommend diagnostic tools
- Step 3: Guide data collection
- Step 4: Recommend analysis approach
- Validation
- Common Pitfalls
What does the dotnet-trace-collect skill do?
Guide developers through capturing diagnostic artifacts to diagnose production .NET performance issues. Use when the user needs help choosing diagnostic tools, collecting performance data, or understanding tool trade-offs across different environments (Windows/Linux, .NET Framework/modern .NET, container/non-container).
How do I install it?
Run `npx skills add dotnet/skills --skill dotnet-trace-collect --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
