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…
Об этом скилле
🚨 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_pathparameter - Write tool
file_pathparameter - Read tool
file_pathparameter - All file operations on Windows systems
Why This Matters
Common error message when using forward slashes on Windows:
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:
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:
- Identify the Windows drive letter (e.g.,
/s/→S:) - Replace forward slashes with backslashes
- Add drive letter with colon
- 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:
- Extract drive letter from first path segment (e.g.,
/s/→S) - Add colon to drive letter (e.g.,
S→S:) - Replace remaining forward slashes with backslashes
- 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:
# 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:
- Get the full Windows path from Git Bash:
pwd -W # Shows: S:/repos/my-project (Windows format with forward slashes) - Convert to proper Windows path:
S:\repos\my-project - 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:
echo $HOME
# Shows: /c/Users/username (MINGW format)
Windows environment variables:
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 runecho $HOMEand convert the result
Issue 5: Spaces in File Paths
Symptom: Paths with spaces break or cause "file not found" errors
Correct handling: `
Установить windows-path-troubleshooting в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл 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.
Как установить скилл windows-path-troubleshooting?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл windows-path-troubleshooting запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic