windows-paths
仓库创建 2026年7月28日最近提交 1 天前SkillHot 收录 1 天前
▸ 精选理由
帮助代理避免路径错误与跨平台转换问题。
这个 Skill 做什么
为 AI 代理提供在 Windows 下正确处理文件路径的规则与示例。
给开发和自动化脚本处理 Windows 路径的实用规则:什么时候用反斜杠、何时能用 /、磁盘盘符、UNC 路径、MAX_PATH 限制和 NTFS 的不区分大小写等细节。用在创建文件、修复路径错误、在 PowerShell、WSL 或跨平台代码里转换路径时,能避免常见的路径报错。它把那些容易踩的坑(空格、长路径、驱动器差异、git 大小写问题)都整理成可直接用的建议和示例。
▸ 展开 SKILL.md 英文原文
Handle Windows file paths correctly in code, shells, and configs. Use when creating files, resolving paths, fixing path errors, dealing with spaces, drive letters, UNC, long paths, path separators, MAX_PATH, case-insensitivity, or converting between Windows and POSIX/WSL paths.
1
Stars
0
Forks
7
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/javeckbila/windows-agent-skills/master/skills/windows-paths/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/javeckbila/windows-agent-skills/master/skills/windows-paths/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Windows paths for coding agents ## Ground rules 1. **Windows paths are usually case-insensitive** (default NTFS). Do not rename `Util.cs` ↔ `util.cs` casually — git can break. 2. **Separator:** `\` is native; `/` often works in modern tools and .NET — still prefer `\` in PowerShell examples and raw Win32 contexts. 3. **Drive letters:** `C:\...` absolute. Relative paths are fine inside repos. 4. **Spaces are common** (`Program Files`, user profile names). Always quote. ## PowerShell path APIs (prefer these) ```powershell Join-Path $root 'src' 'lib' # PS 6+ multi child Join-Path $root (Join-Path 'src' 'lib') # PS 5.1 Split-Path $path -Parent Split-Path $path -Leaf Resolve-Path
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有