Windows Compatibility logo

Windows Compatibility

CommunityPopular
bradygaster
windows-compatibility

Cross-platform path handling and command patterns

Overview

Publisherbradygaster
Repositorysquad
Skill namewindows-compatibility
Stars
3.3K
Forks
506
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by bradygaster on GitHub. Read the source before you install it.

Installation

Install the Windows Compatibility AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/bradygaster/squad/tree/dev/packages/squad-cli/templates/skills/windows-compatibility
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bradygaster/squad.git /tmp/squad
mkdir -p .claude/skills
cp -r /tmp/squad/packages/squad-cli/templates/skills/windows-compatibility .claude/skills/windows-compatibility
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Windows Compatibility in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Windows Compatibility on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Windows Compatibility is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Context

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.

Patterns

Filenames & Timestamps

  • Never use colons in filenames: ISO 8601 format 2026-03-15T05:30:00Z is illegal on Windows
  • Use safeTimestamp() utility: Replaces colons with hyphens → 2026-03-15T05-30-00Z
  • Centralize formatting: Don't inline .toISOString().replace(/:/g, '-') — use the utility

Git Commands

  • Never use git -C {path}: Unreliable with Windows paths (backslashes, spaces, drive letters)
  • Always cd first: Change directory, then run git commands
  • Check for changes before commit: git diff --cached --quiet (exit 0 = no changes)

Commit Messages

  • Never embed newlines in -m flag: Backtick-n (\n) fails silently in PowerShell
  • Use temp file + -F flag: Write message to file, commit with git commit -F $msgFile

Paths

  • Never assume CWD is repo root: Always use TEAM ROOT from spawn prompt or run git rev-parse --show-toplevel
  • Use path.join() or path.resolve(): Don't manually concatenate with / or \

Path Comparison (Case Sensitivity)

  • Never use naive prefix checks to confine paths: a bare substring/prefix match can let sibling paths escape the intended root
  • Never infer case-insensitive behavior from process.platform alone: Windows is case-insensitive, but Darwin volumes are not all case-insensitive. APFS and HFS+ can be case-sensitive; a blanket lowercase conversion on macOS can conflate distinct sibling directories.
  • Use filesystem-aware case handling: Only fold case when the relevant volume has been explicitly identified as case-insensitive. Otherwise, compare the resolved path case-sensitively.
  • Current implementation caveat: This is the safe target pattern, not a claim about every existing repository implementation. FSStorageProvider currently folds case for all Darwin paths, so its root confinement is not volume-aware on case-sensitive macOS filesystems.
  • Resolve first, compare second: resolve both paths before comparing; do not compare user input or unresolved relative segments.
  • Root confinement must be exact-match-or-separator: a path is within rootDir only when it equals the normalized root exactly or starts with rootDir + path.sep; a bare substring/prefix match lets /root-escape slip past /root. Filesystem roots are valid roots and must remain exact-match-or-separator checks.
  • Where it matters: security checks such as path-traversal prevention, rootDir confinement, and any validation that a resolved path stays under an allowed directory
  • Pattern:
    typescript
    import path from 'node:path';
    
    function normalizeForRootComparison(value: string, volumeIsCaseInsensitive = false): string {
      return volumeIsCaseInsensitive ? value.toLowerCase() : value;
    }
    
    function isPathWithin(candidate: string, rootDir: string, volumeIsCaseInsensitive = false): boolean {
      const a = normalizeForRootComparison(path.resolve(candidate), volumeIsCaseInsensitive);
      const b = normalizeForRootComparison(path.resolve(rootDir), volumeIsCaseInsensitive);
      const boundary = b.replace(/[\\/]+$/, '') + path.sep;
      return a === b || a.startsWith(boundary);
    }
  • Resolve first, compare second: compare normalized absolute paths; only treat a case mismatch as equivalent when the relevant filesystem volume has already been confirmed to be case-insensitive

Repairing Stale LF-Pinned Working Trees

An eol=lf attribute affects checkout behavior; it does not repair files that were already materialized with CRLF. For the known shebang failure mode, use the repository's scripts/fix-crlf-worktree.mjs rather than a broad renormalization:

  1. Identify LF-pinned files that are CRLF on disk.
  2. Exclude files with a real content difference from the index.
  3. Rewrite only content-clean paths from the index with git checkout-index -f.
  4. Re-measure the complete repair set and report repaired, skipped, and remaining paths.

This is a local repair, not a source rewrite. Do not use git add --renormalize .; it rewrites the index and creates unrelated line-ending churn. Do not force-checkout a locally modified file.

Examples

✓ Correct:

powershell
# Timestamp utility
$safeTimestamp = (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH-mm-ssZ')

# 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'
}
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:

javascript
// 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

Anti-Patterns

  • Testing only on one platform (bugs ship to other platforms)
  • Assuming Unix-style paths work everywhere
  • Using git -C because it "looks cleaner" (it doesn't work)
  • Skipping git diff --cached --quiet check (creates empty commits)
  • Assuming all Darwin filesystems are case-insensitive for root-confinement checks

Frequently asked questions

What does the Windows Compatibility AI skill do?

Cross-platform path handling and command patterns

Why use Windows Compatibility on TypingMind?

Because you install it once and use it with any model. Windows Compatibility is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Windows Compatibility in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/bradygaster/squad/tree/dev/packages/squad-cli/templates/skills/windows-compatibility. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Windows Compatibility?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Windows Compatibility?

As many as you like. As long as a model supports skills, you can use Windows Compatibility with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Windows Compatibility AI skill free?

Yes. It is published on GitHub by bradygaster under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇