with one click
windows-compatibility
Cross-platform path handling and command patterns
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Cross-platform path handling and command patterns
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
{what this skill teaches agents}
{what this skill teaches agents}
{what this skill teaches agents}
{what this skill teaches agents}
Checklist and patterns for wiring new CLI commands into cli-entry.ts
Team initialization flow (Phase 1 proposal + Phase 2 creation)
| name | windows-compatibility |
| description | Cross-platform path handling and command patterns |
| domain | platform |
| confidence | high |
| source | earned (multiple Windows-specific bugs: colons in filenames, git -C failures, path separators) |
Squad runs on Windows, macOS, and Linux. Several bugs have been traced to platform-specific assumptions: ISO timestamps with colons (illegal on Windows), git -C with Windows paths (unreliable), forward-slash paths in Node.js on Windows.
2026-03-15T05:30:00Z is illegal on WindowssafeTimestamp() utility: Replaces colons with hyphens → 2026-03-15T05-30-00Z.toISOString().replace(/:/g, '-') — use the utilitygit -C {path}: Unreliable with Windows paths (backslashes, spaces, drive letters)cd first: Change directory, then run git commandsgit diff --cached --quiet (exit 0 = no changes)-m flag: Backtick-n (\n) fails silently in PowerShell-F flag: Write message to file, commit with git commit -F $msgFileTEAM ROOT from spawn prompt or run git rev-parse --show-toplevel/ or \✓ Correct:
// Timestamp utility
const safeTimestamp = () => new Date().toISOString().replace(/:/g, '-').split('.')[0] + 'Z';
// Git workflow (PowerShell)
cd $teamRoot
# ⚠️ NEVER use `git add .squad/` or broad globs — only stage files you intentionally changed
# Stage only files you actually modified — use git status to build explicit list
$filesToStage = git status --porcelain | Where-Object { $_.Length -gt 3 } | ForEach-Object { $_.Substring(3) -replace '^.* -> ','' } | Where-Object {
$_ -eq '.squad/decisions.md' -or
$_ -eq '.squad/decisions-archive.md' -or
$_ -like '.squad/agents/*/history.md' -or
$_ -like '.squad/agents/*/history-archive.md' -or
$_ -like '.squad/log/*' -or
$_ -like '.squad/orchestration-log/*'
}
if ($filesToStage) { $filesToStage | Where-Object { $_ } | ForEach-Object { git add -- $_ } }
git diff --cached --quiet
if ($LASTEXITCODE -ne 0) {
$msg = @"
docs(ai-team): session log
Changes:
- Added decisions
"@
$msgFile = [System.IO.Path]::GetTempFileName()
Set-Content -Path $msgFile -Value $msg -Encoding utf8
git commit -F $msgFile
Remove-Item $msgFile
}
✗ Incorrect:
// Colon in filename
const logPath = `.squad/log/${new Date().toISOString()}.md`; // ILLEGAL on Windows
// git -C with Windows path
exec('git -C C:\\src\\squad add .squad/'); // UNRELIABLE
// Inline newlines in commit message
exec('git commit -m "First line\nSecond line"'); // FAILS silently in PowerShell
git -C because it "looks cleaner" (it doesn't work)git diff --cached --quiet check (creates empty commits)