Agent Skill · Dev Proxy

winui-code-review

Code quality review for WinUI 3 apps — MVVM compliance, x:Bind correctness, accessibility, theming, security, and performance. Use before committing to catch issues that the compiler and UI tests won't find.

Provider: Dev Proxy Path in repo: plugins/winui/skills/winui-code-review/SKILL.md

Skill body

When to Use

Run a code review after the app builds and before committing. This catches quality issues that aren’t build errors and aren’t visible in UI tests — patterns that compile and run but are wrong, fragile, or slow.

How to Review

Read through the project’s XAML and C# files and check each section below. The Microsoft.WindowsAppSDK.Analyzers Roslyn analyzer ships with the winui-dev-workflow skill and is injected into your build when you compile via the BuildAndRun.ps1 script that ships with that skill — the script drops a temporary Directory.Build.props into the project that loads the analyzer DLL and its .targets, then cleans up after the build. Plain dotnet build (or VS) does not load the analyzer automatically; if you want it to surface as build diagnostics outside the script, add the <Analyzer Include="..." /> and <Import Project="..." /> to your project’s own Directory.Build.props (or wait for the planned NuGet package).

The analyzer catches a curated set of WinUI 3 / Windows App SDK issues with categorized 4-digit IDs:

Every diagnostic ships at Warning severity (no rule is Error) and includes a helpLinkUri. Suppress noise with #pragma warning disable WUIxxxx or <NoWarn> as usual — the analyzer’s SuppressionTests verify that pragma suppression round-trips correctly.

MVVM Compliance

x:Bind and Data Binding

Accessibility

Theming

Security

Performance

Globalization

Review Report

After reviewing, summarize:

  1. Issues found: List each with file, line, and what’s wrong
  2. Severity: Error (must fix), Warning (should fix), or Note (could improve)
  3. Suggested fixes: Specific code changes for each issue

References

For detailed rules with code examples, see references/quality-rules.md — covers performance deep dives (x:Phase, layout optimization), security (PasswordVault, DPAPI, WebView2 hardening), accessibility (keyboard nav, screen readers), code quality (.editorconfig, naming), and globalization (x:Uid patterns, RTL, pluralization).