AGENT SKILL

dotnet-ui-app

Mandatory for all WinUI 3, Windows App SDK, and Avalonia UI work. Always use whenever a task creates, modifies, reviews, plans, designs, or troubleshoots a WinUI or Avalonia app; touches XAML UI, `.xaml`, `.axaml`, UI code-behind, controls, layout, navigation, windowing, styling, theming, accessibility, input, localization, responsiveness, or UI performance in those frameworks; sets up or checks a development environment; or asks to choose, build, run, package, or deploy a Windows desktop or cross-platform .NET UI app. Load `dotnet` first for C#/.NET project or CLI work, then use this skill for UI-specific guidance. Do not invoke for WPF, .NET MAUI, Uno Platform, or generic C# work unless the task also involves WinUI 3, Windows App SDK, Avalonia UI, or choosing among supported frameworks.

适用职业设计师
License 许可
MIT
所属仓库
japurcell/skills
最近更新
2026-11-11
Stars
★ 0
Forks
0

01 前言 Front Matter

name
dotnet-ui-app
description
Mandatory for all WinUI 3, Windows App SDK, and Avalonia UI work. Always use whenever a task creates, modifies, reviews, plans, designs, or troubleshoots a WinUI or Avalonia app; touches XAML UI, `.xaml`, `.axaml`, UI code-behind, controls, layout, navigation, windowing, styling, theming, accessibility, input, localization, responsiveness, or UI performance in those frameworks; sets up or checks a development environment; or asks to choose, build, run, package, or deploy a Windows desktop or cross-platform .NET UI app. Load `dotnet` first for C#/.NET project or CLI work, then use this skill for UI-specific guidance. Do not invoke for WPF, .NET MAUI, Uno Platform, or generic C# work unless the task also involves WinUI 3, Windows App SDK, Avalonia UI, or choosing among supported frameworks.
compatibility
WinUI 3 build, run, and packaging require Windows. Avalonia supports cross-platform targets; the .NET SDK is needed for build and verification.

02 资源文件 26

03 SKILL.md 正文

.NET UI App

Use this skill for modern .NET UI work across WinUI 3 / Windows App SDK and Avalonia UI.

Framework Paths

  • WinUI 3 / Windows App SDK: use for Windows-first desktop apps, Fluent Windows UX, Store/MSIX workflows, Windows App SDK APIs, lifecycle, notifications, packaging, Mica, and Windows shell integration.
  • Avalonia UI: use for cross-platform .NET UI across Windows, macOS, Linux, and selected browser/mobile/embedded targets, especially when CLI-friendly development and shared UI code matter.

Required Flow

  1. Classify the task as framework selection, environment/setup, new-app bootstrap, design, implementation, review, troubleshooting, or deployment.
  2. Determine the framework:
    • Use WinUI when the user asks for WinUI, Windows App SDK, Windows-only desktop, Microsoft Store/MSIX, Mica, Windows lifecycle, notifications, or windowing APIs.
    • Use Avalonia when the user asks for Avalonia, cross-platform desktop, Linux/macOS support, shared XAML UI, or CLI-friendly .NET desktop work.
    • Ask a concise clarifying question if the framework is not implied.
  3. Read references/_sections.md, then load only the narrowest matching references.
  4. Apply shared UI guidance first, then framework-specific guidance only when implementation details matter.
  5. For new apps:
    • Choose or confirm a safe app name.
    • Create the project in the current workspace unless another location is requested.
    • Do not overwrite existing files unless the user explicitly asks.
    • Verify templates before scaffolding.
    • Scaffold from official templates.
    • Build, run, and verify a real top-level window or expected UI.
  6. For WinUI setup, use configs/winui-config.yaml only after approval for machine-changing remediation.
  7. For Avalonia setup, prefer non-mutating checks first: dotnet --info, dotnet new list avalonia; install Avalonia.Templates only when needed and appropriate.
  8. For app edits, make a minimal complete edit set, build, run when feasible, and verify objective startup behavior.
  9. Preserve existing codebase conventions.
  10. Do not mechanically translate XAML across frameworks. Adapt controls, resources, bindings, styles, and platform APIs.

Common Routes

Request Read first
Choose WinUI vs Avalonia references/_sections.md
General UI design review references/common/testing-debugging-and-review-checklists.md
Controls or layout references/common/controls-layout-and-adaptive-ui.md
Accessibility/input/localization references/common/accessibility-input-and-localization.md
Styling/theme/icons references/common/styling-theming-and-icons.md
Performance/responsiveness references/common/performance-diagnostics-and-responsiveness.md
New WinUI app references/winui/foundation-setup-and-project-selection.md
New Avalonia app references/avalonia/foundation-setup-and-project-selection.md
Build/run WinUI references/winui/build-run-and-launch-verification.md
Build/run Avalonia references/avalonia/build-run-and-launch-verification.md
WinUI lifecycle/deployment references/winui/windows-app-sdk-lifecycle-notifications-and-deployment.md
Avalonia deployment references/avalonia/platform-targets-and-deployment.md

Universal UI Rules

  • Use framework controls before custom controls.
  • Avoid bespoke component systems unless explicitly required.
  • Support light and dark mode by default.
  • Avoid hard-coded light-only or dark-only colors.
  • Treat accessibility as part of implementation.
  • Preserve visible focus and keyboard reachability.
  • Make scroll ownership explicit.
  • Avoid redundant cards, borders, and nested visual containers.
  • Treat responsiveness as shell plus page behavior.
  • Keep navigation simple, stable, and task-oriented.

WinUI Rules

  • Prefer native WinUI and Fluent controls.
  • Prefer NavigationView for standard desktop shells.
  • Prefer CommandBar for grouped commands.
  • Make packaged vs unpackaged explicit early.
  • Use Windows App SDK APIs for lifecycle, notifications, deployment, and windowing.
  • Use CommunityToolkit only when built-in WinUI does not cover the need cleanly.

Avalonia Rules

  • Prefer built-in Avalonia controls, resources, styles, theme variants, and selectors.
  • Prefer official Avalonia templates for new apps.
  • Prefer MVVM for nontrivial state and commands, but avoid ceremony for small prototypes.
  • Use compiled bindings where they improve safety/performance and the project is structured for them.
  • Keep platform-specific behavior explicit.
  • Do not assume Windows App SDK, Mica, WinUI NavigationView, or WinUI resource keys exist.
  • Verify on the target OS when platform behavior matters.

04 同仓库更多 Skills

japurcell
japurcell/skills

spec-create

Create or revise a portable behavioral SPEC for a feature or whole product. Use when specifying a new idea, documenting an existing system for reimplementation, or defining a change while preserving compatibility. Implementation planning is a separate task.

产品经理
★ 0
japurcell
japurcell/skills

prd-ralph

Complete at most one eligible unfinished PRD task, verify it, log progress, and optionally create one scoped commit.

产品经理
★ 0
japurcell
japurcell/skills

fsdp-style-guide

Mandatory for all UI/UX design, implementation, review, audit, or visual regression tasks. Always use for any work that affects user-facing appearance, behavior, accessibility, branding, layout, navigation, forms, dialogs, alerts, tables, or visual design.

设计师
★ 0
japurcell
japurcell/skills

agency-priorities

Provide self-contained USDA strategic goals and Forest Service priorities for agency briefings, proposals, and work-plan alignment. Use when explaining agency direction or evaluating how a project contributes to USDA and Forest Service priorities.

★ 0
japurcell
japurcell/skills

accomplishment-report

Create a concise Forest Service executive accomplishment report when all work in an ExecPlan is completed, or update its existing report. Use at ExecPlan closeout and when asked to report completed work, agency alignment, and estimated AI-assisted versus human-only time and cost savings.

行政与办公人员
★ 0
japurcell
japurcell/skills

writing-for-agents

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

内容创作者写作与文案
★ 0