windows-path-troubleshooting
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.
What this skill does
## ๐จ CRITICAL GUIDELINES ### Windows File Path Requirements **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:** - โ WRONG: `D:/repos/project/file.tsx` - โ CORRECT: `D:\repos\project\file.tsx` This applies to: - Edit tool file_path parameter - Write tool file_path parameter - All file operations on Windows systems ### Documentation Guidelines **NEVER create new documentation files unless explicitly requested by the user.** - **Priority**: Update existing README.md files rather than creating new documentation - **Repository cleanliness**: Keep repository root clean - only README.md unless user requests otherwise - **Style**: Documentation should be concise, direct, and professional - avoid AI-generated tone - **User preference**: Only create additional .md files when user specifically asks for documentation --- # Windows Path Troubleshooting for Claude Code ## ๐จ CRITICAL: Always Use Backslashes on Windows for File Paths **MANDATORY: When using Edit, Write, or Read tools on Windows, you MUST use backslashes (`\`) in file paths, NOT forward slashes (`/`).** ### The Rule **Windows File Path Requirements:** - โ **CORRECT**: `D:\repos\project\file.tsx` - โ **WRONG**: `D:/repos/project/file.tsx` **This applies to:** - Edit tool `file_path` parameter - Write tool `file_path` parameter - Read tool `file_path` parameter - All file operations on Windows systems ### Why This Matters **Common error message when using forward slashes on Windows:** ```text Error: ENOENT: no such file or directory ``` **Root cause:** - Windows native file system uses backslashes (`\`) as path separators - Forward slashes (`/`) work in some Windows contexts but NOT in Claude Code file tools - Git Bash displays paths with forward slashes but Windows APIs require backslashes - Claude Code's Read/Write/Edit tools use Windows native APIs that expect backslashes ## ๐ Common Windows Path Issues in Claude Code ### Issue 1: Forward Slashes in Tool Calls **Symptom:** ```text Edit tool fails with "file not found" or "no such file or directory" ``` **Cause:** Using forward slashes copied from Git Bash output: ```bash # Git Bash shows: /s/repos/claude-plugin-marketplace/file.tsx ``` **Incorrect usage:** ```text Edit(file_path="/s/repos/myproject/file.tsx") ``` **Correct usage:** ```text Edit(file_path="S:\repos\myproject\file.tsx") ``` **Solution steps:** 1. Identify the Windows drive letter (e.g., `/s/` โ `S:`) 2. Replace forward slashes with backslashes 3. Add drive letter with colon 4. Use absolute Windows path format ### Issue 2: Git Bash MINGW Path Format **Symptom:** Paths like `/s/repos/` or `/c/Users/` don't work in Edit/Write/Read tools **MINGW path format explained:** - Git Bash uses POSIX-style paths on Windows - Drive letters are represented as `/c/`, `/d/`, `/s/`, etc. - These are MINGW virtual paths, not Windows paths - Claude Code tools need Windows-native paths **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:** 1. Extract drive letter from first path segment (e.g., `/s/` โ `S`) 2. Add colon to drive letter (e.g., `S` โ `S:`) 3. Replace remaining forward slashes with backslashes 4. Combine: `S:` + `\repos\project\file.tsx` ### Issue 3: Relative Paths in Git Bash **Symptom:** 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:** ```bash # 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:** 1. Get the full Windows path from Git Bash: ```bash pwd -W # Shows: S:/repos/my-project (Windows format with forward slashes) ``` 2. Convert to proper Windows path: `S:\repos\my-project` 3. Append relative path with backslashes: `S:\repos\my-project\src\components\Button.tsx` ### Issue 4: Environment Variable Expansion **Symptom:** Paths with environment variables like `$HOME` or `%USERPROFILE%` fail **Git Bash environment variables:** ```bash echo $HOME # Shows: /c/Users/username (MINGW format) ``` **Windows environment variables:** ```cmd echo %USERPROFILE% # Shows: C:\Users\username (Windows format) ``` **Best practice:** - Avoid environment variables in file paths for Claude Code tools - Use absolute Windows paths instead - If user provides `$HOME`, ask them to run `echo $HOME` and convert the result ### Issue 5: Spaces in File Paths **Symptom:** Paths with spaces break or cause "file not found" errors **Correct handling:** ```text โ CORRECT: Edit(file_path="C:\Program Files\My App\config.json") โ CORRECT: Edit(file_path="D:\My Documents\project\file.txt") ``` **Notes:** - Do NOT add quotes around the path in the parameter - The tool call itself handles escaping - Spaces are fine in Windows paths when using backslashes ### Issue 6: UNC Network Paths **Symptom:** Network paths like `\\server\share\file.txt` fail **Windows UNC format:** ```text \\server\share\folder\file.txt ``` **Git Bash representation:** ```text //server/share/folder/file.txt ``` **Correct usage in Claude Code:** ```text 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. ## ๐ง Path Detection and Conversion Algorithm When a user provides a file path, follow this decision tree: ### Step 1: Identify Path Format **MINGW Path (Git Bash):** - Starts with `/` followed by single letter and `/` (e.g., `/c/`, `/s/`) - Example: `/s/repos/project/file.tsx` - **Action:** Convert to Windows format **Windows Path:** - Starts with drive letter and colon (e.g., `C:`, `D:`) - Uses backslashes or forward slashes - Example: `S:\repos\project\file.tsx` or `S:/repos/project/file.tsx` - **Action:** Ensure backslashes are used **Relative Path:** - Starts with `./` or `../` or just filename - Example: `./src/components/Button.tsx` - **Action:** Request full path from user or detect current directory **UNC Path:** - Starts with `\\` or `//` - Example: `\\server\share\file.txt` - **Action:** Ensure backslashes are used ### Step 2: Conversion Process **For MINGW paths (`/x/...`):** ```text 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:/...`):** ```text 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:** ```text 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 ``` ## ๐ ๏ธ Interactive Path Fixing Workflow When you encounter a file path error on Windows: ### Step 1: Detect the Error **Error indicators:** - "ENOENT: no such file or directory" - "file not found" - Edit/Write/Read tool failure - User mentions "Windows" or "Git Bash" ### Step 2: Analyze the Path **Ask yourself:** 1. Was the path provided by t
Related in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product โ visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".