performance
Skill17 starsChanged 10 days agoMITView on GitHub
Make a Windows app fast by measuring hangs, stutter, CPU, memory, and startup, then moving work off the UI thread and onto the GPU. Use when the app freezes or shows "Not responding", a shortcut feels slow, scrolling or dragging stutters, the fan spins, memory grows, or the user asks to optimize or profile.
78 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- Stijnus/dsh-rev-engedited, first seen Nov 8, 2026
- Mahesh-Bishnoi/skillstheir own version, first seen Nov 8, 2026
- AnyOrgName/php-skillstheir own version, first seen Nov 8, 2026
- cognitedata/builder-skillstheir own version, first seen Nov 4, 2026
- theexperiencecompany/gaiatheir own version, first seen Nov 3, 2026
- gabrielbauman/skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use tdd-rust, web-quality-audit and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
FlorianBruniauxSkilltdd-rust
Also in 3 projects that use this
RodrigoTomeESSkillweb-quality-audit
Comprehensive web quality audit covering performance, accessibility, SEO, and best practices. Use when asked to "audit my site", "review web quality", "run lighthouse audit", "check page quality", or "optimize my website".
Also in 9 projects that use this
vijpatel7Skillcore-web-vitals
Optimize Core Web Vitals (LCP, INP, CLS) for better page experience and search ranking. Use when asked to "improve Core Web Vitals", "fix LCP", "reduce CLS", "optimize INP", "page experience optimization", or "fix layout shifts".
Also in 10 projects that use this
ufodev-ioSkillsecurity-guardian
Comprehensive security layer for all interactions with Claude: audits code, dependencies, commands, configs, and AI-generated output for vulnerabilities. Protects against prompt injection, data leaks, unsafe advice, and social engineering. Works in Cursor, Claude Code, claude.ai, and API contexts. Use always as a background security protocol in any Claude-powered environment.
Also in 3 projects that use this
mijunriSkilldatabase
数据库脚本与操作规范。脚本放在 db_scripts 目录,遵循查询优化、事务、安全等实践。
Also in 6 projects that use this
Other versions78 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- daveebbelaar/bama★ 1.7k49% same
- Stijnus/dsh-rev-eng★ 149% same
Wrote their own version · 76
- rtk-ai/rtk★ 86ksame name
- millionco/react-doctor★ 15ksame name
- midudev/preguntas-entrevista-react★ 7.8ksame name
- BuilderIO/agent-native★ 7.6ksame name
- ethereum/ethereum-org-website★ 6ksame name
- plugin87/ux-ui-agent-skills★ 3.1ksame name
- static-web-server/static-web-server★ 2.4ksame name
- lichtblick-suite/lichtblick★ 1.2ksame name
- theexperiencecompany/gaia★ 325same name
- Piebald-AI/splitrail★ 228same name
66 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- agent-cliSkill
- csharp-winuiSkill
- improve-architectureSkill
- os-integrationsSkill
- app-iconSkill
- design-from-appSkill
- design-kitSkill
- design-systemSkill
- layout-gridSkill
- ux-designSkill
- windows-designSkill
- cloneSkill
- researchSkill
- user-storiesSkill
- build-and-verifySkill
- distributeSkill
- improve-loopSkill
- test-windows-appSkill
- app-briefSkill
- bawaSkill
- new-windows-appSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 3 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 52 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
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 …
- Very specific: line 44
Read traces as text where you can: see "Measuring" in recipes.md.
- Distinctive: line 60
Show first, work after: Put the window or panel on screen in the same frame as the key press, then load.
- Distinctive: line 68
Do not animate what must be fast: Search results and switchers update in place.
- Distinctive: line 81
Write Direct3D or compute shaders only when a measurement shows XAML, composition, or Win2D is too slow.
- Very specific: line 83
Keep frames as IDirect3DSurface or a D3D11 texture between capture, processing, and encoding.
- Very specific: line 89
Use NativeAOT for tray utilities, launchers, and panels.
“Common” is measured: kept by at least 6 in 10 of the 52 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Performance
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.
The loop
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-appskill) that runs the slow action and logs the time of each step. - Measure the Release build.
./build.ps1builds Release by default;-Devbuilds 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 inMicrosoft.UI.Xaml)Slow action dotnet-trace collect -p <pid> --duration 00:00:00:10, thendotnet-trace report <file> topN -n 30Short freezes while typing or dragging A UI-thread watchdog in the app (recipes.md, "Measuring"), or WPR with the XAMLAppResponsivenessprofileStutter while scrolling or animating WPR -start GPU -start DesktopComposition, opened in WPAMemory grows dotnet-counters monitor -p <pid> --counters System.Runtime, thendotnet-gcdump collect -p <pid>Fan, battery dotnet-countersCPU usage while idle; look for timers and pollingSlow launch Time from Process.Startto the first answer (recipes.md, "Startup")The .NET tools install once:
dotnet tool install --global dotnet-trace(anddotnet-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.etlafter 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".
The rules that fix most problems
- The UI thread does UI only. File, network, database, image
decoding, cross-process Win32 calls, and audio go elsewhere. A UI-thread
call that waits on another process (
SendMessageto a hung window, a COM call into another app) freezes the app for as long as that process hangs. - Show first, work after. Put the window or panel on screen in the same frame as the key press, then load. Never make the UI wait for the work.
- Let the GPU composite. XAML renders through the compositor. Large
images go in an
Imageonce; pointer movement changes only a small element's transform. Never redraw a full-screen bitmap per pointer event. - Decode at display size.
BitmapImage.DecodePixelWidth, orBitmapDecoderwith aBitmapTransform, cached by path and size. - Do not animate what must be fast. Search results and switchers update in place.
- Virtualize long lists, defer hidden UI.
ListVieworItemsRepeaterfor lists,x:Load="False"for panels most people never open. - No polling without a reason. Timers stop when nothing on screen needs them.
Windows and .NET notes
- XAML layout, the compositor, Direct2D (Win2D), Direct3D, Media
Foundation, and
Windows.Media.Ocralready use the GPU or hardware blocks. Hand them the work instead of looping over pixels in C#. - Write Direct3D or compute shaders only when a measurement shows XAML, composition, or Win2D is too slow. Most apps never need it.
- Keep frames as
IDirect3DSurfaceor a D3D11 texture between capture, processing, and encoding. Converting to aSoftwareBitmapand back costs copies through CPU memory. - For start time, NativeAOT beats everything else:
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; thedistributeskill 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

