npx skills add https://github.com/openai/skills --skill winui-app此技能适用于需要基础设置指导、应用引导、现代 Windows UX 决策或具体实现模式的 WinUI 3 和 Windows App SDK 相关工作。
--force。config.yaml:```shell
winget configure -f config.yaml --accept-configuration-agreements --disable-interactivity
```
将此配置视为旨在启用开发者模式、安装或更新 Visual Studio Community 2026,并安装 WinUI 开发所需的托管桌面、通用和 Windows App SDK C# 组件。
在继续之前评估配置结果。成功则继续。如果失败,请检查输出而不是猜测。如果 winui 模板已可用且工具链可用,则记下部分失败并继续。如果先决条件仍然缺失,则停止并清晰地报告阻碍。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
在搭建脚手架之前验证模板是否可用:
dotnet new list winui
对于仅诊断环境的请求,请说明捆绑的引导程序可能会更改机器,并在运行前获得确认。如果用户拒绝更改,请使用 references/foundation-environment-audit-and-remediation.md 中的手动验证指南,并在 present、missing、uncertain 和 recommended optional tools 下总结就绪状态。
对于全新应用,使用 dotnet new winui -o <name> 搭建脚手架。仅当用户要求时才添加模板选项。支持的选项:-f|--framework net10.0|net9.0|net8.0、-slnx|--use-slnx、-cpm|--central-pkg-mgmt、-mvvm|--use-mvvm、-imt|--include-mvvm-toolkit、-un|--unpackaged、-nsf|--no-solution-file、--force。不要编造不支持的标志。如果用户要求打包行为,传递 --unpackaged false。否则保持模板默认值。
通过确认预期的项目文件存在并针对生成的 .csproj 运行 dotnet build 来验证新的脚手架。
通过其实际打包模型的正确路径启动新搭建的应用,并确认存在一个真实的顶级窗口,而不是仅仅依赖启动器进程的退出代码。
references/_sections.md,然后仅加载与任务匹配的参考文件。.exe 时,默认为非打包。MSB3073 或 XamlCompiler.exe)时,请阅读 references/foundation-template-first-recovery.md,并在构思自定义恢复结构之前,先简化回当前 dotnet new winui 脚手架(针对所选打包模型)。Grid、StackPanel、Border 或临时按钮分组的自定义行之前,优先使用原生 CommandBar 或其他现成的 WinUI 命令界面。GridView 或其他拥有滚动功能的集合仍能正确渲染水平海报轨道。Border 包装器,除非该边框执行了包含控件或父界面尚未提供的独特工作。避免"双层卡片"组合,即区域的 Border 包裹了已经渲染为卡片的子项。| 请求 | 首先阅读 |
|---|---|
| 检查此 PC 是否可以构建 WinUI 应用 | references/foundation-environment-audit-and-remediation.md |
| 安装缺失的 WinUI 先决条件 | references/foundation-environment-audit-and-remediation.md |
| 启动新的打包或非打包应用 | references/foundation-setup-and-project-selection.md |
| 从不透明的 XAML 编译器或启动失败中恢复,同时保持基于模板脚手架 | references/foundation-template-first-recovery.md |
| 构建、运行或验证 WinUI 应用是否实际启动 | references/build-run-and-launch-verification.md |
| 审查应用结构、页面、资源和绑定 | references/foundation-winui-app-structure.md |
| 选择外壳、导航、标题栏或多窗口模式 | references/shell-navigation-and-windowing.md |
| 选择控件或响应式布局模式 | references/controls-layout-and-adaptive-ui.md |
| 应用 Mica、主题、排版、图标或 Fluent 样式 | references/styling-theming-materials-and-icons.md |
| 改进无障碍功能、键盘操作或本地化 | references/accessibility-input-and-localization.md |
| 诊断响应性或 UI 线程性能 | references/performance-diagnostics-and-responsiveness.md |
| 决定是否使用 CommunityToolkit | references/community-toolkit-controls-and-helpers.md |
| 处理生命周期、通知或部署 | references/windows-app-sdk-lifecycle-notifications-and-deployment.md |
| 运行审查清单 | references/testing-debugging-and-review-checklists.md |
config.yaml 视为捆绑引导程序的真实来源。references/foundation-environment-audit-and-remediation.md 中的手动验证指南,并明确保持不确定信号,而不是暗示成功。config.yaml 缺失,请清晰说明,并回退到官方的 Microsoft 工作流,而不是假装捆绑路径存在。每周安装数
214
仓库
GitHub 星标数
15.3K
首次出现
2026年3月4日
安全审计
安装于
codex199
cursor192
gemini-cli191
opencode191
github-copilot190
kimi-cli190
Use this skill for WinUI 3 and Windows App SDK work that needs grounded setup guidance, app bootstrap, modern Windows UX decisions, or concrete implementation patterns.
--force unless the user explicitly asked to overwrite existing files.config.yaml:winget configure -f config.yaml --accept-configuration-agreements --disable-interactivity
Treat the configuration as intended to enable Developer Mode, install or update Visual Studio Community 2026, and install the Managed Desktop, Universal, and Windows App SDK C# components needed for WinUI development.
Assess the configuration result before continuing. Continue on success. If it fails, inspect the output instead of guessing. If the winui template is already available and the toolchain is usable, note the partial failure and continue. If prerequisites are still missing, stop and report the blocker clearly.
Verify the template is available before scaffolding:
dotnet new list winui
For diagnostics-only environment requests, explain that the bundled bootstrap may change the machine and get confirmation before running it. If the user declines changes, use the manual verification guidance in references/foundation-environment-audit-and-remediation.md and summarize readiness under present, missing, uncertain, and recommended optional tools.
For a brand new app, scaffold with dotnet new winui -o <name>. Add template options only when the user asked for them. Supported options: -f|--framework net10.0|net9.0|net8.0, -slnx|--use-slnx, -cpm|--central-pkg-mgmt, -mvvm|--use-mvvm, -imt|--include-mvvm-toolkit, -un|--unpackaged, -nsf|--no-solution-file, --force. Do not invent unsupported flags. If the user asks for packaged behavior, pass --unpackaged false. Otherwise keep the template default.
Verify a new scaffold by confirming the expected project file exists and running dotnet build against the generated .csproj.
Launch a newly scaffolded app through the correct path for its actual packaging model and confirm there is a real top-level window instead of relying only on the launcher process exit code.
references/_sections.md, then load only the reference files that match the task..exe launches after each change.MSB3073 or XamlCompiler.exe, read references/foundation-template-first-recovery.md and simplify back toward the current dotnet new winui scaffold for the chosen packaging model before inventing custom recovery structure.| Request | Read first |
|---|---|
| Check whether this PC can build WinUI apps | references/foundation-environment-audit-and-remediation.md |
| Install missing WinUI prerequisites | references/foundation-environment-audit-and-remediation.md |
| Start a new packaged or unpackaged app | references/foundation-setup-and-project-selection.md |
| Recover from opaque XAML compiler or startup failures while staying anchored to the template scaffold | references/foundation-template-first-recovery.md |
| Build, run, or verify that a WinUI app actually launched | references/build-run-and-launch-verification.md |
config.yaml in this skill directory as the bundled bootstrap source of truth.references/foundation-environment-audit-and-remediation.md and keep uncertain signals explicit instead of implying success.config.yaml is missing, say so clearly and fall back to the official Microsoft workflow instead of pretending the bundled path exists.Weekly Installs
214
Repository
GitHub Stars
15.3K
First Seen
Mar 4, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex199
cursor192
gemini-cli191
opencode191
github-copilot190
kimi-cli190
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
111,800 周安装
CommandBar or other stock WinUI command surface before building a custom row with Grid, StackPanel, Border, or ad hoc button groupings.GridView or other scroll-owning collection will still render a horizontal poster rail correctly.Border wrappers around sections, lists, or cards unless the border is doing distinct work that the contained control or parent surface does not already provide. Avoid "double-card" compositions where a section Border wraps child items that already render as cards.| Review app structure, pages, resources, and bindings | references/foundation-winui-app-structure.md |
| Choose shell, navigation, title bar, or multi-window patterns | references/shell-navigation-and-windowing.md |
| Choose controls or responsive layout patterns | references/controls-layout-and-adaptive-ui.md |
| Apply Mica, theming, typography, icons, or Fluent styling | references/styling-theming-materials-and-icons.md |
| Improve accessibility, keyboarding, or localization | references/accessibility-input-and-localization.md |
| Diagnose responsiveness or UI-thread performance | references/performance-diagnostics-and-responsiveness.md |
| Decide whether to use CommunityToolkit | references/community-toolkit-controls-and-helpers.md |
| Handle lifecycle, notifications, or deployment | references/windows-app-sdk-lifecycle-notifications-and-deployment.md |
| Run a review checklist | references/testing-debugging-and-review-checklists.md |