dotnet-trace-collect
Guide developers through capturing diagnostic artifacts to diagnose production .NET performance issues
Install / Use
npx skills add dotnet/skills --skill dotnet-trace-collectInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of dotnet-trace-collect
dotnet-trace-collect scores 86/100 on our quality scale, 2331st of 4,700 Development & Engineering skills we index (top 50%).
Its SKILL.md is 24 KB long, well organised into 26 sections and no code examples: a thorough specification that gives an agent plenty to work with.
With 5,471 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so dotnet-trace-collect is actively maintained.
- Our last check on 2026-11-03 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-27. Automated pattern scan on 2026-09-27. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
dotnet-trace-collect compared with similar skills
All 4 of these similar skills score higher than dotnet-trace-collect; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| dotnet-trace-collect (this skill)by dotnet | 86 | 5.5k | 53d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.6k | today | MCP Server |
Frequently asked questions
- How do I install dotnet-trace-collect?
- Run
npx skills add dotnet/skills --skill dotnet-trace-collect. The install tabs above show the steps for each supported agent. - Which AI agents does dotnet-trace-collect work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is dotnet-trace-collect safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is dotnet-trace-collect still maintained?
- The repository was last updated about 2 months ago, so dotnet-trace-collect is actively maintained.
Skill content
View source on GitHubname: dotnet-trace-collect description: 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). license: MIT
.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 requests, hangs, excessive GC, HTTP 5xx errors, networking timeouts, connection failures, assembly loading failures, etc.) | | Runtime | Yes | .NET Framework or modern .NET (and version, especially whether .NET 10+) | | OS | Yes | Windows or Linux | | Deployment | Yes | Non-container, container, or Kubernetes | | Admin privileges | Recommended | Whether the developer has admin/root access on the target machine | | Repro characteristics | Recommended | Whether the issue is easy to reproduce or requires a long time to manifest |
Workflow
Step 1: Understand the environment
Determine or ask the developer to clarify:
- Symptom: What they are observing (high CPU, memory leak, slow requests, hangs, excessive GC, HTTP 5xx errors, networking timeouts, connection failures, assembly loading failures, etc.)
- Runtime: .NET Framework or modern .NET? If modern .NET, which version? (Especially whether .NET 10 or later.)
- OS: Windows or Linux?
- Deployment: Running directly on the host, in a container, or in Kubernetes?
- Admin privileges: Do they have admin/root access on the target machine or container?
- Repro characteristics: Does the issue reproduce quickly, or does it take a long time to manifest?
- Workload context: Determine or ask the user if you are running in the context of the workload (i.e., on the same machine or connected to the same environment where the issue is occurring). If so, you can run diagnostic commands directly on their behalf. If not, provide the commands as guidance for the user to run themselves.
Use this information to select the right tool in Step 2.
Step 2: Recommend diagnostic tools
Select tools based on the environment using the priority rules below. Once a tool is selected, load the corresponding reference file for detailed command-line usage.
Tool reference lookup
| Environment | Reference file(s) |
|-------------|-------------------|
| Windows + modern .NET + admin | references/perfview.md |
| Windows + modern .NET, no admin | references/dotnet-trace-collect.md |
| Windows + .NET Framework | references/perfview.md |
| Linux + .NET 10+ + root | references/dotnet-trace-collect-linux.md |
| Linux + pre-.NET 10 | references/dotnet-trace-collect.md |
| Linux + native stacks needed | references/perfcollect.md |
| Container/K8s (console access) | references/dotnet-trace-collect.md (or dotnet-trace-collect-linux.md) |
| Container/K8s (no console) | references/dotnet-monitor.md |
Quick decision matrix (first-pass triage)
| Environment | Preferred tool | Fallback / Notes |
|-------------|----------------|------------------|
| Windows + modern .NET + admin | PerfView | If admin is unavailable, use dotnet-trace |
| Windows + .NET Framework + admin | PerfView | Without admin, there is no trace fallback; for hangs/memory leaks, provide dump commands directly (procdump -ma or Task Manager) since dump-collect does not support .NET Framework |
| Linux + .NET 10+ + root | dotnet-trace collect-linux | Use dotnet-trace if root or kernel prerequisites are not met |
| Linux + pre-.NET 10 | dotnet-trace | Add perfcollect when native stacks are needed (requires root) |
| Linux container/Kubernetes | Console tools if in workload context; dotnet-monitor if no console access | See Linux Container / Kubernetes section for details |
Windows (non-container, modern .NET)
- PerfView (preferred) — produces richer ETW-based data; requires admin privileges. For slow requests, add
/ThreadTimeto capture thread-level wait and block detail. dotnet-trace— fallback when admin privileges are not available.- For long-running repros: use PerfView with a
/StopOntrigger that fires on the symptom you want to capture (e.g.,/StopOnPerfCounter,/StopOnGCEvent,/StopOnException) and a circular buffer (/CircularMB+/BufferSizeMB). Critical: the stop trigger must fire on the interesting event, not the recovery. The circular buffer continuously overwrites old data, so if you trigger on recovery, the buffer may have already overwritten the interesting behavior by the time collection stops. Only add/StartOnif the start event is known to precede the stop event. For slow requests, do not include a stop trigger by default — let the user design one based on their specific scenario.
Windows containers
-
PerfView — most Windows containers (including Kubernetes on Windows) use process-isolation by default. Collect from the host with
/EnableEventsInContainers. After collection, you have two options:- Analyze locally while the container is still running — PerfView can reach into the live container to resolve symbols, so you can open the trace immediately on the host machine.
- Analyze off-machine — before the container shuts down, copy the
.etl.zipinto the container and runPerfViewCollect merge /ImageIDsOnlyinside it to embed symbol information. Then copy the merged trace out. Without this merge step, symbols for binaries inside the container will be unresolvable on other machines.
For the less common Hyper-V containers, collect inside the container directly. See references/perfview.md for detailed commands.
-
dotnet-monitor,dotnet-trace— inside the container if the tools are installed in the image. For dumps, invoke thedump-collectskill.
Windows (.NET Framework)
- PerfView — the primary diagnostic tool for .NET Framework on Windows. Requires admin.
- Same trigger guidance for long repros: use
/StopOntriggers that fire on the symptom (e.g.,/StopOnPerfCounter,/StopOnGCEvent,/StopOnException) with/CircularMB+/BufferSizeMB. - Without admin: PerfView requires admin, and there are no alternative trace tools for .NET Framework. Process dumps can still be captured without admin — provide dump commands directly (e.g.,
procdump -ma <PID>or Task Manager) since thedump-collectskill does not support .NET Framework. Dumps can help diagnose hangs and memory leaks. However, for high CPU, slow requests, and excessive GC, there is no way to investigate on .NET Framework without admin access. Advise the user to obtain admin privileges.
Linux (non-container, .NET 10+)
dotnet-trace collect-linux(preferred) — usesperf_eventsfor richer traces including native call stacks and kernel events. Captures machine-wide by default (no PID required). Requires root and kernel >= 6.4.dotnet-trace— fallback when root privileges are not available or kernel requirements are not met. Managed stacks only.
Linux (non-container, pre-.NET 10)
dotnet-trace(preferred) — managed trace collection; no admin required.perfcollect— when native call stacks are needed (requires admin/root).
Linux Container / Kubernetes
If running in the context of the workload (i.e., you have console access to the container), prefer console-based tools. These are easier to set up than dotnet-monitor, which requires authentication configuration and sidecar deployment:
dotnet-trace collect-linux(.NET 10+ with root) — produces the richest traces including native call stacks and kernel events.dotnet-trace— inside the container if the tool is installed in the image. For dumps, invoke thedump-collectskill.perfcollect— inside the container when native stacks are needed on pre-.NET 10 (requiresSYS_ADMIN/--privileged).
If not running in the workload context (no console access), or if dotnet-monitor is already deployed:
dotnet-monitor— designed for containers; runs as a sidecar. No tools needed in the app container. Easiest option when console access is not available.
Memory dumps
When dumps are needed (memory leaks, hangs), do not provide dump collection commands directly for modern .NET — invoke the dump-collect skill instead. The dump-collect skill only supports modern .NET (.NET Core 3.0+). For .NET Framework, provide dump collection guidance directly (e.g., procdump -ma <PID> or Task Manager). This skill focuses on trace collection only.
Memory leaks
- Capture two dumps as memory is increasing (e.g., one early, one after significant growth). Invoke the
dump-collectskill for dump collection — do not provide dump commands directly. Diff the dumps in PerfView to see which objects have increased — this is the most effective way to identify what is leaking. - Without admin privileges: Two process dumps can give a sense of what's growing on the heap, but may not be enough to identify the root cause. If dumps aren't sufficient, reproduce the issue in an environment where admin privileges are available to collect richer data (traces).
- Modern .NET on Linux (pre-.NET 10): Recommend two dump captures (invoke
dump-collectskill) for heap diff, plusdotnet-tracewhile memory is growing (for allocation tracking). No trigger needed — capture during the growth period. Both together give the best picture. - Modern .NET 10+ on Linux with admin: Recommend two dump captures (invoke
dump-collectskill) for heap diff, plusdotnet-trace collect-linuxwhile memory is growing (richer data including native stacks). No trigger needed. - .NET Framework: Recommend two dumps plus a PerfView trace while memory is growing to see what is being allocated. The
dump-collectskill does not support .NET Framework, so provide dump commands directly (e.g.,procdump -ma <PID>or right-click → Create Dump File in Task Manager). No trigger is needed — just capture the trace during the growth period. Do not wait for anOutOfMemoryException.
Excessive GC
Excessive GC requires a trace to analyze GC events, pause times, and allocation patterns — a dump is not sufficient.
- Windows (PerfView): Use
PerfView collect /GCCollectOnlyto capture GC events. - Linux (dotnet-trace): Use
dotnet-trace collect -p <PID> --profile gc-verbose. - Linux .NET 10+ with root: Use
dotnet-trace collect-linux --profile gc-verbosefor richer data with native stacks. - Containers:
dotnet-monitorcan capture GC traces via its REST API (/trace?profile=gc-verbose).
Slow Requests
Slow requests require a thread time trace to see wher
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.6k🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
