microsoft/winappcli/winapp-setup
Claude Code and agent skill by microsoft/winappcli
- vendor
Checking that the SKILL.md file is still in the repository.
Add Windows SDK and Windows App SDK support to an existing project (winapp init), restore pinned SDKs after cloning (winapp restore), update SDKs, or create a new WinUI app (winapp new). Use for Electron, .NET, C++, Rust, Flutter, or Tauri projects that need Windows setup.
Install
npx vskill@latest install microsoft/winappcli/winapp-setupSKILL.md
The same SKILL.md was published earlier as microsoft/winappcli/winapp-setup.
If you can't run `winapp` yourself (no shell, or the command is denied), give the user the exact winapp command(s) for their project instead of only describing the steps.
When to use
Use this skill when:
- Scaffolding a brand-new WinUI 3 app from an official Windows App SDK template (
winapp new) - Adding Windows platform support to an existing project (Electron, .NET, C++, Rust, Flutter, Tauri, etc.)
- Cloning a repo that already uses winapp and need to restore SDK packages
- Updating SDK versions to get the latest Windows SDK or Windows App SDK
Prerequisites
Install the winapp CLI before running any commands:
You need an existing app project — winapp init does not create new projects, it adds Windows platform files to your existing codebase.
Already have a `Package.appxmanifest`? .NET projects that already have a packaging manifest (e.g., WinUI 3 apps or projects with an existing MSIX packaging setup) likely don't need `winapp init`. Ensure your.csprojreferences theMicrosoft.WindowsAppSDKNuGet package and has the right properties for packaged builds (e.g.,<WindowsPackageType>MSIX</WindowsPackageType>). WinUI 3 apps created from Visual Studio templates are typically already fully configured — you can go straight to building and usingwinapp runorwinapp package.
Key concepts
`Package.appxmanifest` is the most important file winapp creates — it declares your app's identity, capabilities, and visual assets. Most winapp commands require it (package, run, cert generate --manifest).
`winapp.yaml` is only needed for SDK version management via restore/update. Projects that already reference Windows SDK packages (e.g., via NuGet in a .csproj) can use winapp commands without it.
`.winapp/` is the local folder where SDK packages and generated projections (e.g., CppWinRT headers) are stored. This folder is .gitignored — team members recreate it via winapp restore.
Usage
Create a new WinUI app
To start a brand-new WinUI app (rather than adding Windows support to an existing project), use winapp new. It verifies the .NET SDK, installs the official WinUI dotnet new template pack on demand (grabbing the latest, or offering to update a stale one), and scaffolds the app against your installed SDK's target framework. Most WinUI templates already include packaging/identity, so no `winapp init` step is needed afterward — follow the template-specific next step winapp new prints when it finishes. App templates go straight to winapp run (which builds and launches the app); the winui-lib (class library) and winui-unittest templates differ (reference the library from an app project, or winapp run the packaged test app to run its tests). The template list is read live from the installed pack — run winapp new --list to see the current set.
The pack ships two styles of app. XAML templates (winui, winui-navview, winui-tabview, winui-mvvm) define the UI in markup with a C# code-behind. Reactor templates (reactor, reactor-mvu, reactor-navview, reactor-tabview) are pure C# with no XAML, using an MVU pattern.
Reactor templates are experimental. They reference the prereleaseMicrosoft.UI.Reactorpackages, whose APIs can change or be removed in a future release — don't pick one unless the user explicitly asks for Reactor.winapp newmarks them (Experimental) in--listand in the picker, reports"Experimental": truein--json, and never selects one as the default. They also require the .NET 10 SDK or newer; on an older SDKwinapp newfails up front naming the version it needs.
A first run, template-pack update, or newly published Windows App SDK version may take longer while missing NuGet packages download and restore. If scaffolding continues beyond 10 seconds,winapp newupdates its status message rather than silently waiting.
Initialize a new winapp project
After init, your project will contain:
Package.appxmanifest— package identity and capabilitiesAssets/— default app icons (Square44x44Logo, Square150x150Logo, etc.)winapp.yaml— SDK version pinning forrestore/update.winapp/— downloaded SDK packages and generated projections.gitignoreupdate — excludes.winapp/anddevcert.pfx
When JS bindings are enabled (via --add-js-bindings or by answering yes in interactive init), npm/Electron projects also get:
.winapp/bindings/— generated JS bindings for Windows App SDK APIs (npm-only, Node / Electron)package.jsonupdate — adds thewinapp.jsBindingsnamespace and@microsoft/dynwinrtdependency (npm-only)
Initialize a sparse identity package (existing exe)
Use --sparse when you have an already-built desktop exe (WPF, WinForms, Win32, Electron, etc.) and only want to give it package identity — without repackaging the whole app into the MSIX. The app's files stay where they are and are resolved from an external content location at runtime.
--sparse requires --exe. It skips all SDK/package installation (sparse identity packages have no SDK dependencies) and, by default, writes to a dedicated sparse/ folder in the current directory (override with --output-dir) so the manifest and its Assets/ stay out of a build-output folder that a rebuild would wipe:
appxmanifest.xml— identity-only sparse manifest (declaresuap10:AllowExternalContent)Assets/— placeholder visual assets (extracted from the exe's icon when possible), resolved from the external location at runtime — not bundled into the.msix
If an appxmanifest.xml already exists in the target directory, init fails instead of overwriting it; re-run with --force to regenerate.
This is step 1 of the sparse packaging workflow. Continue with:
winapp pack ./sparse/appxmanifest.xml --cert ./devcert.pfx— build the signed identity.msixwinapp embed-identity ./bin/Release/MyApp.exe— connect the exe to the identity package (re-sign the exe afterward)- Register in your installer with
Add-AppxPackage -Path <msix> -ExternalLocation <install-dir>
For the full walkthrough, see the Sparse packaging guide.
Restore after cloning
Use restore when you clone a repo that already has winapp.yaml but no .winapp/ folder. For a .NET project there is no winapp.yaml, so restore runs dotnet restore instead.
Private or custom NuGet feeds
init, restore, and update download the SDK packages through NuGet, honoring your standard nuget.config hierarchy. Private feeds and mirrors, feed credentials (including credential providers), and a custom globalPackagesFolder all work as they do for dotnet restore. To use only your feed, <clear /> the inherited sources first:
Security note: For native projects winapp resolvesnuget.configfrom the directory it operates on: theinit/restoredirectory argument,--config-dirwhen given, otherwise the current directory. For .NET projects the sources come from the project's ownnuget.confighierarchy instead, because that is whatdotnet add packageanddotnet restoreuse — so put a private feed's config in the project directory or an ancestor, not in a sibling passed via--config-dir(that is reported and ignored). Run these commands only against directories you trust, the same asdotnet restore. Use<packageSourceMapping>to pin packages to specific feeds when more than one source is configured.
Update SDK versions
This updates winapp.yaml with the latest versions and reinstalls packages. If the newest Windows App SDK release is still being published (some of its packages aren't on the feed yet), update uses the previous release instead and prints a note; run winapp update again later to pick up the new release.
Run and debug with identity
Use winapp run during iterative development — it creates a loose layout package, registers a debug identity, and launches the app in one step. For identity-only registration without loose layout, use winapp create-debug-identity instead.
Project mode: winapp run on a .csproj (.NET / WinUI)
For .NET SDK projects you can point winapp run at the project instead of the build output — it builds the .csproj and launches it in one step, so there's no separate dotnet build and no need to know the output path:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 19 Nov 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/winapp/skills/winapp-setup/SKILL.md
Popularity
- Repository stars
- 1,389
- Repository forks
- 98
- 7-day trend score
- 36
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoft/winappcli/winapp-setup)