ワンクリックで
windows-shell-reliability
Reliable command execution on Windows: paths, encoding, and common binary pitfalls.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Reliable command execution on Windows: paths, encoding, and common binary pitfalls.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
This skill should be used for advanced LLM evaluation: LLM-as-judge systems, direct scoring, pairwise comparison, rubric calibration, evaluator bias mitigation, confidence scoring, and automated quality assessment.
Automated end-to-end UI testing and verification on an Android Emulator using ADB.
This skill should be used when modeling agent mental states with BDI concepts: beliefs, desires, intentions, RDF-to-belief transformations, rational agency traces, cognitive agents, BDI ontologies, and neuro-symbolic AI integration.
Build a premium cinematic landing page with mouse-scrub video hero and brand-driven narrative-arc sections. Use whenever the user provides a hero video plus a product / subject / brand and wants a landing page, promo site, product showcase, marketing page, or storytelling site. Works for any language and any subject. The signature effect is mouse-driven video scrubbing — the hero video lives across the entire page as a fixed backdrop, and moving the mouse left-right scrubs the video timeline so the subject responds to the cursor. Below the hero, 4-5 fully-opaque sections each carry their own brand identity (color, typography emphasis, layout pattern) and walk the viewer through a narrative arc (e.g. longing -> joy -> nostalgia -> contemplation -> action). Do NOT use for parallax frame-scrub landings where the page itself doesn't scroll (use parallax-landing-page instead) or for video editing / captioning workflows (use video-edit).
Convert frontend code (Vite, React, etc.) to a Stitch Design by chaining static HTML extraction, design system extraction, and file upload. **ALWAYS** use this skill when the user's intent is to move existing web apps or React components into Stitch (e.g., requests to "save", "migrate", or "upload"). You must use this skill even for simple "save" operations, as it is the only way to ensure the design system is extracted and assets are properly linked.
This skill should be used for diagnosing and mitigating context degradation: lost-in-middle failures, context poisoning, context clash, context confusion, attention-pattern issues, and agent performance degradation caused by accumulated or conflicting context.
| name | windows-shell-reliability |
| description | Reliable command execution on Windows: paths, encoding, and common binary pitfalls. |
| risk | safe |
| source | community |
| date_added | 2026-03-19 |
Best practices for running commands on Windows via PowerShell and CMD.
Use this skill when developing or debugging scripts and automation that run on Windows systems, especially when involving file paths, character encoding, or standard CLI tools.
Older Windows PowerShell releases can rewrite native-command output in ways that break later processing. PowerShell 7.4+ preserves the byte stream when redirecting stdout, so only apply the UTF-8 conversion workaround when you are dealing with older shell behavior or a log file that is already unreadable.
| Problem | Symptom | Solution |
|---|---|---|
dotnet > log.txt | view_file fails in older Windows PowerShell | `Get-Content log.txt |
npm run > log.txt | Need a UTF-8 text log with errors included | `npm run ... 2>&1 |
Rule: Prefer native redirection as-is on PowerShell 7.4+, and use explicit UTF-8 conversion only when older Windows PowerShell redirection produces an unreadable log.
Windows paths often contain spaces.
| ❌ Wrong | ✅ Correct |
|---|---|
dotnet build src/my project/file.fsproj | dotnet build "src/my project/file.fsproj" |
& C:\Path With Spaces\bin.exe | & "C:\Path With Spaces\bin.exe" |
Rule: Always quote absolute and relative paths that may contain spaces.
In PowerShell, if an executable path starts with a quote, you MUST use the & operator.
Pattern:
& "C:\Program Files\dotnet\dotnet.exe" build ...
| Action | ❌ CMD Style | ✅ PowerShell Choice |
|---|---|---|
| Delete | del /f /q file | Remove-Item -Force file |
| Copy | copy a b | Copy-Item a b |
| Move | move a b | Move-Item a b |
| Make Dir | mkdir folder | New-Item -ItemType Directory -Path folder |
Tip: Using CLI aliases like ls, cat, and cp in PowerShell is usually fine, but using full cmdlets in scripts is more robust.
| Context | Command | Why |
|---|---|---|
| Fast Iteration | dotnet build --no-restore | Skips redundant nuget restore. |
| Clean Build | dotnet build --no-incremental | Ensures no stale artifacts. |
| Background | Start-Process dotnet -ArgumentList 'run' -RedirectStandardOutput output.txt -RedirectStandardError error.txt | Launches the app without blocking the shell and keeps logs. |
| Shell | Syntax |
|---|---|
| PowerShell | $env:VARIABLE_NAME |
| CMD | %VARIABLE_NAME% |
Windows has a 260-character path limit by default.
Fix: If you hit long path errors, use the extended path prefix:
\\?\C:\Very\Long\Path\...
| Error | Likely Cause | Fix |
|---|---|---|
The term 'xxx' is not recognized | Path not in $env:PATH | Use absolute path or fix PATH. |
Access to the path is denied | File in use or permissions | Stop process or run as Admin. |
Encoding mismatch | Older shell redirection rewrote the output | Re-export the file as UTF-8 or capture with `2>&1 |