/asynkron-profiler
Use the open-source free `Asynkron.Profiler` dotnet tool for CLI-first CPU, allocation, exception, contention, and heap profiling of .NET commands or existing trace artifacts. USE FOR: Asynkron.Profiler setup; automation-friendly profiling output; CPU, allocation, exception,
$ npx -y skills add managedcode/dotnet-skills --skill asynkron-profiler --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/asynkron-profiler
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use the open-source free `Asynkron.Profiler` dotnet tool for CLI-first CPU, allocation, exception, contention, and heap profiling of .NET commands or existing trace artifacts. USE FOR: Asynkron.Profiler setup; automation-friendly profiling output; CPU, allocation, exception,
SKILL.md
asynkron-profiler.SKILL.mdname: asynkron-profiler
description: "Use the open-source free `Asynkron.Profiler` dotnet tool for CLI-first CPU, allocation, exception, contention, and heap profiling of .NET commands or existing trace artifacts. USE FOR: Asynkron.Profiler setup; automation-friendly profiling output; CPU, allocation, exception, contention, and heap investigation. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made."
compatibility: "Requires the `asynkron-profiler` dotnet tool plus `dotnet-trace` and `dotnet-gcdump`; upstream guidance currently targets .NET SDK 10.x."
Asynkron.Profiler
Trigger On
- the repo wants `Asynkron.Profiler` or `asynkron-profiler`
- the user wants automation-friendly profiling output instead of GUI-only tooling
- profiling needs are CPU, allocation, exception, contention, or heap focused and should land as plain-text summaries in CI, scripts, or agent workflows
- the task needs to render an existing `.nettrace`, `.speedscope.json`, `.etlx`, or `.gcdump` file into a readable report
Workflow
1. Decide whether the task is a new profile capture or rendering an existing trace artifact. 2. Prefer built `Release` output over `dotnet run` so the trace represents the target app rather than restore/build noise. 3. Install and verify all three tools before assuming the profiler is usable:
- `asynkron-profiler`
- `dotnet-trace`
- `dotnet-gcdump`
4. Choose exactly one primary mode first:
- `--cpu`
- `--memory`
- `--exception`
- `--contention`
- `--heap`
5. Use `--input <path>` when the trace already exists and the task is about rendering or narrowing the report, not recollecting data. 6. Refine the output only after the baseline run:
- `--root <text>` to anchor the call tree
- `--filter <text>` to trim tables
- `--exception-type <text>` for exception-heavy flows
- `--calltree-depth`, `--calltree-width`, `--calltree-self`, `--calltree-sibling-cutoff`
7. Treat `profile-output/` as the stable output folder for review artifacts and reruns. 8. If the task needs process attach, counters, or raw official diagnostics flows rather than this CLI frontend, hand off to `profiling`.
Architecture
flowchart LR
A["Profiling task"] --> B{"New run or existing artifact?"}
B -->|New run| C["Build target in Release"]
C --> D["Run `asynkron-profiler --mode -- <command|csproj|sln>`"]
D --> E["Collect via `dotnet-trace` or `dotnet-gcdump`"]
E --> F["Write reports to `profile-output/`"]
B -->|Existing artifact| G["Run `asynkron-profiler --input <path> [--mode]`"]
G --> F
F --> H["Refine output with `--root`, `--filter`, and call tree flags"]Install
- Install the profiler tool from upstream:
dotnet tool install -g asynkron-profiler --prerelease
- Install prerequisites:
dotnet tool install -g dotnet-trace
dotnet tool install -g dotnet-gcdump
- Verify the toolchain:
asynkron-profiler --help
dotnet-trace --version
dotnet-gcdump --version
Practical Usage
Capture a new profile
dotnet build -c Release
asynkron-profiler --cpu -- ./bin/Release/<tfm>/MyApp
Framework-dependent apps can run through `dotnet`:
asynkron-profiler --memory -- dotnet ./bin/Release/<tfm>/MyApp.dll
Project and solution paths are also valid when the tool should build and run for you:
asynkron-profiler --contention -- ./MyApp.csproj
asynkron-profiler --exception -- ./MySolution.sln
Render an existing trace
asynkron-profiler --input ./profile-output/app.nettrace --cpu
asynkron-profiler --input ./profile-output/app.etlx --memory
asynkron-profiler --input ./profile-output/app.gcdump --heap
Manual collection with the official tools still fits when the trace must be captured separately:
dotnet-trace collect --output ./profile-output/app.nettrace -- dotnet run MyProject.sln
asynkron-profiler --input ./profile-output/app.nettrace --cpu
Option Patterns
- mode flags:
- `--cpu` for sampled hotspots
- `--memory` for GC allocation ticks and per-type call trees
- `--exception` for thrown counts and throw-site trees
- `--contention` for wait-time trees
- `--heap` for retained heap shape via `dotnet-gcdump`
- scope and readability:
- `--root <text>` to focus the tree on a subsystem
- `--filter <text>` to narrow function tables
- `--exception-type <text>` when one exception dominates the signal
- output shaping:
- `--calltree-depth <n>`
- `--calltree-width <n>`
- `--calltree-self`
- `--calltree-sibling-cutoff <n>`
- trace replay and project targeting:
- `--input <path>` for `.nettrace`, `.speedscope.json`, `.etlx`, or `.gcdump`
- `--tfm <tfm>` when the profiler must resolve a specific target framework from a `.csproj` or `.sln`
Constraints
- upstream currently documents `.NET SDK 10.x` as the supported toolchain baseline
- `dotnet run` is supported but usually produces noisy traces because it captures host, restore, and build work
- the tool is a frontend over `dotnet-trace` and `dotnet-gcdump`, so missing prerequisites or blocked diagnostics IPC will break runs
- `--heap` captures retained heap shape, not CPU or allocation timelines
- this skill is for launched commands or existing trace files; if the task is process attach, counters, or raw trace authoring, prefer `profiling`
Deliver
- a repeatable `asynkron-profiler` command path for the profiling mode that matches the problem
- explicit install and prerequisite commands
- a clear baseline command plus any focused `--root`, `--filter`, `--exception-type`, or call-tree options needed for readable output
- trace replay guidance when the task starts from an existing artifact
Validate
- `asynkron-profiler --help`, `dotnet-trace --version`, and `dotnet-gcdump --version` all succeed
Read more
name: asynkron-profiler description: "Use the open-source free `Asynkron.Profiler` dotnet tool for CLI-first CPU, allocation, exception, contention, and heap profiling of .NET commands or existing trace artifacts. USE FOR: Asynkron.Profiler setup; automation-friendly profiling output; CPU, allocation, exception, contention, and heap investigation. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made." compatibility: "Requires the `asynkron-profiler` dotnet tool plus `dotnet-trace` and `dotnet-gcdump`; upstream guidance currently targets .NET SDK 10.x."
Asynkron.Profiler
Trigger On
- the repo wants `Asynkron.Profiler` or `asynkron-profiler`
- the user wants automation-friendly profiling output instead of GUI-only tooling
- profiling needs are CPU, allocation, exception, contention, or heap focused and should land as plain-text summaries in CI, scripts, or agent workflows
- the task needs to render an existing `.nettrace`, `.speedscope.json`, `.etlx`, or `.gcdump` file into a readable report
Workflow
1. Decide whether the task is a new profile capture or rendering an existing trace artifact. 2. Prefer built `Release` output over `dotnet run` so the trace represents the target app rather than restore/build noise. 3. Install and verify all three tools before assuming the profiler is usable:
- `asynkron-profiler`
- `dotnet-trace`
- `dotnet-gcdump`
4. Choose exactly one primary mode first:
- `--cpu`
- `--memory`
- `--exception`
- `--contention`
- `--heap`
5. Use `--input <path>` when the trace already exists and the task is about rendering or narrowing the report, not recollecting data. 6. Refine the output only after the baseline run:
- `--root <text>` to anchor the call tree
- `--filter <text>` to trim tables
- `--exception-type <text>` for exception-heavy flows
- `--calltree-depth`, `--calltree-width`, `--calltree-self`, `--calltree-sibling-cutoff`
7. Treat `profile-output/` as the stable output folder for review artifacts and reruns. 8. If the task needs process attach, counters, or raw official diagnostics flows rather than this CLI frontend, hand off to `profiling`.
Architecture
flowchart LR
A["Profiling task"] --> B{"New run or existing artifact?"}
B -->|New run| C["Build target in Release"]
C --> D["Run `asynkron-profiler --mode -- <command|csproj|sln>`"]
D --> E["Collect via `dotnet-trace` or `dotnet-gcdump`"]
E --> F["Write reports to `profile-output/`"]
B -->|Existing artifact| G["Run `asynkron-profiler --input <path> [--mode]`"]
G --> F
F --> H["Refine output with `--root`, `--filter`, and call tree flags"]Install
- Install the profiler tool from upstream:
dotnet tool install -g asynkron-profiler --prerelease
- Install prerequisites:
dotnet tool install -g dotnet-trace dotnet tool install -g dotnet-gcdump
- Verify the toolchain:
asynkron-profiler --help dotnet-trace --version dotnet-gcdump --version
Practical Usage
Capture a new profile
dotnet build -c Release asynkron-profiler --cpu -- ./bin/Release/<tfm>/MyApp
Framework-dependent apps can run through `dotnet`:
asynkron-profiler --memory -- dotnet ./bin/Release/<tfm>/MyApp.dll
Project and solution paths are also valid when the tool should build and run for you:
asynkron-profiler --contention -- ./MyApp.csproj asynkron-profiler --exception -- ./MySolution.sln
Render an existing trace
asynkron-profiler --input ./profile-output/app.nettrace --cpu asynkron-profiler --input ./profile-output/app.etlx --memory asynkron-profiler --input ./profile-output/app.gcdump --heap
Manual collection with the official tools still fits when the trace must be captured separately:
dotnet-trace collect --output ./profile-output/app.nettrace -- dotnet run MyProject.sln asynkron-profiler --input ./profile-output/app.nettrace --cpu
Option Patterns
- mode flags:
- `--cpu` for sampled hotspots
- `--memory` for GC allocation ticks and per-type call trees
- `--exception` for thrown counts and throw-site trees
- `--contention` for wait-time trees
- `--heap` for retained heap shape via `dotnet-gcdump`
- scope and readability:
- `--root <text>` to focus the tree on a subsystem
- `--filter <text>` to narrow function tables
- `--exception-type <text>` when one exception dominates the signal
- output shaping:
- `--calltree-depth <n>`
- `--calltree-width <n>`
- `--calltree-self`
- `--calltree-sibling-cutoff <n>`
- trace replay and project targeting:
- `--input <path>` for `.nettrace`, `.speedscope.json`, `.etlx`, or `.gcdump`
- `--tfm <tfm>` when the profiler must resolve a specific target framework from a `.csproj` or `.sln`
Constraints
- upstream currently documents `.NET SDK 10.x` as the supported toolchain baseline
- `dotnet run` is supported but usually produces noisy traces because it captures host, restore, and build work
- the tool is a frontend over `dotnet-trace` and `dotnet-gcdump`, so missing prerequisites or blocked diagnostics IPC will break runs
- `--heap` captures retained heap shape, not CPU or allocation timelines
- this skill is for launched commands or existing trace files; if the task is process attach, counters, or raw trace authoring, prefer `profiling`
Deliver
- a repeatable `asynkron-profiler` command path for the profiling mode that matches the problem
- explicit install and prerequisite commands
- a clear baseline command plus any focused `--root`, `--filter`, `--exception-type`, or call-tree options needed for readable output
- trace replay guidance when the task starts from an existing artifact
Validate
- `asynkron-profiler --help`, `dotnet-trace --version`, and `dotnet-gcdump --version` all succeed
Stop explaining .NET to your AI. Start building. We've all been there: asking Claude to use Entity Framework, only to get EF6 patterns in a .NET 8 project. Explaining to Copilot that Blazor Server and Blazor WebAssembly aren't the same thing.
Repo: managedcode/dotnet-skills
Other skills on dotnet-skills.
- /aspnet-core
Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET. USE FOR: working on ASP.NET Core apps, services, or middleware; changing auth, routing, configuration,
Open skill - /aspire
Build, upgrade, and operate Aspire 13.4.x C# or TypeScript application hosts with the current CLI, AppHost, ServiceDefaults, integrations, dashboard, testing, MCP, and deployment patterns for distributed apps. USE FOR: Aspire.AppHost.Sdk, Aspire.Hosting.*,
Open skill - /azure-functions
Build, review, or migrate Azure Functions in .NET with correct execution model, isolated worker setup, bindings, DI, and Durable Functions patterns. USE FOR: working on Azure Functions in .NET; migrating from the in-process model to the isolated worker model; adding Durable
Open skill - /blazor
Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and hosting choices. USE FOR: building interactive web UIs with C# instead of JavaScript; choosing between Server, WebAssembly, or
Open skill - /entity-framework6
Maintain or migrate EF6-based applications with realistic guidance on what to keep, what to modernize, and when EF Core is or is not the right next step. USE FOR: EF6 codebases; runtime versus ORM migration decisions; EDMX, code-first, ObjectContext, and legacy data-access
Open skill - /entity-framework-core
Design, tune, or review EF Core data access with proper modeling, migrations, query translation, performance, and lifetime management for modern .NET applications. USE FOR: DbContext, migrations, model configuration, EF queries, tracking, loading, performance, transactions, and
Open skill

