Official agent skill

Dotnet Trace Collect

by dotnet in dotnet/skills

Guide developers through capturing diagnostic artifacts to diagnose production .NET performance issues.

OfficialMITAuto-check passed

Install Dotnet Trace Collect

skills CLI
$ npx skills add dotnet/skills --skill dotnet-trace-collect -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dotnet/skills dotnet-trace-collect --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/dotnet-diag/skills/dotnet-trace-collect .claude/skills/dotnet-trace-collect && rm -rf skills-src

Use ~/.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/

Facts

Skill name
dotnet-trace-collect
GitHub stars
5.6k
Used in
2 other repos
Token cost
~6.1k tokens
SKILL.md length
3,093 words
Files
6 (incl. references)
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

Guide developers through capturing diagnostic artifacts to diagnose production .NET performance issues.

  • Works in 4 steps: Understand the environment → Recommend diagnostic tools → Guide data collection → …
  • The user needs help choosing diagnostic tools
  • SKILL.md covers When to Use, When Not to Use, Inputs and Workflow, plus 2 more sections
  • Calls kubectl, dotnet and curl

What it does

Dotnet Trace Collect is an agent skill from dotnet/skills, published by the product's own GitHub organization. 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).

Its SKILL.md is about 6.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/dotnet-monitor.md`, `references/dotnet-trace-collect-linux.md` and `references/dotnet-trace-collect.md`).

It works with .NET and Linux. The repository describes itself as: Repository for skills to assist AI coding agents with .NET and C. The licence is MIT.

When your agent uses it

  • The user needs help choosing diagnostic tools
  • Collecting performance data
  • Understanding tool trade-offs across different environments (Windows/Linux
  • .NET Framework/modern .NET

Example prompts

  • “/dotnet-trace-collect”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Understand the environment
  2. Recommend diagnostic tools
  3. Guide data collection
  4. Recommend analysis approach

What it can do on your machine

Read from SKILL.md and the folder at commit 8d670fa. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • kubectl
    • dotnet
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use kubectl and curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dotnet Trace Collect loads about 6.1k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 86 tokens; SKILL.md has 3,093 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~86
When it runs · the whole SKILL.md, loaded when a task matches
~6.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~12k

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.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

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.

SKILL.md

The full file from dotnet/skills at commit 8d670fa, republished under its MIT licence (© dotnet). 3,093 words, ~6,145 tokens.

Download SKILL.mdSave it as .claude/skills/dotnet-trace-collect/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
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

InputRequiredDescription
SymptomYesWhat the developer is observing (high CPU, memory growth, slow requests, hangs, excessive GC, HTTP 5xx errors, networking timeouts, connection failures, assembly loading failures, etc.)
RuntimeYes.NET Framework or modern .NET (and version, especially whether .NET 10+)
OSYesWindows or Linux
DeploymentYesNon-container, container, or Kubernetes
Admin privilegesRecommendedWhether the developer has admin/root access on the target machine
Repro characteristicsRecommendedWhether 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:

  1. 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.)
  2. Runtime: .NET Framework or modern .NET? If modern .NET, which version? (Especially whether .NET 10 or later.)
  3. OS: Windows or Linux?
  4. Deployment: Running directly on the host, in a container, or in Kubernetes?
  5. Admin privileges: Do they have admin/root access on the target machine or container?
  6. Repro characteristics: Does the issue reproduce quickly, or does it take a long time to manifest?
  7. 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
EnvironmentReference file(s)
Windows + modern .NET + adminreferences/perfview.md
Windows + modern .NET, no adminreferences/dotnet-trace-collect.md
Windows + .NET Frameworkreferences/perfview.md
Linux + .NET 10+ + rootreferences/dotnet-trace-collect-linux.md
Linux + pre-.NET 10references/dotnet-trace-collect.md
Linux + native stacks neededreferences/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)
EnvironmentPreferred toolFallback / Notes
Windows + modern .NET + adminPerfViewIf admin is unavailable, use dotnet-trace
Windows + .NET Framework + adminPerfViewWithout 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+ + rootdotnet-trace collect-linuxUse dotnet-trace if root or kernel prerequisites are not met
Linux + pre-.NET 10dotnet-traceAdd perfcollect when native stacks are needed (requires root)
Linux container/KubernetesConsole tools if in workload context; dotnet-monitor if no console accessSee Linux Container / Kubernetes section for details
Windows (non-container, modern .NET)
  1. PerfView (preferred) — produces richer ETW-based data; requires admin privileges. For slow requests, add /ThreadTime to capture thread-level wait and block detail.
  2. dotnet-trace — fallback when admin privileges are not available.
  3. For long-running repros: use PerfView with a /StopOn trigger 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 /StartOn if 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
  1. 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.zip into the container and run PerfViewCollect merge /ImageIDsOnly inside 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.

  2. dotnet-monitor, dotnet-trace — inside the container if the tools are installed in the image. For dumps, invoke the dump-collect skill.

Windows (.NET Framework)
  1. PerfView — the primary diagnostic tool for .NET Framework on Windows. Requires admin.
  2. Same trigger guidance for long repros: use /StopOn triggers that fire on the symptom (e.g., /StopOnPerfCounter, /StopOnGCEvent, /StopOnException) with /CircularMB + /BufferSizeMB.
  3. 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 the dump-collect skill 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+)
  1. dotnet-trace collect-linux (preferred) — uses perf_events for richer traces including native call stacks and kernel events. Captures machine-wide by default (no PID required). Requires root and kernel >= 6.4.
  2. dotnet-trace — fallback when root privileges are not available or kernel requirements are not met. Managed stacks only.
Linux (non-container, pre-.NET 10)
  1. dotnet-trace (preferred) — managed trace collection; no admin required.
  2. 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:

  1. dotnet-trace collect-linux (.NET 10+ with root) — produces the richest traces including native call stacks and kernel events.
  2. dotnet-trace — inside the container if the tool is installed in the image. For dumps, invoke the dump-collect skill.
  3. perfcollect — inside the container when native stacks are needed on pre-.NET 10 (requires SYS_ADMIN / --privileged).

If not running in the workload context (no console access), or if dotnet-monitor is already deployed:

  1. 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-collect skill 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-collect skill) for heap diff, plus dotnet-trace while 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-collect skill) for heap diff, plus dotnet-trace collect-linux while 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-collect skill 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 an OutOfMemoryException.
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 /GCCollectOnly to 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-verbose for richer data with native stacks.
  • Containers: dotnet-monitor can capture GC traces via its REST API (/trace?profile=gc-verbose).
Slow Requests

Slow requests require a thread time trace to see where threads are spending time — waiting on locks, I/O, external calls, etc. Use larger buffers since thread time traces generate more data. For ASP.NET Core applications, also enable Microsoft.AspNetCore.Hosting and Microsoft-AspNetCore-Server-Kestrel providers to get server-side request lifecycle timing (when requests arrive, how long they take to process).

  • Windows (PerfView): Use PerfView /ThreadTime collect /BufferSizeMB:1024 /CircularMB:2048. The /ThreadTime argument adds thread-level wait and block detail. For ASP.NET Core, add Kestrel providers: PerfView /ThreadTime collect /BufferSizeMB:1024 /CircularMB:2048 /Providers:*Microsoft.AspNetCore.Hosting,*Microsoft-AspNetCore-Server-Kestrel. Do not include a stop trigger by default — let the user design one based on their specific scenario.
  • Linux (dotnet-trace): dotnet-trace captures thread time data by default — no special arguments needed. Use dotnet-trace collect -p <PID>. For ASP.NET Core, add Kestrel providers: dotnet-trace collect -p <PID> --providers Microsoft.AspNetCore.Hosting,Microsoft-AspNetCore-Server-Kestrel.
  • Linux .NET 10+ with root: Use dotnet-trace collect-linux --profile thread-time for richer data with native stacks. For ASP.NET Core, add: --providers Microsoft.AspNetCore.Hosting,Microsoft-AspNetCore-Server-Kestrel.
  • Containers: dotnet-monitor can capture traces via its REST API (/trace?pid=<PID>&durationSeconds=30).
Hangs
  1. Start with a trace to understand what threads are doing. Use the appropriate trace tool for the environment (PerfView with /ThreadTime on Windows, dotnet-trace on Linux, dotnet-trace collect-linux --profile thread-time on .NET 10+ Linux with root). The trace can reveal:
    • Livelocks (threads spinning without forward progress) — threads appear busy but the application makes no progress.
    • Thread starvation — the ThreadPool is exhausted and queued work items are not being processed. This can look like a deadlock but has a different root cause.
    • Whether there is any forward progress at all — if some threads are making progress, the issue may be a bottleneck rather than a true hang.
  2. If the trace does not explain the hang, the issue may be a true deadlock (threads waiting on each other in a cycle). In this case, invoke the dump-collect skill to collect a process dump — do not provide dump commands directly.
  3. Analyze the dump with a debugger to inspect thread stacks and identify the lock cycle:
    • Windows: Visual Studio or WinDbg with the SOS debugger extension.
    • Linux: lldb with the SOS debugger extension.
Show full SKILL.md (1,216 more words)Show less
Networking Issues

Networking issues (HTTP 5xx errors from downstream services, request timeouts, connection failures, DNS resolution failures, TLS handshake failures, connection pool exhaustion) require both a thread-time trace and networking event providers. The thread-time trace shows where threads are blocked (slow downstream calls, thread starvation), while the networking events show the request lifecycle — which requests failed, what status codes came back, how long DNS resolution and TLS handshakes took, and how long requests waited for a connection from the pool.

For .NET Framework, PerfView /ThreadTime already collects the relevant networking events (from the System.Net ETW provider) — no additional providers are needed.

For modern .NET, you must explicitly enable the System.Net.* EventSource providers:

ProviderWhat it covers
System.Net.HttpHttpClient/SocketsHttpHandler — request lifecycle, HTTP status codes, connection pool
System.Net.NameResolutionDNS lookups (start/stop, duration)
System.Net.SecurityTLS/SSL handshakes (SslStream)
System.Net.SocketsLow-level socket connect/disconnect

Key events from System.Net.Http: RequestStart (scheme, host, port, path), RequestStop (statusCode — -1 if no response was received), RequestFailed (exception message for timeouts, connection refused, etc.), RequestLeftQueue (time waiting for a connection from the pool — indicates connection pool exhaustion), ConnectionEstablished, ConnectionClosed.

Collect a thread-time trace with networking providers enabled (modern .NET only — .NET Framework needs only PerfView /ThreadTime):

  • Windows (PerfView): Use PerfView /ThreadTime collect /BufferSizeMB:1024 /CircularMB:2048 /Providers:*System.Net.Http,*System.Net.NameResolution,*System.Net.Security,*System.Net.Sockets. For .NET Framework, omit the /Providers flag — /ThreadTime already includes the networking events. The thread-time trace shows where threads are blocked while the networking events show what requests are failing and why.
  • Linux (dotnet-trace): dotnet-trace captures thread time data by default, but specifying --providers overrides the defaults so you must also include --profile: dotnet-trace collect -p <PID> --profile dotnet-common,dotnet-sampled-thread-time --providers System.Net.Http,System.Net.NameResolution,System.Net.Security,System.Net.Sockets.
  • Linux .NET 10+ with root: Use dotnet-trace collect-linux --profile dotnet-common,cpu-sampling,thread-time --providers System.Net.Http,System.Net.NameResolution,System.Net.Security,System.Net.Sockets.
  • Containers: dotnet-monitor can capture traces with custom providers via its REST API.
Assembly Loading Issues

For modern .NET, assembly loading issues (FileNotFoundException, FileLoadException, ReflectionTypeLoadException, version conflicts, duplicate assembly loads across AssemblyLoadContexts) require collecting assembly loader binder events from the Microsoft-Windows-DotNETRuntime provider with the Loader keyword (0x4). These events trace every step of the runtime's assembly resolution algorithm — which paths were probed, which AssemblyLoadContext handled the load, whether the load succeeded or failed, and why. For .NET Framework, the same provider and keyword work for ETW-based collection; additionally, the Fusion Log Viewer (fuslogvw.exe) can diagnose assembly binding failures without requiring a trace.

The provider specification is Microsoft-Windows-DotNETRuntime:0x4:4 (provider name, AssemblyLoader keyword, Informational verbosity).

  • Windows (PerfView): A default PerfView trace already includes binder events - simply run PerfView collect with no extra providers. For a smaller trace file, use PerfView collect /ClrEvents:Default-Profile, which removes the most verbose default events while keeping the events necessary for diagnosing assembly loading issues.
  • Linux / cross-platform (dotnet-trace): Use dotnet-trace collect --clrevents assemblyloader -- <path-to-built-exe> to launch and trace the process, or dotnet-trace collect --clrevents assemblyloader -p <PID> to attach to a running process.
  • Linux .NET 10+ with root: Use dotnet-trace collect-linux --clrevents assemblyloader.
  • Containers: dotnet-monitor can capture traces with the loader provider via its REST API.

For short-lived processes that fail on startup (common with assembly loading issues), prefer the dotnet-trace launch form (-- <path-to-built-exe>) over attaching by PID, since the process may exit before you can attach.

Explain the trade-offs when recommending a tool. For example:

  • PerfView gives richer data but needs admin; runs on Windows including Windows containers.
  • dotnet-trace works cross-platform without admin but captures less system-level detail.
  • perfcollect captures native call stacks but needs admin/root.
  • dotnet-monitor is the best option for containers/K8s when console access is not available, but requires sidecar deployment and authentication configuration.
Step 3: Guide data collection

Provide the specific commands for the recommended tool. Load the appropriate reference file from the tool reference lookup table for detailed command-line examples.

Key guidance to include:

  1. Installation: How to install the tool if it is not already available (e.g. dotnet tool install -g dotnet-trace). When recommending multiple tools, provide installation and usage instructions for each one — do not mention a tool without showing how to install and use it.
  2. PID discovery (required before any -p <PID> command): Verify the target process first (for example: dotnet-trace ps, curl <monitor-endpoint>/processes, or ps inside a container). If the app is expected to be PID 1 in a container, still verify before collecting.
  3. Collection command: The exact command to run, including relevant providers, output format, and duration.
  4. Container considerations:
    • Collecting from inside the container: ensure the tool is installed in the image or use kubectl cp to copy it in.
    • Collecting from outside the container: use dotnet-monitor as a sidecar with a shared diagnostic port (Unix domain socket in /tmp).
    • Kubernetes: dotnet-monitor as a sidecar container, or kubectl debug for ephemeral debug containers.
  5. Long-running repros (Windows/PerfView): show how to use trigger arguments and circular buffer settings.
  6. Output location: Where the collected file will be saved and how to copy it off the target for analysis.
  7. Artifact handoff checklist: Include runtime version, OS/kernel, container image tag or build SHA, PID/process name, UTC collection start/end timestamps, exact command used, and final artifact path when handing traces to someone else for analysis.
Step 4: Recommend analysis approach

After data is collected, recommend the appropriate tool for analysis. Do not perform the analysis — just point the developer to the right tool and documentation.

Collected DataAnalysis ToolNotes
.nettrace filePerfView (Windows), Speedscope (web)PerfView gives the richest view on Windows
.etl / .etl.zip filePerfViewETW traces from PerfView or perfcollect
perf.data.nl from perfcollectPerfView (Windows)Copy the file to a Windows machine and open with PerfView

Validation

  • The recommended tool is compatible with the developer's runtime, OS, and deployment topology
  • The collection command runs without errors
  • The output file is generated in the expected location
  • The developer knows which analysis tool to use for the collected data

Common Pitfalls

PitfallSolution
Using dotnet-trace on .NET Frameworkdotnet-trace only works with modern .NET (.NET Core 3.0+). Use PerfView for .NET Framework.
PerfView without admin privilegesPerfView requires admin for ETW tracing. Fall back to dotnet-trace if admin is not available.
perfcollect in container without SYS_ADMINContainers drop SYS_ADMIN by default. Run with --privileged or add SYS_ADMIN capability, or fall back to dotnet-trace.
Huge trace files from long reprosOn Windows, use PerfView /StopOn triggers that fire on the symptom you want to capture (e.g., /StopOnPerfCounter, /StopOnGCEvent, /StopOnException) with /CircularMB and /BufferSizeMB. Never trigger on recovery — the circular buffer continuously overwrites old data, so the interesting behavior may be lost by the time collection stops.
Diagnostic port not accessible in containerMount /tmp as a shared volume between the app container and dotnet-monitor sidecar for the diagnostic Unix domain socket.
Forgetting to install tools in container imageAdd dotnet tool install to your Dockerfile, or use dotnet-monitor as a sidecar to avoid modifying the app image.
Exposing dotnet-monitor with --no-auth in productionKeep auth enabled, bind to localhost, and use kubectl port-forward for access. Use --no-auth only for short-lived isolated debugging.
Collecting only CPU/thread-time trace for networking issuesCPU and thread-time traces alone do not show HTTP status codes, DNS timing, or connection pool behavior. Add the networking providers (System.Net.Http, System.Net.NameResolution, System.Net.Security, System.Net.Sockets) alongside the thread-time trace.
Enabling all networking providers when only one is neededEach networking provider adds overhead. If the issue is clearly HTTP-level (5xx status codes), System.Net.Http alone may be sufficient. Add DNS, TLS, and socket providers when the root cause is unclear.

© dotnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in plugins/dotnet-diag/skills/dotnet-trace-collect of dotnet/skills.

  • SKILL.md
  • references/dotnet-monitor.md
  • references/dotnet-trace-collect-linux.md
  • references/dotnet-trace-collect.md
  • references/perfcollect.md
  • references/perfview.md

Open the folder on GitHubat commit 8d670fa

Used in 2 other repositories

We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in dotnet/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Dotnet Trace Collect 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.

Dotnet Trace Collect compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dotnet Trace Collect this skilldotnet/skills5.6k2 repos~6.1kAutomated safety check: PassMIT
Update .NET OS Packagesdotnet/core22k—~2.3kAutomated safety check: PassMIT
Bump LibdatadogDataDog/dd-trace-dotnet573—~1.7kAutomated safety check: PassApache-2.0
Run Maui Apptig/winprint101—~1.2kAutomated safety check: PassMIT
Update .NET Distro Packagesdotnet/core22k—~4.3kAutomated safety check: NotesMIT
Image Managementdotnet/dotnet-docker4.9k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    Audits and updates os-packages.json files listing the Linux packages each .NET release needs per distro, then regenerates the Markdown from the JSON.

    22k GitHub stars~2.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Bump Libdatadog

    DataDog/dd-trace-dotnet

    Official

    Update/bump the libdatadog native library version in dd-trace-dotnet.

    573 GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Run Maui App

    tig/winprint

    Build, launch, screenshot, and drive the WinPrint.Maui Windows app (winprint.exe) — including UIA automation of the File button and native Open dialog, and pixel capture that works for WinUI3 content.

    101 GitHub stars~1.2k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Official

    Creates and maintains the per-distro JSON files that list the native packages .NET needs on each Linux distribution, scoped to one .NET version.

    22k GitHub stars~4.3k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Image Management

    dotnet/dotnet-docker

    Official

    Manages .NET Docker images including adding images for new .NET versions, new Linux distros (Alpine, Ubuntu, Azure Linux), and new Windows versions.

    4.9k GitHub stars~1.1k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Maui AI Debugging

    Redth/Maui.Gtk

    End-to-end workflow for building, deploying, inspecting, and debugging .NET MAUI and MAUI Blazor Hybrid apps as an AI agent.

    101 GitHub stars~4.1k tokensUpdated 5 mo ago
    MobileAuto-check passed

More from dotnet/skills

All 91 skills in this repo
  • Official

    Resolves .NET runtime frames in Apple .ips crash logs to function names, source files and line numbers using dSYM symbols, atos and the Microsoft symbol server.

    5.6k GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • Official

    Resolves native crash frames from .NET Android tombstones to function names, source files and line numbers using BuildIds, Microsoft's symbol server and llvm-symbolizer.

    5.6k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Official

    Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.

    5.6k GitHub starsUsed in 3 repos~3.1k tokens
    Auto-check passed
  • Official

    Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.

    5.6k GitHub starsUsed in 1 repo~3.3k tokens
    Auto-check passed
  • Microbenchmarking

    dotnet/skills

    Official

    Activate this skill when BenchmarkDotNet (BDN) is involved in the task — creating, running, configuring, or reviewing BDN benchmarks.

    5.6k GitHub starsUsed in 3 repos~3.3k tokens
    Auto-check passed
  • Official

    Makes .NET projects compatible with Native AOT and trimming by resolving IL trim and AOT analyzer warnings through annotations rather than suppressions.

    5.6k GitHub starsUsed in 2 repos~4.2k tokens
    Auto-check passed

Works with

Questions about Dotnet Trace Collect

What does Dotnet Trace Collect do?

Guide developers through capturing diagnostic artifacts to diagnose production .NET performance issues. Dotnet Trace Collect is an agent skill from dotnet/skills, published by the product's own GitHub organization.NET performance issues.

When should I use Dotnet Trace Collect?

Dotnet Trace Collect fits situations like: the user needs help choosing diagnostic tools; collecting performance data; understanding tool trade-offs across different environments (Windows/Linux; .NET Framework/modern .NET.

How do I install Dotnet Trace Collect in Claude Code?

Run `npx skills add dotnet/skills --skill dotnet-trace-collect -a claude-code`. Or copy the skill folder (plugins/dotnet-diag/skills/dotnet-trace-collect in dotnet/skills) into .claude/skills/dotnet-trace-collect in your project. Claude Code loads it when a task matches its description.

How do I install Dotnet Trace Collect in Codex?

Run `npx skills add dotnet/skills --skill dotnet-trace-collect -a codex`. Or copy the skill folder (plugins/dotnet-diag/skills/dotnet-trace-collect in dotnet/skills) into .agents/skills/dotnet-trace-collect in your project. Codex loads it when a task matches its description.

Can I use Dotnet Trace Collect in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dotnet/skills --skill dotnet-trace-collect -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dotnet-trace-collect, .gemini/skills/dotnet-trace-collect, .github/skills/dotnet-trace-collect and .opencode/skills/dotnet-trace-collect in your project.

What does Dotnet Trace Collect need to run?

Going by SKILL.md and its folder, Dotnet Trace Collect needs the command-line tools its instructions call (kubectl, dotnet and curl).

Does Dotnet Trace Collect access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Dotnet Trace Collect safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dotnet Trace Collect use?

Dotnet Trace Collect is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dotnet Trace Collect use?

About 6.1k tokens (SKILL.md is roughly 25k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.4k tokens, read only when the agent opens those files.

What are the alternatives to Dotnet Trace Collect?

Skills that share tags, products or a category with Dotnet Trace Collect: Update .NET OS Packages (dotnet/core, 22k stars), Bump Libdatadog (DataDog/dd-trace-dotnet, 573 stars), Run Maui App (tig/winprint, 101 stars) and Update .NET Distro Packages (dotnet/core, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dotnet Trace Collect?

dotnet (a GitHub organization, an official publisher) maintains it in dotnet/skills, which has 5,568 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 7, 2026.

Source: dotnet/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.