powershell

Installation
SKILL.md

PowerShell Development Skill

Conventions and safety patterns for PowerShell scripts in scripts/ and CI.

Style and Linting

  • Scripts in Build/Agent/, and anything else reached from build.ps1 or test.ps1, must run under both Windows PowerShell 5.1 and PowerShell 7. CI executes the build and test steps under 5.1, so 6+-only syntax that parses cleanly on 7 can still fail or silently misbehave there: the backtick u{} escape resolves to literal text under 5.1 instead of a code point, and -Encoding utf8BOM/utf8NoBOM throw a parameter-binding error. Run Build/Agent/powershell-compat.ps1 to check, and prefer syntax both engines share over anything PowerShell Core adds.
  • Use Set-StrictMode -Version Latest.
  • Use Write-Host sparingly; prefer Write-Output and Write-Error for correct streams.
  • Use -ErrorAction Stop in helper functions when errors should abort execution.
  • No Unicode icons or emojis in output messages (e.g., ✓, ✗, ⚠, 🔧). Use plain ASCII text like [OK], [FAIL], [WARN], ERROR: instead. Unicode causes encoding issues in CI logs.

Traps that produce a wrong answer instead of an error

Installs
22
GitHub Stars
111
First Seen
Mar 1, 2026
powershell — sillsdev/fieldworks