Apply low-risk, deterministic PowerShell 5.1 → 7.x fixes across scripts: '-Encoding Byte' → '-AsByteStream', hardcoded 'powershell.exe' → 'pwsh', removing 'New-WebServiceProxy', bumping '#Requires -Version 5' / dropping '-PSEdition Desktop', pinning explicit '-Encoding' on file writes (the default changed to UTF-8 no-BOM in PS7), and rewriting fragile '$x -eq $null' to '$null -eq $x'.
Install
npx skills add microsoft/upgrade-agent-plugins --skill powershell-mechanical-fixupsnpx skills add microsoft/upgrade-agent-plugins --skill powershell-mechanical-fixups -a claude-code -gnpx skills add microsoft/upgrade-agent-plugins --skill powershell-mechanical-fixups -a codex -ggemini skills install https://github.com/microsoft/upgrade-agent-plugins.git --path plugins/upgrade-agent/upgrade/dotnet/skills/lazy/pwsh/powershell-mechanical-fixupsgh skill install microsoft/upgrade-agent-plugins powershell-mechanical-fixupsgit clone --depth 1 https://github.com/microsoft/upgrade-agent-plugins /tmp/microsoft__upgrade-agent-plugins
mkdir -p ~/.claude/skills ~/.agents/skills
cp -R /tmp/microsoft__upgrade-agent-plugins/plugins/upgrade-agent/upgrade/dotnet/skills/lazy/pwsh/powershell-mechanical-fixups ~/.claude/skills/powershell-mechanical-fixups # Claude Code
cp -R /tmp/microsoft__upgrade-agent-plugins/plugins/upgrade-agent/upgrade/dotnet/skills/lazy/pwsh/powershell-mechanical-fixups ~/.agents/skills/powershell-mechanical-fixups # Codex, Cursor, Gemini CLI, Copilot, OpenCode