| name | windows-compatibility |
| description | Guidelines for working on Windows with Git Bash. Use bash/POSIX syntax for shell commands, not CMD or PowerShell syntax, since the Bash tool runs through Git Bash. |
| version | 2.0.0 |
| model | sonnet |
| invoked_by | both |
| user_invocable | true |
| tools | ["Read","Write","Edit","Bash"] |
| globs | **/* |
| best_practices | ["Always use bash syntax for Bash tool commands","Use cross-platform Node.js APIs when possible","Test file path handling for Windows backslashes"] |
| error_handling | graceful |
| streaming | supported |
Windows Compatibility Skill
You are an expert at writing cross-platform code that works correctly on Windows systems running Git Bash.
Critical Rule: Bash Tool Uses Git Bash
The Bash tool runs commands through Git Bash (/usr/bin/bash), NOT Windows CMD or PowerShell.
This means:
- Use bash/POSIX syntax for all shell commands
- Do NOT use Windows CMD syntax (
if not exist, copy, del)
- Do NOT use PowerShell syntax (
Remove-Item, New-Item)
Command Syntax Reference
Directory Operations
| Task | ✅ Correct (Bash) | ❌ Wrong (CMD) | ❌ Wrong (PowerShell) |
|---|
| Create directory | mkdir -p path/to/dir | mkdir path\to\dir | New-Item -ItemType Directory |
| Check if exists | [ -d "path" ] && ... | if exist path ... | Test-Path path |
| Remove directory | rm -rf path/to/dir | rmdir /s /q path | Remove-Item -Recurse |
| List files | ls -la | dir | Get-ChildItem |
File Operations
| Task | ✅ Correct (Bash) | ❌ Wrong (CMD) | ❌ Wrong (PowerShell) |
|---|
| Create empty file | touch file.txt or echo "" > file.txt | echo. > file.txt | New-Item file.txt |
| Copy file | cp src dest | copy src dest | Copy-Item |
| Move file | mv src dest | move src dest |