Cross Platform Scripting

Detect the host OS (Windows/macOS/Linux) and PowerShell version (5.1 Desktop vs 7+ Core) before writing or editing scripts, and write/adapt .ps1, .sh, and .cmd scripts to match what's actually available — avoiding PS7-only syntax on PS5.1, GNU-only flags on macOS/BSD tools, and Windows-only assumptions on POSIX shells. Use before writing a new script, when a script fails with a syntax/parameter error that looks version- or OS-specific, or when asked to make a script cross-platform.

sergeyitaly Updated

File contents

sergeyitaly/claude-skill-deployer/tree/main/skills_library/cross-platform-scripting commit e22f73f997

Frequently asked questions

npx skillmds@latest add sergeyitaly/cross-platform-scripting