windows-compatibility

Enforce Windows-safe filenames, timestamps, Git invocation, and path handling in cross-platform scripts.

2|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/elbruno/md-to-slides --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/md-to-slides/tree/main/.copilot/skills/windows-compatibility
Command: npx skills add https://github.com/elbruno/md-to-slides --skill windows-compatibility-elbruno

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents common Windows-specific failures in automation and build workflows caused by invalid filenames, unsafe timestamps, brittle Git command patterns, and incorrect path handling.

Core Features & Use Cases

  • Safe filenames and timestamps: Avoids illegal colons in ISO timestamps by using a safe timestamp formatting pattern suitable for Windows filesystems.
  • Robust Git execution on Windows: Recommends changing directories first instead of using git -C with Windows paths, and includes a guard to avoid creating empty commits.
  • Correct PowerShell-friendly commit messages: Prevents silent newline issues by writing commit messages to a temp file and using -F in git commit.
  • Path correctness across OSes: Ensures tooling uses resolved repo root paths and path.join/path.resolve rather than manual string concatenation.

Quick Start

Update your workflow to use safeTimestamp for any filename timestamps, run Git by cd into the repository first (not git -C), and generate PowerShell-safe commit messages via a temp file with git commit -F.

Frequently Asked Questions about windows-compatibility

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

FAQPage Schema
Why does my cross-platform Git automation fail on Windows with invalid filenames?

Git automation fails on Windows because ISO timestamps containing colons generate invalid filenames. You can prevent this by applying safe timestamp formatting that avoids colons for Windows filesystem compatibility.

What is the best way to run Git commands reliably in PowerShell scripts?

The best way to run Git reliably in PowerShell is to change directories first instead of using git -C with Windows paths. You should also write commit messages to a temp file and use git commit -F to prevent silent newline issues.

How do I handle path resolution correctly for cross-platform scripts on Windows, macOS, and Linux?

To handle paths correctly across Windows, macOS, and Linux, use resolved repo root paths and path.join or path.resolve functions. This ensures correct path handling across operating systems rather than relying on manual string concatenation.

Does using git -C cause reliability issues in cross-platform GitHub Actions workflows?

Yes, using git -C can cause reliability issues in cross-platform workflows on Windows. It is recommended to discover the repo root and change directories first before running Git operations to avoid brittle command patterns.

How do I prevent silent newline issues when passing commit messages in PowerShell?

To prevent silent newline issues with commit messages in PowerShell, write the commit message to a temporary file. Then, execute git commit -F to pass the file path, ensuring PowerShell compatibility and correct message formatting.

How to avoid creating empty Git commits in automated AI-assisted workflows?

To avoid creating empty Git commits in automated workflows, include a guard check before executing the commit command. This prevents the workflow from failing when no actual changes are detected in the repository.