writing-portable-python

Installation
SKILL.md

writing-portable-python

Python the language is cross-platform. Your Python is not, and choosing Python is what makes that easy to miss.

Every Windows failure found on 2026-07-30 was in pure Python, in a codebase that had been Python-first for months and had never once been run on Windows. None was caught by any check. All of them failed open and silent — exit 0, no output, indistinguishable from success.

That is the class this skill exists to prevent. It is not a style guide.

When to use

  • Writing any script that ships in a skill, a hook, an installer, or _meta
  • Reviewing Python written on one OS that will run on another
  • Debugging "it works here" — especially an empty output with a zero exit code
  • Before porting a shell script to Python (the port is worthless if it reproduces this class)

When NOT to use

  • Application code that provably runs on one controlled OS (a container you own, a fixed server)
  • Choosing between Python and another language — that is a different question
Installs
3
GitHub Stars
6
First Seen
Sep 28, 2026