Use this skill to handle Windows software installation requests through package managers instead of manual download flows whenever possible.
winget.choco.winget first for mainstream desktop apps available from the Microsoft ecosystem.choco when winget is unavailable, broken, missing the package, or when the package is commonly better supported in Chocolatey.winget -> guide the user to install or repair App Installer / winget availability.choco -> install Chocolatey.Extract the product name and normalize it to the likely package-manager search term.
Examples:
Visual Studio Code / vscodeWeChat7zip / 7-ZipWhen the user provides a vague app name, prefer a best-effort search-and-install approach instead of asking unnecessary follow-up questions.
Use this order of reasoning:
winget or choco? If yes, prefer package-manager installation.Before giving install commands, reason through these checks in order:
winget available?choco available?Use simple verification commands when helpful:
$PSVersionTable.PSVersion
Get-Command winget -ErrorAction SilentlyContinue
Get-Command choco -ErrorAction SilentlyContinue
Default command patterns:
winget install
winget search <name>
winget install --id <exact.id> --accept-source-agreements --accept-package-agreements
choco install
choco search <name>
choco install <package-name> -y
Do not invent package IDs. If uncertain, tell the user to run the search command first and then provide the exact install command pattern.
Keep the output action-oriented:
Useful verification examples:
winget list --id <exact.id>
choco list --local-only
where.exe <binary-name>
Treat winget as a built-in-or-repairable Windows capability rather than a mirror-based package manager.
Use this approach:
winget exists.```powershell
Get-Command winget -ErrorAction SilentlyContinue
```
```powershell
winget source reset --force
winget source update
winget --info
```
winget typically comes from App Installer on supported Windows versions.```powershell
winget --version
winget source list
```
Do not claim that winget supports a standard Tsinghua mirror switch like Chocolatey. It usually does not.
When Chocolatey is missing, provide the standard elevated PowerShell installation flow and then configure the Tsinghua mirror.
Installation command pattern:
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Then configure the Tsinghua mirror:
choco source disable -n chocolatey
choco source add -n tsinghua -s "https://mirrors.tuna.tsinghua.edu.cn/chocolatey/"
choco source list
If source replacement is not accepted by the local Chocolatey version or policy, explain that the default community source may remain enabled and clearly state the actual final source status.
When the user says things like "安装 Windows 包管理环境" or "安装 choco、winget", follow this sequence:
winget exists.choco exists.Recommended verification block:
winget --version
winget source list
choco --version
choco source list
Use this response structure by default, adapting as needed:
State whether the request should use winget, choco, both, or neither.
Provide the exact commands in a minimal sequence.
Provide one or more commands the user can run to confirm success.
Always end with one of these styles:
环境安装成功:winget 与 Chocolatey 已可用,Chocolatey 已配置清华源。软件安装成功:已通过 完成安装。 环境部分完成:;. 安装失败:. winget or choco unless the current conversation already established it.共 1 个版本