aspnet-core
Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging,…
Build or review WinUI 3 applications with the Windows App SDK, including MVVM patterns, packaging decisions, navigation, theming, windowing, and interop boundaries with other .NET stacks. USE FOR: building native modern Windows desktop UI on WinUI 3; integrating Windows App SDK
Claude Code
$ npx -y skills add managedcode/dotnet-skills --skill winui --agent claude-code
Codex
$ npx skills add managedcode/dotnet-skills --skill winui -a codex -y
Cursor
$ npx skills add managedcode/dotnet-skills --skill winui -a cursor -y
Gemini CLI
$ npx skills add managedcode/dotnet-skills --skill winui -a gemini-cli -y
GitHub Copilot
$ npx skills add managedcode/dotnet-skills --skill winui -a github-copilot -y
OpenCode
$ npx skills add managedcode/dotnet-skills --skill winui -a opencode -y
Windsurf
$ npx skills add managedcode/dotnet-skills --skill winui -a windsurf -y
name: winui description: "Build or review WinUI 3 applications with the Windows App SDK, including MVVM patterns, packaging decisions, navigation, theming, windowing, and interop boundaries with other .NET stacks. USE FOR: building native modern Windows desktop UI on WinUI 3; integrating Windows App SDK features into a .NET app; deciding between WinUI, WPF, WinForms, and MAUI for Windows. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made." compatibility: "Requires a WinUI 3, Windows App SDK, or MAUI-on-Windows integration scenario."
1. **Confirm WinUI is the right choice** — use when modern Windows-native UI, Fluent Design, and Windows App SDK capabilities are needed. For cross-platform, consider MAUI instead. 2. **Choose packaging model early** — packaged (MSIX) vs unpackaged differ materially for deployment, identity, and API access:
<!-- Unpackaged: add to .csproj --> <WindowsPackageType>None</WindowsPackageType>
3. **Apply MVVM pattern** with the MVVM Toolkit — keep views dumb, logic in ViewModels:
public partial class ProductsViewModel : ObservableObject
{
[ObservableProperty]
private ObservableCollection<Product> _products = [];
[ObservableProperty]
[NotifyCanExecuteChangedFor(nameof(DeleteCommand))]
private Product? _selectedProduct;
[RelayCommand(CanExecute = nameof(CanDelete))]
private async Task DeleteAsync()
{
if (SelectedProduct is null) return;
await _productService.DeleteAsync(SelectedProduct.Id);
Products.Remove(SelectedProduct);
}
private bool CanDelete() => SelectedProduct is not null;
}4. **Use x:Bind for compiled bindings** — better performance and compile-time checking than `{Binding}`:
<TextBlock Text="{x:Bind ViewModel.Title, Mode=OneWay}"/>5. **Wire DI through `Host.CreateDefaultBuilder`** — register services, ViewModels, and views. Resolve via `App.GetService<T>()`. 6. **Implement navigation service** — map ViewModels to Pages by convention. See [references/patterns.md](references/patterns.md) for the full pattern. 7. **Handle Windows App SDK features** — windowing (AppWindow), custom title bar, app lifecycle, notifications. 8. **Always set `XamlRoot`** when showing ContentDialog — omitting this causes silent failures. 9. **Validate on Windows targets** — behavior depends on runtime, packaging model, and Windows version.
flowchart LR A["Choose WinUI"] --> B["Select packaging model"] B --> C["MVVM + DI setup"] C --> D["Navigation and views"] D --> E["Windows App SDK features"] E --> F["Validate on target runtime"]
| Decision | Guidance | |----------|----------| | Packaged vs unpackaged | Packaged (MSIX) for Store, auto-update, and full API access; unpackaged for simpler deployment | | x:Bind vs Binding | Always prefer x:Bind — compiled, faster, type-safe | | MVVM Toolkit attributes | Use `[ObservableProperty]`, `[RelayCommand]` to eliminate boilerplate | | Navigation | Convention-based ViewModel→Page mapping via navigation service | | Theming | Use `RequestedTheme` on root element; respect system theme by default |
Stop explaining .NET to your AI. Start building. We've all been there: asking Claude to use Entity Framework, only to get EF6 patterns in a .NET 8 project. Explaining to Copilot that Blazor Server and Blazor WebAssembly aren't the same thing.
Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging,…
Build, upgrade, and operate Aspire 13.5.x C# or TypeScript application hosts with the current CLI, AppHost, ServiceDefaults,…
Build and debug Avalonia 11/12 .NET applications with XAML, compiled bindings, MVVM, custom controls, desktop lifetimes, and…
Build, review, or migrate Azure Functions in .NET with correct execution model, isolated worker setup, bindings, DI, and Durable…
Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design,…
Maintain or migrate EF6-based applications with realistic guidance on what to keep, what to modernize, and when EF Core is or is…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.