agentleFS
MicrosoftKnown publishermicrosoft/winappCli/plugins/winapp/skills/winapp-performance/SKILL.md

winapp-performance

Skill1.4k starsChanged 55 days agoMITView on GitHub

Investigate slow WinUI 3 layout, scrolling and virtualization using native ETW captures, timed operation trees and managed GC suspension context. Use bounded queries for runtime performance questions, not crash analysis or UI correctness.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about microsoft/winappCli

The biggest 5 of 52 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 52

Talked about on GitHub, Bluesky and Stack Overflow (52 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 1

On Stack Overflow · 1

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the WinUI performance guide for capture limits, query options, partial-result handling, privacy and interpretation.

    line 8
  2. Very specific:

    Use the existing app PID when possible.

    line 10
  3. Distinctive:

    Do not add startup delays or replace a generated Main.

    line 20
  4. Distinctive:

    Wait for successful recording readiness.

    line 21
  5. Very specific:

    Run winapp perf stop <id> --json before closing the app.

    line 25
  6. Very specific:

    Use --profile-mode elevated only for startup, and tell the user to expect a UAC prompt.

    line 52
  7. Distinctive:

    Call trees are instrumented operation scopes, not CPU stacks or visual trees.

    line 70
  8. Distinctive:

    Keep exclusive scope time distinct from element self time.

    line 71
  9. Distinctive:

    Keep raw captures local unless the user has reviewed and authorized sharing them.

    line 75
  10. Distinctive:

    Use the UI automation skill to interact with the app and troubleshooting/debug output workflows for crashes.

    line 76

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Workflow

  1. Read the WinUI performance guide for capture limits, query options, partial-result handling, privacy and interpretation.
  2. Use the existing app PID when possible. Start with winapp perf start --app <pid> --output <empty-directory> --json. --app also accepts a process name or window title using the same matching rules as winapp ui. Use the returned target.pid for subsequent UI actions. For a new launch, use winapp run <project> --profile <empty-directory> --detach --json. This records after launch, which is enough for navigation, scrolling and other post-launch scenarios. For startup investigations only, add --profile-mode elevated (one UAC prompt for the recorder, which the user must approve) and check Profile.StartupCoverage; see the guide's startup workflow. Do not add startup delays or replace a generated Main.
  3. Wait for successful recording readiness. Save the returned capture ID.
  4. Mark the beginning with winapp perf mark <id> --name scenario-start --json, drive a short repeatable scenario with verified UI selectors, wait for its visible outcome, then run winapp perf mark <id> --name scenario-end --json.
  5. Run winapp perf stop <id> --json before closing the app.
  6. Start with winapp perf analyze <directory> --from-marker scenario-start --to-marker scenario-end --json to compare mutually exclusive primary-UI-thread activity, the hottest parsed XAML resources, and the detailed operation ranking. Use --view parsing over the same range when the parsing preview needs full paging. Then query winapp perf analyze <directory> --view hotspots --from-marker scenario-start --to-marker scenario-end --json; its default threshold is 16.67 ms and each row includes dominant direct child operations. Expand a returned operation with --view call --id <call-id> --depth 2 --from-marker scenario-start --to-marker scenario-end --json. Use --view calls --family layout with the same marker range when the hotspot evidence points to layout. Query --view gc --sort duration over the same marker range to find the longest collection and suspension intervals, then inspect referenced interval IDs. Use element and event views for source and evidence drill-down. Follow nextOffset; do not dump NDJSON or ETL into context. For overall resource cost, use --view resources over the same marker range; see the guide's process counters. For app-side composition, query --view calls --family composition and --view events --event DCompDeviceCommit over the same marker range; see composition submission.
  7. Report observed cost, supporting event IDs, coverage gaps, and one concrete next experiment. Preserve stdout when partial results accompany a nonzero exit code.

Guardrails

  • Use --profile-mode elevated only for startup, and tell the user to expect a UAC prompt. If they decline it, do not retry; fall back to the default attach mode and say that early startup may be missing. Otherwise never elevate, change tracing ACLs, or modify app code to make capture work.
  • Recording is local only. Do not combine run --profile with --on sandbox; see the guide for the supported launch and recording commands.
  • Readiness is not decoded coverage. Missing events are inconclusive.
  • For WinUI operations, use elapsed-time terminology; do not claim CPU/GPU attribution, displayed FPS, proven input-to-display latency, or complete startup/visual-tree coverage.
  • Unclassified includes idle, waits, and uninstrumented work. Do not describe it as app code or CPU use. Off-thread image decode is not UI-thread occupancy.
  • Process CPU counters include all target threads but do not attribute functions, modules, or waits. Sampled memory/thread maxima can miss brief spikes; missing samples are not zero resource use.
  • Trace-local element IDs are not UI Automation selectors.
  • Composition calls are elapsed API scopes, not GPU work or display latency. DComp device commits are notifications, not timed or displayed frames; check directCompositionProvider before interpreting missing events.
  • Call trees are instrumented operation scopes, not CPU stacks or visual trees. Keep exclusive scope time distinct from element self time.
  • GC is requested by default but may be unavailable. Check gcCoverage separately; missing events are not zero pauses. Background GC duration is not suspension time, and overlapping runtime suspension is not proof that GC blocked the native UI.
  • Keep raw captures local unless the user has reviewed and authorized sharing them.
  • Use the UI automation skill to interact with the app and troubleshooting/debug output workflows for crashes; neither replaces performance evidence.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.