[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6WZSBKKYWVMMR5W8ZEWF3CP":3,"skill-same:01M6WZSBKKYWVMMR5W8ZEWF3CP":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":48,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M6WZSBKKYWVMMR5W8ZEWF3CP","test-on-vm",null,"EXPERIMENTAL. Run locally built WinUI interaction tests on a Hyper-V VM through PowerShell Direct. Use when asked to run WinUI tests on a local VM.","microsoft\u002Fmicrosoft-ui-xaml","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M6WZRE552HV7ZQFPSHT97PZA",8604,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-xaml\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftest-on-vm\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36],"test","vm","test on vm","run","winui","powershell","direct","use","local","tests","interaction","when","hyper","2026-11-10 10:12:30",false,"---\nname: test-on-vm\ndescription: EXPERIMENTAL. Run locally built WinUI interaction tests on a Hyper-V VM through PowerShell Direct. Use when asked to run WinUI tests on a local VM.\n---\n\n# Run WinUI Tests on a Hyper-V VM\n\nRun `tools\\run-tests-on-vm.ps1` through `initrun.ps1`. It refreshes the local\ntest payload, deploys it to the VM, performs required machine setup, and runs\ntests on the VM's interactive desktop.\n\nThis skill and script are experimental and may not be stable.\n\n## Before You Run\n\nBuild the repository first. Follow the **build** skill:\n\n```powershell\n.\\initrun.ps1 .\\build.cmd \u002Fq\n```\n\nAlso verify:\n\n- The VM is running with an unlocked desktop and a logged-in user.\n- The caller is a local admin or a member of **Hyper-V Administrators**.\n- The command uses `initial_wait` of at least **180 seconds**.\n\nIf Hyper-V permissions are missing, **stop and ask the user to make the change\nthemselves. Never run `Add-LocalGroupMember` or open an elevated shell on their\nbehalf, even with their approval.**\n\nTell the user to run `whoami` in their original, non-elevated PowerShell window\nand copy the account name. Then have them open a **separate PowerShell (`pwsh`)\nwindow using Run as administrator** and run this command, replacing\n`\u003Caccount-from-whoami>` with the copied name:\n\n```powershell\nAdd-LocalGroupMember -Group 'Hyper-V Administrators' -Member '\u003Caccount-from-whoami>'\n```\n\nTell the user to sign out and back in afterward. Wait for them to confirm they\nhave completed these steps before retrying the test.\n\nThe first run prompts for VM credentials in a separate window and caches them\nencrypted under `~\\.winui-test`. Use `-ResetCredential` to replace them.\n\n## Run Tests\n\n```powershell\n# Run a specific test\n.\\initrun.ps1 .\\tools\\run-tests-on-vm.ps1 -VMName \u003Cvm> \u003Ctestname>\n\n# Wildcard match\n.\\initrun.ps1 .\\tools\\run-tests-on-vm.ps1 -VMName \u003Cvm> *CommandBar*\n\n# Force full copy instead of incremental\n.\\initrun.ps1 .\\tools\\run-tests-on-vm.ps1 -VMName \u003Cvm> -FullCopy \u003Ctestname>\n\n# Stop a stuck test run\n.\\initrun.ps1 .\\tools\\run-tests-on-vm.ps1 -VMName \u003Cvm> -Stop\n```\n\n## Payload Rules\n\nBy default, the script runs `test\\CreateTestPayload.ps1` to refresh\n`TestPayload\\\u003Cflavor>` from the current build outputs, then deploys changed\nfiles incrementally.\n\n- `-FullCopy` still refreshes the local payload, then copies all of it to the VM.\n- **Use `-SkipPayload` rarely.** It deploys the existing local payload without\n  refreshing it. Use it only when that payload is known to be current or when\n  intentionally testing stale binaries. Never use it merely to save time.\n\n## Useful Options\n\n| Option | Purpose |\n|--------|---------|\n| `-Platform` | `x86`, `x64`, or `arm64`; uses `$env:BUILDPLATFORM`, then defaults to `x64` |\n| `-Configuration` | `chk` or `fre`; uses `$env:_BuildType`, then defaults to `chk` |\n| `-FullCopy` | Copy the full refreshed payload instead of only changes |\n| `-SkipPayload` | Rare: deploy the existing payload without refreshing it |\n| `-SkipPrerun` | Skip `testmachine-prerun.cmd` |\n| `-ForcePrerun` | Run `testmachine-prerun.cmd` again |\n| `-Credential` | Supply a `PSCredential` instead of using the prompt\u002Fcache |\n| `-ResetCredential` | Clear the cached credential for this VM |\n| `-Stop` | Stop the active test and clean up |\n\n## Troubleshooting\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| `Could not launch app`, foreground-window errors, or an empty UIA tree | VM desktop is locked or not visible | Keep the VM desktop unlocked and active |\n| `Failed to connect to VM` | VM not running or wrong credentials | Start the VM; use `-ResetCredential` to re-enter credentials |\n| Permission error | Need Hyper-V Administrators membership | Stop and have the user follow the permission steps above |\n| Incomplete payload or prerun failure | Stale payload or partial deployment | Omit `-SkipPayload`; retry with `-FullCopy` if needed |\n\n## Crash Dumps\n\nThe first prerun configures full crash dumps under `C:\\dumps` on the VM, with\nup to three dumps per process. Pull one back through PowerShell Direct:\n\n```powershell\n$vmName = \"\u003Cvm>\"\n$credentialKey = $vmName -replace '[^a-zA-Z0-9]', '_'\n$cred = Import-Clixml \"~\\.winui-test\\vmcred-$credentialKey.xml\"\n$destination = Join-Path $env:TEMP \"WinUIDumps\"\nNew-Item -ItemType Directory -Path $destination -Force | Out-Null\n\n$session = New-PSSession -VMName $vmName -Credential $cred\ntry {\n    Invoke-Command -Session $session { Get-ChildItem C:\\dumps\\*.dmp }\n    Copy-Item -FromSession $session -Path \"C:\\dumps\\\u003Cdump>.dmp\" -Destination $destination\n}\nfinally {\n    Remove-PSSession $session\n}\n```\n\nAlways access \".winui-test\\\" via \"~\\.winui-test\", without changing the \"~\\\" to some other form.\n\n\nFor a quick local analysis:\n\n```powershell\ncdb -z \"$env:TEMP\\WinUIDumps\\\u003Cdump>.dmp\" -c \"!analyze -v; ~*k; q\"\n```\n","# Run WinUI Tests on a Hyper-V VM\n\nRun `tools\\run-tests-on-vm.ps1` through `initrun.ps1`. It refreshes the local\ntest payload, deploys it to the VM, performs required machine setup, and runs\ntests on the VM's interactive desktop.\n\nThis skill and script are experimental and may not be stable.\n\n## Before You Run\n\nBuild the repository first. Follow the **build** skill:\n\n```powershell\n.\\initrun.ps1 .\\build.cmd \u002Fq\n```\n\nAlso verify:\n\n- The VM is running with an unlocked desktop and a logged-in user.\n- The caller is a local admin or a member of **Hyper-V Administrators**.\n- The command uses `initial_wait` of at least **180 seconds**.\n\nIf Hyper-V permissions are missing, **stop and ask the user to make the change\nthemselves. Never run `Add-LocalGroupMember` or open an elevated shell on their\nbehalf, even with their approval.**\n\nTell the user to run `whoami` in their original, non-elevated PowerShell window\nand copy the account name. Then have them open a **separate PowerShell (`pwsh`)\nwindow using Run as administrator** and run this command, replacing\n`\u003Caccount-from-whoami>` with the copied name:\n\n```powershell\nAdd-LocalGroupMember -Group 'Hyper-V Administrators' -Member '\u003Caccount-from-whoami>'\n```\n\nTell the user to sign out and back in afterward. Wait for them to confirm they\nhave completed these steps before retrying the test.\n\nThe first run prompts for VM credentials in a separate window and caches them\nencrypted under `~\\.winui-test`. Use `-ResetCredential` to replace them.\n\n## Run Tests\n\n```powershell\n# Run a specific test\n.\\initrun.ps1 .\\tools\\run-tests-on-vm.ps1 -VMName \u003Cvm> \u003Ctestname>\n\n# Wildcard match\n.\\initrun.ps1 .\\tools\\run-tests-on-vm.ps1 -VMName \u003Cvm> *CommandBar*\n\n# Force full copy instead of incremental\n.\\initrun.ps1 .\\tools\\run-tests-on-vm.ps1 -VMName \u003Cvm> -FullCopy \u003Ctestname>\n\n# Stop a stuck test run\n.\\initrun.ps1 .\\tools\\run-tests-on-vm.ps1 -VMName \u003Cvm> -Stop\n```\n\n## Payload Rules\n\nBy default, the script runs `test\\CreateTestPayload.ps1` to refresh\n`TestPayload\\\u003Cflavor>` from the current build outputs, then deploys changed\nfiles incrementally.\n\n- `-FullCopy` still refreshes the local payload, then copies all of it to the VM.\n- **Use `-SkipPayload` rarely.** It deploys the existing local payload without\n  refreshing it. Use it only when that payload is known to be current or when\n  intentionally testing stale binaries. Never use it merely to save time.\n\n## Useful Options\n\n| Option | Purpose |\n|--------|---------|\n| `-Platform` | `x86`, `x64`, or `arm64`; uses `$env:BUILDPLATFORM`, then defaults to `x64` |\n| `-Configuration` | `chk` or `fre`; uses `$env:_BuildType`, then defaults to `chk` |\n| `-FullCopy` | Copy the full refreshed payload instead of only changes |\n| `-SkipPayload` | Rare: deploy the existing payload without refreshing it |\n| `-SkipPrerun` | Skip `testmachine-prerun.cmd` |\n| `-ForcePrerun` | Run `testmachine-prerun.cmd` again |\n| `-Credential` | Supply a `PSCredential` instead of using the prompt\u002Fcache |\n| `-ResetCredential` | Clear the cached credential for this VM |\n| `-Stop` | Stop the active test and clean up |\n\n## Troubleshooting\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| `Could not launch app`, foreground-window errors, or an empty UIA tree | VM desktop is locked or not visible | Keep the VM desktop unlocked and active |\n| `Failed to connect to VM` | VM not running or wrong credentials | Start the VM; use `-ResetCredential` to re-enter credentials |\n| Permission error | Need Hyper-V Administrators membership | Stop and have the user follow the permission steps above |\n| Incomplete payload or prerun failure | Stale payload or partial deployment | Omit `-SkipPayload`; retry with `-FullCopy` if needed |\n\n## Crash Dumps\n\nThe first prerun configures full crash dumps under `C:\\dumps` on the VM, with\nup to three dumps per process. Pull one back through PowerShell Direct:\n\n```powershell\n$vmName = \"\u003Cvm>\"\n$credentialKey = $vmName -replace '[^a-zA-Z0-9]', '_'\n$cred = Import-Clixml \"~\\.winui-test\\vmcred-$credentialKey.xml\"\n$destination = Join-Path $env:TEMP \"WinUIDumps\"\nNew-Item -ItemType Directory -Path $destination -Force | Out-Null\n\n$session = New-PSSession -VMName $vmName -Credential $cred\ntry {\n    Invoke-Command -Session $session { Get-ChildItem C:\\dumps\\*.dmp }\n    Copy-Item -FromSession $session -Path \"C:\\dumps\\\u003Cdump>.dmp\" -Destination $destination\n}\nfinally {\n    Remove-PSSession $session\n}\n```\n\nAlways access \".winui-test\\\" via \"~\\.winui-test\", without changing the \"~\\\" to some other form.\n\n\nFor a quick local analysis:\n\n```powershell\ncdb -z \"$env:TEMP\\WinUIDumps\\\u003Cdump>.dmp\" -c \"!analyze -v; ~*k; q\"\n```\n",{"name":5,"description":7},"main","74c2cab127943565ca2a278cc8f64f472209dd14",".github\u002Fskills\u002Ftest-on-vm",965,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-xaml","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 21:05:35",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add microsoft\u002Fmicrosoft-ui-xaml --skill test-on-vm",{"tool":57,"command":58},"bunx","bunx skills add microsoft\u002Fmicrosoft-ui-xaml --skill test-on-vm",{"tool":60,"command":61},"pnpm","pnpm dlx skills add microsoft\u002Fmicrosoft-ui-xaml --skill test-on-vm","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-xaml\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftest-on-vm\u002FSKILL.md",true,[],[66,74,101,125,150],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":73},"01M7B9P8EXVVVKPMVJXWAFFF28","analyze-session","Opens a WinUI Profiler session file (.sqlite) and answers questions about a WinUI 3 app's performance from it with the winui-profiler tools: how the launch went, UI-thread ticks and slow ticks, regions of interest (navigations, flyouts and dialogs opening, focus changes), and the UI elements and composition visuals the events mention. Use it when someone asks why a WinUI app is slow to start or draws slowly, what a tick did, what happened around a navigation or to an element, or what a session holds, and for \u002Fwinui-profiler:analyze-session [session.sqlite | folder].","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-xaml\u002Fblob\u002Fmain\u002Ftools\u002FWinUIProfiler\u002Fskills\u002Fanalyze-session\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":84,"publishedAt":37},"01M6WZSNKGE3MCZSF9DQXZYYS9","test-suite-setup","Complete end-to-end setup and execution of the WinUI3 test suite locally. Delegates building to the build skill, then handles test payload creation, machine setup, and running all tests.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-xaml\u002Fblob\u002Fmain\u002Fsrc\u002F.github\u002Fskills\u002Ftest-suite-setup\u002FSKILL.md",[80,81],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":82,"categoryName":83,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[85,24,86,87,88,89,90,33,91,92,93,94,95,96,97,98,99,100],"setup","suite","test suite","test suite setup","winui3","machine setup","delegates","build","build skill","creation","end","payload","running","complete","machine","execution",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":37},"01M6WZSH72TCPB5XBFYGAV8PXP","bt-build","Fast incremental C++\u002FMSBuild builds using bt. Use when the user wants to compile, build, check what's dirty, or query build dependencies in a repo that has .vcxproj files. Prefer bt over invoking MSBuild directly for inner-loop source changes (.cpp, .h, .idl, .xaml, .appxmanifest).","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-xaml\u002Fblob\u002Fmain\u002Fsrc\u002F.github\u002Fskills\u002Fbt-build\u002FSKILL.md",[],[108,92,109,110,111,112,113,114,115,35,116,117,31,118,119,120,121,122,123,124],"bt","bt build","check","shell","msbuild","changes","repo","query","cpp","loop","files","compile","inner","xaml","c++","inner-loop","for",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":139,"publishedAt":37},"01M6WZS8FC8VE4M3V4W8N299Z8","code-review","Review changes in microsoft\u002Fmicrosoft-ui-xaml. Use when reviewing code or pull requests in this repository.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-xaml\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fcode-review\u002FSKILL.md",[131,134],{"categoryNo":132,"categoryName":133,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":135,"categoryName":136,"taxonomyType":137,"taxonomyTypeDesc":138},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[140,141,142,35,143,121,31,144,145,113,146,147,9,148,149],"review","code","code review","pull","reviewing code","pull requests","requests","review changes","repository","ui",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":158,"publishedAt":37},"01M6WZS15NPKE3ER8TS8ARD8A7","code-coverage-calculation","EXPERIMENTAL. Calculate code coverage of a WinUI control or component (for example \"calculate coverage of control TitleBar\") by running only that component's tests on a local Hyper-V VM against the local build. Supports controls in Microsoft.UI.Xaml.Controls.dll and Microsoft.UI.Xaml.Controls.Tabular.dll, and dxaml types in Microsoft.ui.xaml.dll. Reports per-file and per-function line coverage that matches the ADO Code Coverage tab. Use for \"calculate\u002Fmeasure\u002Fget coverage of \u003Ccontrol>\", \"how much do \u003Ccontrol>'s tests cover\", or \"coverage before\u002Fafter my tests\" when you have a local build and a VM.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-xaml\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fcode-coverage-calculation\u002FSKILL.md",[156,157],{"categoryNo":82,"categoryName":83,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":135,"categoryName":136,"taxonomyType":137,"taxonomyTypeDesc":138},[141,159,160,161,162,121,163,164,165,166,167,168,149,169,35,170,171,32,172,173],"code coverage","calculation","code coverage calculation","coverage","component","how","line","cover","my","calculate","you","only","reports","get","types"]