windows-shell
仓库创建 2026年7月28日最近提交 1 天前SkillHot 收录 1 天前
▸ 精选理由
减少命令执行失败与语法差异导致的问题。
这个 Skill 做什么
指导代理在 Windows 上正确选择与执行 shell 命令与脚本。
在 Windows 上正确选择和执行 shell:默认优先用 PowerShell 7(pwsh)处理自动化、JSON 和流水线,只有缺 pwsh 才回退到 Windows PowerShell 或 cmd。写脚本、连命令、处理编码、退出码或在 Git Bash/WSL 环境切换时参考这套规则,能避免常见的一行命令跑不通或语法不兼容的问题。
▸ 展开 SKILL.md 英文原文
Run shell commands correctly on Windows for coding agents. Use when executing terminal commands, writing scripts, choosing pwsh vs cmd vs bash, fixing failed shell invocations, or when the OS is Windows. Covers PowerShell 7, Windows PowerShell 5.1, cmd.exe, Git Bash pitfalls, chaining, exit codes, and encoding.
1
Stars
0
Forks
7
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/javeckbila/windows-agent-skills/master/skills/windows-shell/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/javeckbila/windows-agent-skills/master/skills/windows-shell/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Windows shell for coding agents ## Default shell choice | Prefer | When | |--------|------| | **PowerShell 7+ (`pwsh`)** | Default for automation, scripts, JSON, pipelines | | **Windows PowerShell 5.1 (`powershell`)** | Only if `pwsh` is missing; note syntax gaps | | **cmd.exe** | Legacy build tools that require it; keep one-liners short | | **Git Bash / WSL bash** | Only when the project docs require Unix tools, or user is in WSL | **Do not assume bash.** On Windows agent sandboxes, `&&`, `export`, `rm -rf`, and POSIX paths often fail or behave differently. ## Invocation patterns ### Detect environment (run once per session) ```powershell $PSVersionTable.PSVersion [System.Environmen
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有