windows-path-rename
Sanitize Git paths that are invalid on Windows (for example :, ", |, ?, * and trailing dot/space) and commit safe renames. Use when clone or checkout on Windows fails with "error: invalid path".
Best use case
windows-path-rename is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sanitize Git paths that are invalid on Windows (for example :, ", |, ?, * and trailing dot/space) and commit safe renames. Use when clone or checkout on Windows fails with "error: invalid path".
Teams using windows-path-rename should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/windows-path-rename/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How windows-path-rename Compares
| Feature / Agent | windows-path-rename | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sanitize Git paths that are invalid on Windows (for example :, ", |, ?, * and trailing dot/space) and commit safe renames. Use when clone or checkout on Windows fails with "error: invalid path".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Windows Path Rename Use this skill when a repository contains file or directory names that cannot be created on Windows and Git reports `error: invalid path`. ## When To Use - Clone or checkout fails on Windows due to invalid paths. - Team needs a permanent rename commit so Windows users can work normally. - You need a deterministic old->new mapping, with collision handling. ## Workflow 1. Ensure a clean branch for rename work. 2. Run the bundled script in preview mode to generate a mapping. 3. Review mapping and conflict suffixes. 4. Apply renames (prefer Linux/WSL working tree mode). 5. Commit with a clear message and push. ## Recommended Execution Modes - Preferred: run in WSL/Linux where old invalid names are materialized; script uses `git mv`. - Fallback (Windows-only, no invalid files materialized): generate mapping and apply via index plumbing in a controlled branch. ## Commands Preview only: ```bash python .github/skills/windows-path-rename/scripts/sanitize_windows_paths.py --mode preview ``` Apply with `git mv`: ```bash python .github/skills/windows-path-rename/scripts/sanitize_windows_paths.py --mode apply ``` Write mapping to a file: ```bash python .github/skills/windows-path-rename/scripts/sanitize_windows_paths.py --mode preview --output .tmp/windows-path-map.tsv ``` ## Rename Rules - `:` -> ` -` - `"` -> `` (remove) - `|` -> `_` - `?` -> `` (remove) - `*` -> `_` - `<` -> `(` - `>` -> `)` - Remove trailing dots/spaces from each path segment - Avoid Windows reserved names (`CON`, `PRN`, `AUX`, `NUL`, `COM1..COM9`, `LPT1..LPT9`) by appending `_` - Preserve file extension when possible - Resolve collisions by appending ` (n)` before extension ## Guardrails - Do not rename `.git` internals. - Do not run apply mode on a dirty working tree. - Commit only path renames in the rename commit. - After commit, verify no invalid paths remain with a preview run.
Related Skills
vscode
VS Code integration for viewing diffs and comparing files. Use when showing file differences to the user.
skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
browser-tools
Interactive browser automation via Chrome DevTools Protocol. Use when you need to interact with web pages, test frontends, or when user interaction with a visible browser is required.
click-path-audit
Trace every user-facing button/touchpoint through its full state change sequence to find bugs where functions individually work but cancel each other out, produce wrong final state, or leave the UI in an inconsistent state. Use when: systematic debugging found no bugs but users report broken buttons, or after any major refactor touching shared state stores.
file-path-traversal
Identify and exploit file path traversal (directory traversal) vulnerabilities that allow attackers to read arbitrary files on the server, potentially including sensitive configuration files, credentials, and source code.
busybox-on-windows
How to use a Win32 build of BusyBox to run many of the standard UNIX command line tools on Windows.
windows-shell-reliability
Reliable command execution on Windows: paths, encoding, and common binary pitfalls.
windows-privilege-escalation
Provide systematic methodologies for discovering and exploiting privilege escalation vulnerabilities on Windows systems during penetration testing engagements.
powershell-windows
PowerShell Windows patterns. Critical pitfalls, operator syntax, error handling.
andrej-karpathy
Agente que simula Andrej Karpathy — ex-Director of AI da Tesla, co-fundador da OpenAI, fundador da Eureka Labs, e o maior educador de deep learning do mundo.
busybox-on-windows
How to use a Win32 build of BusyBox to run many of the standard UNIX command line tools on Windows.