/bawa:performancefrom bawa
Diagnoses and fixes Windows app performance issues including hangs, stutter, CPU, memory, and startup. Uses .NET profiling tools (dotnet-trace, dotnet-counters, dotnet-stack, dotnet-gcdump) and WPR/WPA traces.
Ships in bawa. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Fast means two numbers: the first frame after a key press shows in under 100 ms, and nothing on the UI thread blocks for more than 50 ms. Every change in this skill starts and ends with a measurement, so you know it helped. Symptom-by-symptom fixes are in recipes.md. For video, audio, camera, Direct3D, or large image pipelines, also read gpu-media.md.
reproduce -> measure (Release build) -> find the line -> fix -> measure again -> commit with the numbers
Reproduce. Write the exact steps, or add a probe command to the
agent CLI or the debug bridge (test-windows-app skill) that runs the
slow action and logs the time of each step.
Measure the Release build. ./build.ps1 builds Release by default;
-Dev builds Debug, which turns off JIT optimizations and points at
the wrong code.
Find the line. Pick the tool for the symptom:
| Symptom | Tool |
|---|---|
| App freezes, "Not responding" | dotnet-stack report -p <pid>, then read the UI thread's stack (the one in Microsoft.UI.Xaml) |
| Slow action | dotnet-trace collect -p <pid> --duration 00:00:00:10, then dotnet-trace report <file> topN -n 30 |
| Short freezes while typing or dragging | A UI-thread watchdog in the app (recipes.md, "Measuring"), or WPR with the XAMLAppResponsiveness profile |
| Stutter while scrolling or animating | WPR -start GPU -start DesktopComposition, opened in WPA |
| Memory grows | dotnet-counters monitor -p <pid> --counters System.Runtime, then dotnet-gcdump collect -p <pid> |
| Fan, battery | dotnet-counters CPU usage while idle; look for timers and polling |
| Slow launch | Time from Process.Start to the first answer (recipes.md, "Startup") |
The .NET tools install once: dotnet tool install --global dotnet-trace
(and dotnet-counters, dotnet-stack, dotnet-gcdump). Ask before
installing. WPR ships with Windows; WPA comes with the Windows
Performance Toolkit. WPR needs an elevated terminal.
Read traces as text where you can: see "Measuring" in
recipes.md. Delete every .nettrace, .gcdump, and
.etl after reading. They hold process command lines, file paths,
and memory contents. Never commit or share one.
Fix with the matching recipe.
Measure again with the same steps. Put before and after in the commit message: "Picker opens in 40 ms, was 600 ms".
SendMessage to a hung window, a
COM call into another app) freezes the app for as long as that process
hangs.Image once; pointer movement changes only a small
element's transform. Never redraw a full-screen bitmap per pointer
event.BitmapImage.DecodePixelWidth, or
BitmapDecoder with a BitmapTransform, cached by path and size.ListView or
ItemsRepeater for lists, x:Load="False" for panels most people never
open.Windows.Media.Ocr already use the GPU or hardware
blocks. Hand them the work instead of looping over pixels in C#.IDirect3DSurface or a D3D11 texture between capture,
processing, and encoding. Converting to a SoftwareBitmap and back costs
copies through CPU memory.tools/publish.ps1 -Aot.
Measured on the template, cold start to the main window: about 420 ms
self-contained JIT, 170 ms NativeAOT. ReadyToRun gained only about 10%.
Use NativeAOT for tray utilities, launchers, and panels; the distribute
skill has the setup (the MSVC linker) and the trim-warning fixes.Done when the slow action has a measured before and after, the after meets the two numbers at the top, and the commit message names both.
What SKILL.md sets; muted values are Claude Code's defaults
22 skills in this plugin
/agent-cliOptional command line and MCP server for a Windows app, so Claude Code, Codex, and scripts can drive it (list, add, change, search, act) through the running app. Use when the user wants agents to work with their app or its data, asks for a CLI, an MCP server, or automation for the app, or says "Claude should be able to use my app"./app-briefOne-page brief (docs/BRIEF.md) for a new Windows app, written before any code. Use when the user has an app idea, wants to replace an app they pay for, or the research and clone skills are done./app-iconWindows app icon drawn as an SVG (Icon/AppIcon.svg), rendered by tools/make-icon.ps1 into a multi-size AppIcon.ico and AppIcon.png, and reviewed on light and dark taskbar and Start backgrounds, with hand-tuned small sizes. Use when the user wants an app icon, a better icon, or a taskbar or Start icon.npx claudepluginhub daveebbelaar/bawa --plugin bawaOther plugins' skills for the same job