windows-compatibility

Normalize cross-platform paths and Git commands for Windows compatibility.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/Leep-GH/Lee-s-squad --skill windows-compatibility-leep-gh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: windows-compatibility
Source: https://github.com/Leep-GH/Lee-s-squad/tree/main/.copilot/skills/windows-compatibility
Command: npx skills add https://github.com/Leep-GH/Lee-s-squad --skill windows-compatibility-leep-gh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Squad runs on Windows, macOS, and Linux. Platform-specific assumptions can cause bugs in path handling, timestamps, and Git commands (like git -C). This Skill helps ensure cross-platform compatibility by standardizing safe timestamps, avoiding file name issues, and recommending reliable Git workflows.

Core Features & Use Cases

  • Cross-platform path normalization using path.resolve() and path.join() to avoid manual concatenation.
  • Safe timestamp handling with a reusable safeTimestamp() utility to replace colons and illegal characters.
  • Git workflow guidance: cd into the repo root before commands, avoid git -C on Windows paths, and verify changes with git diff --cached --quiet.
  • Real-world use cases include scripting CI tasks, local tooling, and automation that runs on Windows, macOS, and Linux.

Quick Start

Update your codebase to replace colon-containing timestamps with safeTimestamp(), and adopt a cd-first Git workflow for Windows paths.

Frequently Asked Questions about windows-compatibility

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

FAQPage Schema
How do I handle cross-platform file paths in Node.js scripts for Windows?

To fix cross-platform path handling issues, replace manual string concatenation with path.join() and path.resolve() for path normalization. This prevents Windows path errors by automatically managing directory separators across platforms.

Why do timestamps with colons cause errors on Windows?

Timestamps containing colons cause errors on Windows because colons are illegal characters in Windows file names. You must replace them using a safeTimestamp() utility to sanitize file names for cross-platform compatibility.

How do I run Git commands safely across Windows, macOS, and Linux?

To run Git commands safely across Windows, macOS, and Linux, cd into the repository root before executing commands instead of using git -C. This avoids Windows path resolution failures and ensures reliable cross-platform Git workflows.

What is the best way to normalize paths for cross-platform shell scripting?

The best way to normalize paths for cross-platform shell scripting is using path.resolve() and path.join() utilities. This approach standardizes directory construction and avoids platform-specific assumptions in CI tasks and local automation tooling.

Does using git -C fail on Windows paths in cross-platform automation?

Yes, using git -C can fail on Windows paths due to directory resolution differences. To ensure cross-platform compatibility in automation scripts, change directory into the repo root before running Git commands rather than relying on git -C.