Agent skill
winui-patterns
WinUI 3 and XAML patterns for the Pomodoro Time Tracker. Activates when working with ViewModels, XAML pages, data binding, or UI components.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/winui-patterns
SKILL.md
WinUI 3 Patterns Skill
Activates when: ViewModels, XAML, data binding, or UI components mentioned.
Shared WinUI Guidelines
@/.claude/prompts/winui/mvvm/no-value-converters.md
@/.claude/prompts/winui/fundamentals/page-setup.md
@/.claude/prompts/winui/mvvm/dialog-callbacks.md
@/.claude/prompts/winui/mvvm/timer-pattern.md
@~/.claude/prompts/dotnet/fundamentals/async-await.md
Project-Specific Conventions
CRITICAL: No Value Converters
// ❌ NEVER
Visibility="{x:Bind Converter={StaticResource BoolToVisibility}}"
// ✅ ALWAYS
public bool IsVisible => SomeCondition;
Visibility="{x:Bind ViewModel.IsVisible, Mode=OneWay}"
WinUI 3's x:Bind auto-converts bool to Visibility.
Always Use x:Bind
<!-- ✅ CORRECT - Compile-time checked -->
<TextBox Text="{x:Bind ViewModel.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<!-- ❌ WRONG - Runtime binding -->
<TextBox Text="{Binding Name, Mode=TwoWay}" />
Binding Modes
| Mode | Use Case |
|---|---|
OneTime |
Static data |
OneWay |
Display-only |
TwoWay |
User input |
Key Namespaces
using PomodoroTimeTracker.ViewModels;
using PomodoroTimeTracker.Application.DTOs;
using PomodoroTimeTracker.Application.Interfaces;
DI Registration
// ViewModels - Transient (CRUD) or Singleton (Timers)
services.AddTransient<ClientDetailViewModel>();
services.AddSingleton<PomodoroViewModel>();
// UI Services - Singleton
services.AddSingleton<INavigationService, NavigationService>();
services.AddSingleton<IDialogService, DialogService>();
Common Mistakes to Avoid
- InitializeComponent before ViewModel - ViewModel must exist first
- Binding instead of x:Bind - Always use x:Bind
- async void - Only for framework handlers
- Value converters - Use explicit properties instead
- XamlRoot missing - ContentDialog requires
XamlRoot = this.XamlRoot
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?