windows-compatibility

Enforces cross-platform path handling and git command patterns for Windows, macOS, and Linux.

2|Updated Jul 24, 2026
One-click install
npx skills add https://github.com/elbruno/ElBruno.MagenticUI --skill windows-compatibility-elbruno
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: windows-compatibility
Source: https://github.com/elbruno/ElBruno.MagenticUI/tree/main/.squad/templates/skills/windows-compatibility
Command: npx skills add https://github.com/elbruno/ElBruno.MagenticUI --skill windows-compatibility-elbruno

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Cross-platform code often breaks on Windows due to platform-specific assumptions: colons in ISO timestamps are illegal in Windows filenames, git -C fails with Windows paths, inline newlines in commit messages fail silently in PowerShell, and case-sensitive path comparisons break on case-insensitive filesystems. ## Core Features & Use Cases - Safe Filename Timestamps: Use a centralized safeTimestamp() utility that replaces colons with hyphens instead of raw ISO 8601 strings. - Reliable Git Workflows: Always cd into the repository before running git commands, write multi-line commit messages to a temp file and commit with git commit -F, and check git diff --cached --quiet before committing. - Platform-Aware Path Comparison: Lowercase both sides before comparing paths on Windows and macOS, but never on Linux where the filesystem is case-sensitive. - Use Case: When an agent generates session log files or commits changes on a Windows machine, apply these patterns to avoid illegal filenames, failed git commands, and incorrect path-traversal security checks. ## Quick Start Review my script for Windows compatibility issues and fix any unsafe timestamps, git -C usage, or case-sensitive path comparisons.

Frequently Asked Questions about windows-compatibility

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create timestamped filenames that work on Windows?▼

Windows filenames cannot contain colons, so raw ISO 8601 timestamps like 2026-03-15T05:30:00Z are illegal. Use a centralized safeTimestamp utility that replaces colons with hyphens, producing 2026-03-15T05-30-00Z.

Why does git -C fail with Windows paths?▼

The git -C flag is unreliable with Windows paths containing backslashes, spaces, or drive letters. Instead, change directory first with cd, then run git commands from within the repository root.

How do I write multi-line git commit messages in PowerShell?▼

Inline newlines in the -m flag fail silently in PowerShell. Write the message to a temporary file using Set-Content with UTF-8 encoding, then commit with git commit -F and delete the temp file afterward.

Should path comparison be case-sensitive on Windows and macOS?▼

No. Windows and macOS filesystems are case-insensitive, so lowercase both sides before comparing paths. Linux is case-sensitive, so do not lowercase there. This matters for path-traversal and rootDir confinement checks.

How do I avoid empty git commits in automation scripts?▼

Run git diff --cached --quiet before committing; an exit code of 0 means there are no staged changes. Skipping this check creates empty commits when a script runs without producing modifications.