/winui:winui-code-reviewfrom winui
Reviews WinUI 3 code for MVVM compliance, x:Bind correctness, accessibility, theming, security, and performance. Catches issues that compile but are wrong, fragile, or slow.
Ships in winui. 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.
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.
Read through the project's XAML and C# files and check each section below. For analyzer setup, see winui-dev-workflow; if it isn't installed, tell the user its checks didn't run.
Before reporting an API mismatch or recommending a replacement, verify it against the restored app project's references with CLI 0.7+ winapp find-api, for example winapp find-api members NavigationView --filter selected --json --project-dir <app-project-dir>. See winui-design for batch property checks and project selection; machine-SDK results are not proof of app-package availability.
The analyzer catches a curated set of WinUI 3 / Windows App SDK issues with categorized 4-digit IDs:
UwpXamlNamespace, Window.Current, CoreDispatcher, GetForCurrentView)TabView content, nullable binding paths, ineffective binding modes, null Converter, missing AutomationId, attached-property syntax)[ObservableProperty] field syntax)WebView2 not initialized, removed ONNX Runtime GenAI APIs WUI4101-WUI4103)Use the installed package's diagnostic help links for rule details. Check inherited x:DefaultBindMode and event/command/converter exceptions before treating an omitted mode as a defect. Fix root causes; any justified false-positive suppression must be narrow and documented, not a blanket NoWarn policy. Keep IL/CsWinRT warnings enabled as well; the WinUI analyzer does not replace AOT/trim analysis.
ObservableObject, use [ObservableProperty] partial properties (not fields)[RelayCommand] attribute, not manual ICommand implementationsSolidColorBrush, Visibility, BitmapImage) — these belong in converters or XAMLasync Task for async methods, async void only for event handlersObservableCollection<T> — use .Clear() + re-add{x:Bind} for known source types; runtime {Binding} needs a justified source and, for AOT, a generated property providerOneWay/TwoWay mode (explicit or inherited x:DefaultBindMode) plus change notifications; don't rewrite stable event/command/converter bindings to satisfy a blanket mode rulex:DataType on DataTemplates using compiled x:Bind, not on PageViewModel.Selected.Name) without FallbackValuewinui-packaging's references/sourcegen-patterns.mdAutomationProperties.AutomationId on every interactive control (Button, TextBox, ComboBox, ToggleSwitch, ListView, NavigationViewItem)AutomationProperties.Name on icon-only buttons and controls without visible textButton, HyperlinkButton) — not clickable Border/TextBlock{ThemeResource} brushes — no hardcoded #FF0000 or Color="Blue"TitleTextBlockStyle, SubtitleTextBlockStyle, BodyTextBlockStyle, CaptionTextBlockStyle) — no raw FontSizeControlCornerRadius / OverlayCornerRadius — not hardcoded values{StaticResource} not {ThemeResource} (except for brush usage sites)Process.Start with unsanitized user inputFile.Delete / File.WriteAllText without validationListView/GridView (virtualized), not StackPanel with foreachx:Load for content that's not always visible (e.g., dialogs, secondary panels)Task.Run or async/await — never block UI.Result / .Wait() / .GetAwaiter().GetResult() — these deadlock the UI threadusing statements on all disposable objects (Model, Tokenizer, InferenceSession, Generator)x:Uid in XAML and ResourceLoader in C# — not hardcodedStrings/en-us/Resources.resw (not .resx)CultureInfo.CurrentCulture — not hardcoded formatsFlowDirection inherited from root, no absolute positioning that breaks in RTL)string.Format or interpolation with resource stringsAfter reviewing, summarize:
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).
What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/winui-designRead before writing or changing WinUI 3 XAML: choosing controls, pages and navigation, layout, Fluent Design, theming, accessibility, x:Bind, real samples, and checking that APIs exist with winapp find-api. Not for WPF or WinForms UI, even if the app uses the Windows App SDK./winui-dev-workflowCreate, build, run, and fix build errors in WinUI 3 apps (C# or C++) with WinApp CLI 0.7+: winapp new, winapp run, Native AOT, crash diagnosis. Use for a new WinUI app or a WinUI project that fails to build or crashes. Not for WPF, WinForms, or Electron apps that only reference the Windows App SDK./winui-packagingMSIX packaging, signing, and Microsoft Store publishing for WinUI 3 apps with WinApp CLI 0.7+: project packaging, Native AOT, certificates, self-contained deployment, CI/CD. Use when releasing or publishing a WinUI app. Not for WPF, WinForms, or Electron apps that only reference the Windows App SDK.npx claudepluginhub microsoft/winappcli --plugin winuiOther plugins' skills for the same job