From 54de587d26137367695be9ab3a652f19f47959f4 Mon Sep 17 00:00:00 2001 From: Zhanyuanium Date: Fri, 14 Aug 2026 03:29:28 +0800 Subject: [PATCH] Add OpenCode support for WinUI skills Document how OpenCode users consume the shared winui-* skills by linking plugins/winui/skills/ into an OpenCode skills directory. Make winui-setup's post-setup guidance harness-neutral while keeping the GitHub Copilot CLI example. No skills are forked or copied and no existing harness manifests, agents, or parsers change. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- CHANGELOG.md | 7 ++++++ README.md | 28 +++++++++++++++++++++++ plugins/winui/skills/winui-setup/SKILL.md | 14 ++++++++---- 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80273093..adbb501a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,8 +23,15 @@ The `version-bump` and `changelog-entry` CI jobs enforce this. ### Added +- `winui-*` skills can now be discovered by **OpenCode** by linking the shared + `plugins/winui/skills/` directory into an OpenCode skills directory - no skill + fork or copy required. + ### Changed +- `winui-setup` now gives harness-neutral post-setup guidance while preserving the + GitHub Copilot CLI invocation example. + ### Fixed ### Removed diff --git a/README.md b/README.md index e3224128..c2480a02 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,34 @@ Verify the eight skills loaded with `openclaw skills list` (each shows `✓ read > **Note:** OpenClaw maps skills, not agents, so the `winui-dev` orchestrator agent isn't exposed there. The skills still work - ask the agent for a WinUI task and it loads the relevant skill on demand. +
+OpenCode + +OpenCode loads Agent Skills natively from `/SKILL.md` folders. Point it at the +shared skills - no fork or copy needed. Link each skill into OpenCode's global skills +directory (or a project's `.opencode/skills/`): + +```powershell +# One-time setup: link the shared skills into OpenCode's global skills directory +$src = "C:\path\to\win-dev-skills\plugins\winui\skills" +$dst = "$env:USERPROFILE\.config\opencode\skills" +New-Item -ItemType Directory -Force $dst | Out-Null +Get-ChildItem $src -Directory | ForEach-Object { + $link = Join-Path $dst $_.Name + if (-not (Test-Path $link)) { + New-Item -ItemType Junction -Path $link -Target $_.FullName | Out-Null + } +} +``` + +Because these are junctions (not copies), `git pull` in the repo picks up upstream +skill updates automatically. + +> **Note:** OpenCode maps skills, not agents, so the `winui-dev` orchestrator agent +> isn't exposed there. The skills still work - invoke them by name (e.g. `/winui-setup`, +> `/winui-design`) and OpenCode loads them on demand. +
+ Then start a new session and run the `winui-setup` skill with `/winui-setup`. Once setup is done, try a real task: diff --git a/plugins/winui/skills/winui-setup/SKILL.md b/plugins/winui/skills/winui-setup/SKILL.md index 327f8081..8516f035 100644 --- a/plugins/winui/skills/winui-setup/SKILL.md +++ b/plugins/winui/skills/winui-setup/SKILL.md @@ -130,15 +130,21 @@ After everything, print a single-table summary so the user knows exactly what ch WinApp CLI ✅ upgraded to 0.4.0 (or ✅ installed, ⏭ already at latest, ❌ failed) WinUI 3 templates ✅ updated to latest Developer Mode ✅ enabled (or ⏭ skipped — user declined, or ❌ failed: ) - -You're ready. Try: - copilot --agent winui:winui-dev -p "build me a WinUI 3 markdown editor" ``` +You're ready. If the current harness exposes the `winui-dev` orchestrator agent, +start a fresh session with that agent and ask it to build a WinUI app. Otherwise, +start a fresh session in the current harness and ask it to perform the WinUI task; +it will load the relevant `winui-*` skills on demand. + +For GitHub Copilot CLI, for example: + + copilot --agent winui:winui-dev -p "build me a WinUI 3 markdown editor" + ### Things to NOT do - ❌ **Do not install Visual Studio.** It is not required — these skills build and run with the dotnet and winapp clis. -- ❌ **Do not install GitHub Copilot CLI.** If this skill is running, it's already installed. +- ❌ **Do not install or upgrade the user's AI coding harness** as part of this skill. `winui-setup` manages Windows/WinUI development prerequisites only. - ❌ **Do not elevate the entire session** — only step 5 needs admin. Elevating earlier steps would install winget packages into the admin user's profile instead of the user's, which is wrong. - ❌ **Do not skip the PATH refresh** — agents that skip it install the SDK and then immediately fail on `dotnet new install`. - ❌ **Do not trigger UAC for Developer Mode without asking the user first** — the prompt is jarring if it pops up unannounced. Always confirm before elevating.