plugins/windows-path-master/skills/windows-path-troubleshooting/SKILL.md
Complete Windows file path troubleshooting knowledge for Claude Code on Git Bash and Windows environments. PROACTIVELY activate for: (1) file path errors on Windows, (2) backslash vs forward slash issues, (3) Edit/Write/Read tool failures, (4) MINGW path resolution, (5) cross-platform path conversion, (6) MSYS_NO_PATHCONV usage, (7) double-slash escape patterns (//c/foo), (8) UNC and long path limits, (9) WSL vs native Windows interop. Provides: path-conversion rules, troubleshooting flowchart, MSYS env-var recipes, double-slash escape patterns, and Windows file-operation best practices.
npx skillsauth add JosiahSiegel/claude-plugin-marketplace windows-path-troubleshootingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
MANDATORY: Always Use Backslashes on Windows for File Paths
When using Edit or Write tools on Windows, you MUST use backslashes (\) in file paths, NOT forward slashes (/).
Examples:
D:/repos/project/file.tsxD:\repos\project\file.tsxThis applies to:
NEVER create new documentation files unless explicitly requested by the user.
MANDATORY: When using Edit, Write, or Read tools on Windows, you MUST use backslashes (\) in file paths, NOT forward slashes (/).
Windows File Path Requirements:
D:\repos\project\file.tsxD:/repos/project/file.tsxThis applies to:
file_path parameterfile_path parameterfile_path parameterCommon error message when using forward slashes on Windows:
Error: ENOENT: no such file or directory
Root cause:
\) as path separators/) work in some Windows contexts but NOT in Claude Code file toolsSymptom:
Edit tool fails with "file not found" or "no such file or directory"
Cause: Using forward slashes copied from Git Bash output:
# Git Bash shows:
/s/repos/claude-plugin-marketplace/file.tsx
Incorrect usage:
Edit(file_path="/s/repos/myproject/file.tsx")
Correct usage:
Edit(file_path="S:\repos\myproject\file.tsx")
Solution steps:
/s/ → S:)Symptom:
Paths like /s/repos/ or /c/Users/ don't work in Edit/Write/Read tools
MINGW path format explained:
/c/, /d/, /s/, etc.Conversion table:
| Git Bash (MINGW) | Windows Native |
|------------------|----------------|
| /c/Users/name/ | C:\Users\name\ |
| /d/repos/project/ | D:\repos\project\ |
| /s/work/code/ | S:\work\code\ |
| /mnt/c/Windows/ | C:\Windows\ |
Conversion algorithm:
/s/ → S)S → S:)S: + \repos\project\file.tsxSymptom: Relative paths from Git Bash don't resolve correctly in Claude Code tools
Cause: Git Bash current working directory uses MINGW format, but Claude Code tools use Windows format
Example scenario:
# In Git Bash:
pwd
# Shows: /s/repos/my-project
# User provides relative path:
./src/components/Button.tsx
Problem:
Claude Code can't resolve ./src/ from MINGW /s/repos/my-project
Solution:
pwd -W
# Shows: S:/repos/my-project (Windows format with forward slashes)
S:\repos\my-projectS:\repos\my-project\src\components\Button.tsxSymptom:
Paths with environment variables like $HOME or %USERPROFILE% fail
Git Bash environment variables:
echo $HOME
# Shows: /c/Users/username (MINGW format)
Windows environment variables:
echo %USERPROFILE%
# Shows: C:\Users\username (Windows format)
Best practice:
$HOME, ask them to run echo $HOME and convert the resultSymptom: Paths with spaces break or cause "file not found" errors
Correct handling:
✅ CORRECT: Edit(file_path="C:\Program Files\My App\config.json")
✅ CORRECT: Edit(file_path="D:\My Documents\project\file.txt")
Notes:
Symptom:
Network paths like \\server\share\file.txt fail
Windows UNC format:
\\server\share\folder\file.txt
Git Bash representation:
//server/share/folder/file.txt
Correct usage in Claude Code:
Edit(file_path="\\\\server\\share\\folder\\file.txt")
Note: Backslashes must be doubled in some contexts due to escaping, but Claude Code tools handle this automatically.
When a user provides a file path, follow this decision tree:
MINGW Path (Git Bash):
/ followed by single letter and / (e.g., /c/, /s/)/s/repos/project/file.tsxWindows Path:
C:, D:)S:\repos\project\file.tsx or S:/repos/project/file.tsxRelative Path:
./ or ../ or just filename./src/components/Button.tsxUNC Path:
\\ or //\\server\share\file.txtFor MINGW paths (/x/...):
Input: /s/repos/myproject/src/components/Button.tsx
Process:
1. Extract drive letter: "s"
2. Uppercase: "S"
3. Add colon: "S:"
4. Replace remaining slashes: \repos\myproject\src\components\Button.tsx
5. Combine: S:\repos\myproject\src\components\Button.tsx
Output: S:\repos\myproject\src\components\Button.tsx
For Windows paths with forward slashes (X:/...):
Input: S:/repos/project/file.tsx
Process:
1. Detect drive letter already present: "S:"
2. Replace forward slashes with backslashes: \repos\project\file.tsx
3. Combine: S:\repos\project\file.tsx
Output: S:\repos\project\file.tsx
For relative paths:
Input: ./src/components/Button.tsx
Current directory (from user or detection): S:\repos\my-project
Process:
1. Remove ./ prefix
2. Replace forward slashes: src\components\Button.tsx
3. Combine with current directory: S:\repos\my-project\src\components\Button.tsx
Output: S:\repos\my-project\src\components\Button.tsx
When you encounter a file path error on Windows:
Error indicators:
Ask yourself:
If the path is ambiguous, ask:
I see you're working on Windows with Git Bash. To ensure I use the correct path format,
could you run this command and share the output?
pwd -W
This will give me the Windows-formatted path.
Conversion template:
I'll convert the path from Git Bash format to Windows format:
- Git Bash: /s/repos/project/file.tsx
- Windows: S:\repos\project\file.tsx
Retrying with the correct Windows path...
After conversion, verify the operation succeeded and explain what was fixed:
✅ Successfully edited the file using the Windows path format (S:\repos\...).
Note: On Windows with Git Bash, always use backslashes (\) in file paths for
Claude Code's Edit/Write/Read tools, even though Git Bash displays paths with
forward slashes (/).
When file operations fail on Windows:
\) used instead of forward slashes (/)?C: not /c/?/x/path to X:\path?$HOME or %USERPROFILE%?\\server\share format?| Context | Path Format | Claude Code Tool Format |
|---------|-------------|-------------------------|
| Git Bash pwd | /s/repos/project | S:\repos\project |
| Git Bash relative | ./src/file.tsx | S:\repos\project\src\file.tsx |
| Windows Explorer | S:\repos\project\file.tsx | S:\repos\project\file.tsx ✅ |
| Windows with / | S:/repos/project/file.tsx | S:\repos\project\file.tsx |
| MINGW full path | /c/Users/name/file.txt | C:\Users\name\file.txt |
| Network share (Git Bash) | //server/share/file.txt | \\server\share\file.txt |
| WSL path | /mnt/c/repos/project | C:\repos\project |
Don't wait for errors - If you see a path that looks like MINGW format, convert it immediately:
User provides: /s/repos/project/file.tsx
You think: "This is MINGW format, I need to convert it to S:\repos\project\file.tsx"
You do: Convert before calling Edit/Write/Read tool
When you need current directory on Windows:
# Instead of:
pwd # Shows: /s/repos/project (MINGW format)
# Use:
pwd -W # Shows: S:/repos/project (Windows format with /)
Then convert the forward slashes to backslashes.
Always explain when you convert paths:
I'll convert the Git Bash path to Windows format for the Edit tool:
- From: /s/repos/project/file.tsx
- To: S:\repos\project\file.tsx
This helps users understand the requirement and learn for future interactions.
Before calling Edit/Write/Read tools on Windows:
Pre-flight checklist:
✅ Path starts with drive letter and colon (e.g., C:, S:)
✅ Path uses backslashes (\) not forward slashes (/)
✅ Path is absolute, not relative
✅ No MINGW format (no /c/, /s/, etc.)
User might provide paths in various formats:
Always detect and convert as needed.
Detailed lookup tables for common Claude Code Windows path errors, platform-specific behavior (PowerShell, CMD, Git Bash, WSL, Node/Python), user-teaching scripts, and advanced path scenarios (UNC paths, long paths, spaces, special characters) live in references/error-platform-advanced.md. Load that reference when the quick conversion workflow does not explain a path failure.
You've successfully handled Windows paths when:
PROACTIVELY apply this knowledge when:
/c/, /s/, etc.This skill is CRITICAL for Windows users - Path format errors are the #1 cause of file operation failures on Windows with Git Bash.
development
Use for Clerk sessions, tokens, webhooks, orgs, and security. PROACTIVELY activate for session tokens, JWT templates, getToken(), custom claims, pending sessions, multi-session UX, organizations, roles, permissions, system vs custom permissions, features/plans, MFA/passkeys/password policy/bot protection, Clerk webhooks, Svix signatures, verifyWebhook(), user/org sync, retries/replays, environment variables, custom domains, secret rotation, logs, and auth security reviews. Provides token semantics, webhook idempotency, authorization defaults, and hardening checklist.
tools
Use for Clerk in Next.js. PROACTIVELY activate for @clerk/nextjs setup, App Router auth()/currentUser(), clerkMiddleware(), proxy.ts/middleware.ts, createRouteMatcher(), protected pages/layouts/Route Handlers/Server Actions/API routes/tRPC, auth.protect() role/permission/token checks, ClerkProvider placement, server-only clerkClient, Link prefetch, redirects, 401/404 auth failures, custom domains, __clerk proxy paths, and deployment gotchas. Provides file patterns, server/client boundary rules, matcher templates, and production checks.
development
Use for Clerk frontend auth flows. PROACTIVELY activate for React, JavaScript, Vue, Nuxt, Astro, Expo, React Router, TanStack React Start, or SPA setup; ClerkProvider and publishable-key wiring; SignIn/SignUp/UserButton/UserProfile/OrganizationSwitcher; custom useUser/useAuth/useClerk/useSignIn/useSignUp/useSession/useOrganization flows; multi-session UX; cross-origin getToken() fetches; loading states, redirects, routing, CORS/cookies, or hydration bugs. Provides SDK selection, UI patterns, token-fetch templates, and frontend gotchas.
development
Use for Clerk dev/prod readiness, deployment, and multi-language implementation planning. PROACTIVELY activate for environment variables, pk_test/sk_test vs pk_live/sk_live, local dev, preview/staging/prod instances, domains/DNS, redirects, OAuth credentials, custom domains/proxy, authorizedParties, CSP, CORS/cookies, webhooks/tunnels, Vercel/Netlify/Cloudflare/API gateways, monitoring/troubleshooting, and backends in Node/Express/Fastify, Python/FastAPI/Django/Flask, Go, Ruby/Rails, Java/Spring, .NET, PHP/Laravel. Provides checklists, rollout plans, and language-portable patterns.