winui-code-review

Reviews WinUI 3 XAML and C# code for MVVM, binding, accessibility, theming, security, and performance issues.

3|Updated Aug 8, 2026
One-click install
npx skills add https://github.com/Jose-Polanco-Oxte/Echos-Live-Music-Visualizer --skill winui-code-review-jose-polanco-oxte
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: winui-code-review
Source: https://github.com/Jose-Polanco-Oxte/Echos-Live-Music-Visualizer/tree/main/.agents/skills/winui/sub-skills/winui-code-review
Command: npx skills add https://github.com/Jose-Polanco-Oxte/Echos-Live-Music-Visualizer --skill winui-code-review-jose-polanco-oxte

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? WinUI 3 code can compile and pass UI tests while still containing fragile patterns — missing x:Bind modes, hardcoded colors, absent AutomationIds, UI-thread blocking, or MVVM violations — that only surface as bugs, accessibility failures, or performance problems later. This Skill provides a structured pre-commit review checklist that catches these issues before they ship. ## Core Features & Use Cases - Checklist-Driven Review: Systematic checks across MVVM compliance, x:Bind correctness, accessibility, theming, security, performance, and globalization, each with concrete pass/fail criteria. - Roslyn Analyzer Integration: Explains how the Microsoft.WindowsAppSDK.Analyzers diagnostics (WUI0xxx–WUI4xxx) complement manual review and how to surface them in builds. - Detailed Rule Reference: Ships a references/quality-rules.md file with code examples for x:Phase, PasswordVault, DPAPI, WebView2 hardening, x:Uid localization, RTL layout, and naming conventions. - Use Case: Before committing a new settings page in a WinUI 3 app, run this review to catch a {Binding} that should be {x:Bind}, a hardcoded #FF0000 brush, and a missing AutomationProperties.AutomationId on a button. ## Quick Start Review my WinUI 3 project's XAML and C# files for MVVM, binding, accessibility, theming, security, and performance issues and report findings with severity and suggested fixes.

Frequently Asked Questions about winui-code-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review WinUI 3 code quality before committing?

Run a structured checklist review of your XAML and C# files covering MVVM patterns, x:Bind modes, accessibility properties, ThemeResource usage, security, and async performance. Report each issue with file, line, severity, and a suggested fix.

What is the difference between x:Bind and Binding in WinUI 3?

x:Bind is compiled at build time, strongly typed, and faster, while Binding uses runtime reflection. Prefer x:Bind everywhere except Style setters, and always set Mode explicitly since x:Bind defaults to OneTime.

Does the WinUI analyzer run automatically with dotnet build?

No. The Microsoft.WindowsAppSDK.Analyzers DLL is injected only when building via the BuildAndRun.ps1 script from the winui-dev-workflow skill. To get diagnostics in plain builds, add the Analyzer include and targets import to your own Directory.Build.props.

What accessibility checks should a WinUI 3 app pass?

Every interactive control needs an AutomationProperties.AutomationId, icon-only controls need AutomationProperties.Name, and semantic controls like Button should replace clickable Borders. Also verify keyboard navigation, contrast ratios, and Narrator announcements.

Why does my WinUI 3 UI freeze during data loading?

Blocking calls like .Result, .Wait(), or GetAwaiter().GetResult() deadlock the UI thread. Use async/await for I/O work, Task.Run for CPU-bound work, and DispatcherQueue.TryEnqueue to marshal results back to the UI thread.