Skip to main content

writing-portable-python

Use when writing or reviewing ANY Python that could run on an operating system other than the one you are on — harness scripts, skill scripts, hooks, installers, CLIs. Covers the failures that are invisible on the machine that wrote them, in the order they actually bite - platform-exclusive imports that fail at IMPORT and take down every caller, text I/O and console output that die on a cp1252 Windows console, path rendering for a TARGET os rather than the host, os.replace and file-locking semantics that differ on Windows, the missing exec bit, absent system binaries (jq/host/dig), and subprocess spawn cost that inverts the bash-is-lighter intuition. Enforced by `_meta/portability_lint.py`; this skill is the reasoning, the lint is the regression guard. Trigger on - writing a script, cross-platform, Windows, macOS, portability, "works on my machine", UnicodeEncodeError, ModuleNotFoundError fcntl, cp1252, charmap codec, file locking, atomic write, shebang.

Informations de source

Dépôt
joogy06/agent-foundry
Dernière activité de la source
31 juillet 2026 à 11:15
Langue détectée de SKILL.md
anglais
Étoiles
4
Forks
0

Options d'installation

Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.

Vérifiez les fichiers source

Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.

Affichage de SKILL.md

SKILL.md
Instructions source · Aperçu en lecture seule
namewriting-portable-python
descriptionUse when writing or reviewing ANY Python that could run on an operating system other than the one you are on — harness scripts, skill scripts, hooks, installers, CLIs. Covers the failures that are invisible on the machine that wrote them, in the order they actually bite - platform-exclusive imports that fail at IMPORT and take down every caller, text I/O and console output that die on a cp1252 Windows console, path rendering for a TARGET os rather than the host, os.replace and file-locking semantics that differ on Windows, the missing exec bit, absent system binaries (jq/host/dig), and subprocess spawn cost that inverts the bash-is-lighter intuition. Enforced by `_meta/portability_lint.py`; this skill is the reasoning, the lint is the regression guard. Trigger on - writing a script, cross-platform, Windows, macOS, portability, "works on my machine", UnicodeEncodeError, ModuleNotFoundError fcntl, cp1252, charmap codec, file locking, atomic write, shebang.