Skip to content

Add WinUI 3 Expert#865

Merged
aaronpowell merged 9 commits intogithub:stagedfrom
niels9001:niels9001/winui-expert
Mar 3, 2026
Merged

Add WinUI 3 Expert#865
aaronpowell merged 9 commits intogithub:stagedfrom
niels9001:niels9001/winui-expert

Conversation

@niels9001
Copy link
Contributor

@niels9001 niels9001 commented Mar 3, 2026

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • My contribution adds a new instruction, prompt, agent, skill, or workflow file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, or workflow with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.

Description

Adds a comprehensive WinUI 3 / Windows App SDK development toolkit — an agent, instruction set, skill, and plugin — to help developers build high-quality desktop Windows apps with correct, modern APIs.

The problem: AI coding assistants frequently generate incorrect WinUI 3 code by using legacy UWP APIs that dominate training data. The top risks are ContentDialog without XamlRoot, MessageDialog instead of ContentDialog, and CoreDispatcher instead of DispatcherQueue, among many others.

What's included:

  • agents/winui3-expert.agent.md — Expert agent covering UWP to WinUI 3 API migration rules, Fluent Design UX best practices, MVVM patterns, windowing, threading, app lifecycle, dialogs/pickers, control selection guide, error handling, NuGet ecosystem (CommunityToolkit, WinUIEx), resource management, and deployment.
  • instructions/winui3.instructions.md — Instruction set applied to XAML, C#, and csproj files with 14 NEVER use rules for legacy UWP APIs, plus typography, theming, spacing, materials, motion, control selection, error handling, and localization rules.
  • skills/winui3-migration-guide/SKILL.md — Migration-focused skill with UWP to WinUI 3 namespace mapping table, top 3 Copilot mistakes with before/after code snippets, and a 14-step migration checklist.
  • plugins/winui3-development/ — Installable plugin bundling the agent and skill for easy discovery and installation.

Sources: WinUI Gallery copilot instructions, Windows App SDK migration guides, and documented common Copilot code generation pitfalls.


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

niels9001 and others added 6 commits March 3, 2026 17:30
- Expanded Testing section in agent with Unit Test App project setup,
  [TestMethod] vs [UITestMethod] attributes, and code examples
- Added Testing rules to instructions file
- Added Testing Migration section to migration guide skill with
  UWP-to-WinUI 3 test project mapping and updated checklist

Reference: https://learn.microsoft.com/en-us/windows/apps/winui/winui3/testing/create-winui-unit-test-project

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@niels9001 niels9001 marked this pull request as ready for review March 3, 2026 19:27
@niels9001 niels9001 requested a review from aaronpowell as a code owner March 3, 2026 19:27
Copilot AI review requested due to automatic review settings March 3, 2026 19:27
@niels9001 niels9001 changed the base branch from main to staged March 3, 2026 19:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a WinUI 3 / Windows App SDK “expert” toolkit to the repository to help steer Copilot away from legacy UWP APIs and toward correct WinUI 3 desktop patterns.

Changes:

  • Added a WinUI 3 expert agent plus a migration-focused skill.
  • Added WinUI 3 coding instructions (apply to XAML/C#/csproj).
  • Added an installable winui3-development plugin, and registered the new assets across docs + marketplace.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
skills/winui3-migration-guide/SKILL.md New migration guide skill with common pitfalls, mappings, and a checklist.
instructions/winui3.instructions.md New instruction set to enforce WinUI 3 patterns across XAML/C#/csproj.
agents/winui3-expert.agent.md New “WinUI 3 Expert” agent with guidance on APIs, UX, MVVM, windowing, threading, etc.
plugins/winui3-development/.github/plugin/plugin.json New plugin manifest bundling the agent + skill.
plugins/winui3-development/README.md New plugin README documenting installation and included items.
docs/README.skills.md Adds the new skill to the skills index table.
docs/README.instructions.md Adds the new instructions file to the instructions index table.
docs/README.agents.md Adds the new agent to the agents index table.
docs/README.plugins.md Adds the new plugin to the plugins index table.
.github/plugin/marketplace.json Registers the new plugin in the marketplace listing.

aaronpowell
aaronpowell previously approved these changes Mar 3, 2026
@aaronpowell aaronpowell enabled auto-merge (squash) March 3, 2026 22:54
@aaronpowell
Copy link
Contributor

Just got a small merge conflict @niels9001 - just need to run the update script after merging staged in.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
auto-merge was automatically disabled March 3, 2026 23:00

Head branch was pushed to by a user without write access

niels9001 and others added 2 commits March 4, 2026 00:01
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@aaronpowell aaronpowell enabled auto-merge (squash) March 3, 2026 23:04
@aaronpowell aaronpowell merged commit dcc2ee1 into github:staged Mar 3, 2026
4 checks passed
@niels9001 niels9001 deleted the niels9001/winui-expert branch March 3, 2026 23:06
@aaronpowell
Copy link
Contributor

#codeowner

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

CODEOWNERS Update Required

The #codeowner command was triggered, and the following CODEOWNERS entries should be added for @niels9001 based on the files contributed in this PR:

# Added via #codeowner from PR #865
+/agents/winui3-expert.agent.md `@niels9001`
+/instructions/winui3.instructions.md `@niels9001`
+/plugins/winui3-development/ `@niels9001`
+/skills/winui3-migration-guide/ `@niels9001`

Summary of Changes

The following ownership entries have been identified:

  • Agent: /agents/winui3-expert.agent.md@niels9001
  • Instruction: /instructions/winui3.instructions.md@niels9001
  • Plugin: /plugins/winui3-development/@niels9001
  • Skill: /skills/winui3-migration-guide/@niels9001

Note: I was unable to automatically create a PR with these changes due to authentication limitations in the workflow environment. A maintainer will need to manually apply these updates to the CODEOWNERS file on the staged branch.

Generated by Codeowner Update Agent for issue #865

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

CODEOWNERS Update Status

I've successfully prepared the CODEOWNERS updates for this PR, but encountered a technical limitation when attempting to create the pull request automatically.

Prepared Changes

The following CODEOWNERS entries have been created on branch update-codeowners-865:

  • /agents/winui3-expert.agent.md@niels9001
  • /instructions/winui3.instructions.md@niels9001
  • /plugins/winui3-development/@niels9001
  • /skills/winui3-migration-guide/@niels9001

Manual Steps Required

To complete this process, a maintainer with repository write access needs to:

  1. Push the update-codeowners-865 branch to the repository
  2. Create a PR from update-codeowners-865staged

Alternatively, the changes can be reviewed locally:

git fetch origin
git checkout -b update-codeowners-865
git cherry-pick a6d093d

Technical Note

The safeoutputs-create_pull_request tool returned "No changes to commit - no commits found" despite valid commits existing on the branch. This may indicate a configuration issue with the workflow's safe-outputs integration or repository permissions.

Generated by Codeowner Update Agent for issue #865

@aaronpowell
Copy link
Contributor

#codeowner

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

I attempted to update the CODEOWNERS file for this PR, but encountered a technical issue with the PR creation tool.

The following entries should be added to the CODEOWNERS file:

# Added via #codeowner from PR #865
/agents/winui3-expert.agent.md `@niels9001`
/instructions/winui3.instructions.md `@niels9001`
/plugins/winui3-development/ `@niels9001`
/skills/winui3-migration-guide/ `@niels9001`

The changes have been prepared on branch codeowner/pr-865 but the automated PR creation failed. A maintainer may need to manually create the PR or investigate the issue with the create_pull_request safe-output tool.

Generated by Codeowner Update Agent for issue #865

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

I attempted to update the CODEOWNERS file for this PR, but encountered a technical issue with the PR creation tool.

The following entries should be added to the CODEOWNERS file:

# Added via #codeowner from PR #865
/agents/winui3-expert.agent.md `@niels9001`
/instructions/winui3.instructions.md `@niels9001`
/plugins/winui3-development/ `@niels9001`
/skills/winui3-migration-guide/ `@niels9001`

The changes have been prepared on branch codeowner/pr-865 but the automated PR creation failed. A maintainer may need to manually create the PR or investigate the issue with the create_pull_request safe-output tool.

Generated by Codeowner Update Agent for issue #865

@aaronpowell
Copy link
Contributor

#codeowner

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

✅ CODEOWNERS has been updated! A pull request has been created to assign ownership of the WinUI 3 related files to @niels9001.

The following entries have been added:

  • /agents/winui3-expert.agent.md
  • /instructions/winui3.instructions.md
  • /plugins/winui3-development/
  • /skills/winui3-migration-guide/

Generated by Codeowner Update Agent for issue #865

github-actions bot pushed a commit that referenced this pull request Mar 4, 2026
Assigns ownership of WinUI 3 related files to @niels9001:
- agents/winui3-expert.agent.md
- instructions/winui3.instructions.md
- plugins/winui3-development/
- skills/winui3-migration-guide/

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants