All skills
openai avatar

/winui-app

@c207989 official
by openaiopenai/skills28k stars
1,891

Bootstrap, develop, and design modern WinUI 3 desktop applications with C# and the Windows App SDK using official Microsoft guidance, WinUI Gallery patterns, Windows App SDK samples, and CommunityToolkit components. Use when creating a brand new app, preparing a machine for WinUI, reviewing, refactoring, planning, troubleshooting, environment-checking, or setting up WinUI 3 XAML, controls, navigation, windowing, theming, accessibility, responsiveness, performance, deployment, or related Windows app design and development work.

Use this Skill: https://skilld.dev/gh/openai/skills/winui-app

This session only. Nothing lands on disk.

referencesbuild-run-and-launch-verification.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

What This Reference Is For

Use this file when the task involves building, running, launch failures, startup crashes, or final verification that a WinUI app actually opens on the current machine.

Required Workflow

  1. Identify the real build target:
    • solution or project file
    • configuration
    • platform
    • packaged or unpackaged model
  2. Build after each meaningful code edit and again at task completion.
  3. Run the app after changes when feasible. Always do it when the user asked for it or when startup, navigation, resources, or packaging changed.
  4. Use the launch path that matches the deployment model:
    • packaged local dev: normally Visual Studio deploy or another package-aware flow
    • unpackaged local dev: normally the built executable the user will actually run
  5. Verify real launch with objective evidence such as:
    • non-zero main window handle
    • expected window title
    • responsive process with visible shell
    • no immediate startup exception or crash
  6. After completing app work, including a first scaffold or a later build-and-fix cycle, leave a successfully verified final app instance running so the user can see that it worked unless they explicitly asked you not to.
  7. If launch fails or verification is ambiguous, debug the failure before saying the app is ready.

Packaged vs Unpackaged Rules

  • Choose one model intentionally before wiring startup, persistence, and launch instructions.
  • Packaged apps can rely on package identity and package-backed storage.
  • Unpackaged apps must not assume package identity. Guard or replace APIs that require it.
  • APIs such as Windows.Storage.ApplicationData.Current can fail in unpackaged runs even when the build succeeds.
  • Do not mix packaged-only assumptions into an unpackaged startup path.

Build and Launch Guidance

  • Prefer explicit platform targets when WinUI output is sensitive to architecture defaults. If AnyCPU creates ambiguity, use x64 for local verification.
  • For unpackaged verification, prefer launching the built .exe from bin\Debug\...\win-x64\ or the project-specific output path.
  • After a successful final launch verification, do not immediately tear the app down just because verification succeeded; keep it open for the user unless it blocks the next required action.
  • If dotnet run throws bootstrapper, deployment, or COM activation errors, treat that as a signal that the chosen launch path or packaging setup is wrong for the current app.
  • Stop old app instances before rebuilding if they can lock output files.

Debugging Startup Failures

  • Separate environment problems from app-code startup crashes.
  • If the app exits before showing a window, inspect the startup path first:
    • App.xaml
    • merged resource dictionaries
    • converters
    • MainWindow
    • services used during startup
  • For startup or manifest issues, compare the current app against a fresh dotnet new winui scaffold for the same packaging model before broader surgery.
  • For opaque MSB3073 and XamlCompiler.exe failures, simplify back toward the template-generated startup and shared-resource shape before making further structural changes.
  • Restore complex startup pieces incrementally when the failure point is unclear. A minimal App.xaml plus minimal MainWindow is a valid isolation step.
  • If the diagnostics look stale or inconsistent with the current files, run a clean build once before deeper surgery.
  • Prefer restoring the last known-good template-based shared-resource state over moving styles inline as the long-term fix.
  • When using unpackaged startup, review persistence, notifications, storage, and activation code for hidden package-identity assumptions.

Exit Criteria

  • Build succeeds from the intended local workflow.
  • The app launches from the intended local workflow.
  • A real top-level window or equivalent expected UI is confirmed.
  • No unresolved startup exception remains.

Source: SKILL.md on GitHub

No alerts17d5 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    This skill provides guidance and scaffolding patterns for building WinUI 3 desktop applications with the Windows App SDK. It includes standard platform configuration and setup mechanisms that leverage official Windows tools. While it executes configuration scripts to configure the local environment, these are implemented via native tools such as WinGet according to official Microsoft workflows.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer6mo

    5/20 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at c207989. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Activeupdated 7 months ago
  • winui
  • csharp
  • windows-app-sdk
  • desktop
  • xaml
  • visual-studio
  • winget
  • theming
  • accessibility
  • responsive-design

README badge

README badge for openai/skills/winui-app

Bootstraps and develops WinUI 3 desktop applications in C# using the Windows App SDK, with guidance for environment setup, project scaffolding, XAML patterns, controls, navigation, theming, and deployment. Use this skill when creating a new app, preparing a machine for WinUI development, or troubleshooting XAML compilation and startup issues.

Generated from the current SKILL.md.

Does this skill work with C++ or only C#?
The skill is built around C# and the Windows App SDK. C++ or C++/WinRT is mentioned only when the difference is material to the task.
Can I use this skill to set up an unpackaged app instead of a packaged one?
Yes. The skill supports both packaged and unpackaged app models. You can pass the `--unpackaged` flag to `dotnet new winui`, or the skill will default to packaged for Store-like workflows and unpackaged for CLI build-and-run loops.
What if my machine isn't ready for WinUI development yet?
The skill includes a bundled WinGet configuration (`config.yaml`) that installs Visual Studio Community 2026, enables Developer Mode, and adds the required Windows App SDK C# components. For diagnostics-only audits without machine changes, the skill provides manual verification guidance instead.
Does this skill handle third-party component libraries or only native WinUI controls?
The skill favors native WinUI controls and Fluent styling first. It uses the CommunityToolkit only when built-in controls do not cover the need cleanly, and avoids inventing custom component libraries unless you explicitly request them.

Generated from the current SKILL.md. These answers refresh after source changes.