BumpyClock/agent-templates / skills/programming
programming
UnverifiedImplement, debug, refactor, or review code with scoped changes and evidence.
references/winui/references/winui-code-review/guide.md
View on GitHub# WinUI Code Review
Use this guide for a requested review or a concrete WinUI quality concern.
Inspect affected XAML, C#, and dependencies needed to establish a defect.
A successful build or an intended commit does not require a separate review.
Honor repository conventions where several valid designs exist.
Require a concrete consequence before treating a pattern preference as a defect.
## WinUI-specific concerns
- Check binding source, update mode, notifications, and nullable paths against the intended behavior.
- Use `{x:Bind}` for compiled paths and `{Binding}` where runtime sources or `DataContext` semantics fit.
- Check UI-thread access, task lifetime, event subscriptions, and disposal of owned resources.
- Check virtualization and layout constraints when collection size can affect responsiveness.
- Check accessible names, keyboard access, focus order, and contrast for affected controls.
- Use stable `AutomationId` values where tests require selectors. IDs alone do not establish accessibility.
- Check resource lookup across supported themes and cultures when those resources change.
MVVM libraries, partial properties, command generators, and fixed spacing grids are project choices, not universal correctness requirements.
Exception: when the app publishes with Native AOT or trimming, `[ObservableProperty]` on a field is a defect (MVVMTK0045). See [source generator patterns](../winui-packaging/references/sourcegen-patterns.md#communitytoolkitmvvm-source-generators).
Collection replacement is valid when notifications and selection semantics remain correct.
An `async` method does not itself move CPU work off the UI thread.
## Analyzer integration
The sibling [development wrapper](../winui-dev-workflow/BuildAndRun.ps1) injects the bundled analyzer through `CustomAfterDirectoryBuildProps`.
Plain `dotnet build`, Visual Studio, and `winapp run` do not automatically load that payload.
Treat diagnostics as evidence to investigate, not proof that every suggested pattern is required.
Use explicit project analyzer configuration when the repository requires coverage outside the wrapper.
## References
- For a concrete performance, security, or localization concern, consult the relevant section of [quality rules](references/quality-rules.md).
- For binding semantics, consult [Microsoft data binding documentation](https://learn.microsoft.com/en-us/windows/apps/develop/data-binding/data-binding-in-depth).
Report actionable defects with location, consequence, and supporting evidence.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |