winapp CLI is a command-line tool for Windows application development that manages SDKs, app identity, manifests, certificates, packaging, and build tools. It helps developers using frameworks such as .NET, Win32, CMake, Electron, or Rust access Windows-native development capabilities. The catalogue add-ons provide agent workflows for using the CLI.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add microsoft/winappCli --skill winui-wpf-migrationgit clone --depth 1 https://github.com/microsoft/winappCliWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/microsoft/winappcli/winui-wpf-migration)<a href="https://agentmods.dev/skills/microsoft/winappcli/winui-wpf-migration"><img src="https://agentmods.dev/badge/skills/microsoft/winappcli/winui-wpf-migration/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/microsoft/winappcli/winui-wpf-migration"><img src="https://agentmods.dev/badge/skills/microsoft/winappcli/winui-wpf-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00073 | $0.01487 |
| Opus 5.5 | $0.00029 | $0.00595 |
| Sonnet 5.5 | $0.00015 | $0.00297 |
| Haiku 4.5 | $0.00007 | $0.00149 |
Grade A, and why
winui-wpf-migration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migration Process
Use the WinApp CLI 0.7+ prerequisites and per-app analyzer setup in winui-dev-workflow. The normal SDK path needs .NET 8.0.100 or later and the SDK required by the target TFM; Native AOT additionally needs MSVC/Desktop C++ tools. Handle missing prerequisites as described there.
Step 1: Audit the WPF Source
Before writing code, inventory WPF-specific APIs:
# Find all WPF namespace usage
Select-String -Path (Get-ChildItem -Recurse -Filter "*.cs" | Where-Object { $_.FullName -notlike "*\obj\*" }) -Pattern "System\.Windows\." | Select-Object -Property Filename, LineNumber, Line
List: WPF controls used, custom MVVM framework, imaging APIs, threading patterns, Win32 interop.
Step 2: Create WinUI 3 Project and Align Namespaces
winapp new --name <AppName> --template winui-mvvm --template-version latest --use-defaults
Immediately set <RootNamespace> in .csproj to match the WPF namespace. Update x:Class in App.xaml, MainWindow.xaml and their code-behind files. Add the analyzer per winui-dev-workflow. Build to verify before porting any code.
Before implementing API replacements, restore the app project and check its exact references from the WinUI project directory, not the old WPF project or machine SDK:
winapp find-api DispatcherQueue --json --project-dir .
winapp find-api members DispatcherQueue --filter TryEnqueue --json --project-dir .
winapp find-api check-property ListView ItemsSource SelectionMode --json --project-dir .
Use winapp find-ui "<intent>" for usage samples; see winui-design for project selection and batch API checks.
Step 3: Replace Namespaces
| WPF | WinUI 3 |
|---|---|
System.Windows |
Microsoft.UI.Xaml |
System.Windows.Controls |
Microsoft.UI.Xaml.Controls |
System.Windows.Media |
Microsoft.UI.Xaml.Media |
System.Windows.Input |
Microsoft.UI.Xaml.Input |
System.Windows.Data |
Microsoft.UI.Xaml.Data |
System.Windows.Threading.Dispatcher |
Microsoft.UI.Dispatching.DispatcherQueue |
PresentationCore / PresentationFramework |
Remove entirely |
Step 4: Replace Controls
| WPF Control | WinUI 3 Equivalent |
|---|---|
DataGrid |
ListView with Grid column headers |
WrapPanel |
ItemsRepeater + UniformGridLayout |
TabControl |
TabView |
StatusBar |
Grid row at bottom with TextBlock elements |
Menu / MenuItem |
MenuBar / MenuBarItem / MenuFlyoutItem |
ToolBar |
CommandBar |
Expander (custom) |
Expander (built-in) |
Step 5: Replace Threading
// WPF
Application.Current.Dispatcher.Invoke(() => { /* UI work */ });
// WinUI 3
dispatcherQueue.TryEnqueue(() => { /* UI work */ });
Get via DispatcherQueue.GetForCurrentThread(). No Application.Current.Dispatcher in WinUI 3.
Step 6: Replace Imaging
Critical: PresentationCore.dll and System.Windows.Media.Imaging crash the WinUI XAML compiler. This is an architectural incompatibility — no workaround exists.
- Remove ALL
System.Windows.Media.Imagingreferences at migration start - Replace with
Windows.Graphics.Imaging(WinRT) orMicrosoft.UI.Xaml.Media.Imaging.BitmapImage - Do NOT add
<UseWPF>true</UseWPF>— it silently corrupts the build - If heavy imaging code exists, migrate it early (step 2, not step 7)
Step 7: Replace MVVM Framework
Delete custom ObservableObject/RelayCommand/DelegateCommand. Use CommunityToolkit.Mvvm:
INotifyPropertyChangedbase →ObservableObjectwith[ObservableProperty]partial properties (fix MVVMTK0045; don't keep fields)- Custom
RelayCommand→[RelayCommand]attribute - Prefer
{x:Bind}for known types; keep runtime{Binding}/DisplayMemberPathwhere needed. Seewinui-packaging'sreferences/sourcegen-patterns.mdfor binding modes,x:DataType, and AOT-safe runtime binding. DynamicResource→{ThemeResource}
Step 8: Replace Resources
.resx→.resw(copy + rename toStrings\en-us\){x:Static}→x:Uidfor localized stringsProperties.Resources.Key→ResourceLoader.GetString("Key")
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago Changed · -27 tokens per session 50c58cdb73ba
- 9d ago First seen · 112 lines · 100 tokens per session scan A b8756a23a41d
winui-wpf-migration is a skill published in the GitHub repository microsoft/winappCli (1,314 stars, last pushed today), licensed MIT. It adds 73 tokens to every session and 1,487 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-07.
Other skills, from other repositories
claw-admin
Claw system administration: service management, IM connections, logs, cron, and workspace diagnostics. Use when the user asks to manage claw services, connect/disconnect IM platforms, view logs, or perform system-wide operations.
x-nets
Enhanced netstat module with cached data and structured output. View network connections, routing tables, and interface statistics in interactive or TSV/CSV formats. Dependency: This is an x-cmd module. Install x-cmd first (see x-cmd skill for installation options). see x-cmd skill for installation.
x-theme
Change terminal command line prompt theme. Globally manage the display style of all x-cmd interactive components. Supports multiple theme vendors: theme, starship, ohmyposh. Dependency: This is an x-cmd module. Install x-cmd first (see x-cmd skill for installation options). see x-cmd skill for installation.
x-arp
Display ARP cache table with MAC vendor lookup and suspicious entry detection. Supports CSV, TSV, and TUI output. Dependency: This is an x-cmd module. Install x-cmd first (see x-cmd skill for installation options). see x-cmd skill for installation.
x-mankier
Search and browse man pages from ManKier.com. Command line interface for ManKier man page repository. Dependency: This is an x-cmd module. Install x-cmd first (see x-cmd skill for installation options). see x-cmd skill for installation.
x-osv
CLI for Google OSV database. Query vulnerabilities for packages, scan local projects for vulnerable dependencies. Dependency: This is an x-cmd module. Install x-cmd first (see x-cmd skill). Required Tool: Install osv-scanner for project scanning (see https://github.com/google/osv-scanner).