[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M714ZS8QRMSYW4M9Y54F7W7H":3,"skill-same:01M714ZS8QRMSYW4M9Y54F7W7H":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":14,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":45,"install":46,"resources":59},"01M714ZS8QRMSYW4M9Y54F7W7H","windows-shell-reliability",null,"Reliable command execution on Windows: paths, encoding, and common binary pitfalls.","sapsapshen\u002Fai-memory-router","sapsapshen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F20347959?v=4","01M6XDQEF1DP50DKF37H81J3J5","shenmian","01M6XDQEJPE41Y3DT2763X8ZJN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcopilot\u002Fwindows-shell-reliability\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"windows","shell","reliability","windows shell reliability","windows shell","safe","encoding","execution","common","command","community","binary","paths","pitfalls","2026","2026-11-10 10:12:30",false,"---\nname: windows-shell-reliability\ndescription: \"Reliable command execution on Windows: paths, encoding, and common binary pitfalls.\"\nrisk: safe\nsource: community\ndate_added: \"2026-03-19\"\n---\n\n# Windows Shell Reliability Patterns\n\n> Best practices for running commands on Windows via PowerShell and CMD.\n\n## When to Use\nUse 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.\n\n---\n\n## 1. Encoding & Redirection\n\n### CRITICAL: Redirection Differences Across PowerShell Versions\nOlder Windows PowerShell releases can rewrite native-command output in ways that break\nlater processing. PowerShell 7.4+ preserves the byte stream when redirecting stdout,\nso only apply the UTF-8 conversion workaround when you are dealing with older shell\nbehavior or a log file that is already unreadable.\n\n| Problem | Symptom | Solution |\n|---------|---------|----------|\n| `dotnet > log.txt` | `view_file` fails in older Windows PowerShell | `Get-Content log.txt | Set-Content -Encoding utf8 log_utf8.txt` |\n| `npm run > log.txt` | Need a UTF-8 text log with errors included | `npm run ... 2>&1 | Out-File -Encoding UTF8 log.txt` |\n\n**Rule:** Prefer native redirection as-is on PowerShell 7.4+, and use explicit UTF-8\nconversion only when older Windows PowerShell redirection produces an unreadable log.\n\n---\n\n## 2. Handling Paths & Spaces\n\n### CRITICAL: Quoting\nWindows paths often contain spaces.\n\n| ❌ Wrong | ✅ Correct |\n|----------|-----------|\n| `dotnet build src\u002Fmy project\u002Ffile.fsproj` | `dotnet build \"src\u002Fmy project\u002Ffile.fsproj\"` |\n| `& C:\\Path With Spaces\\bin.exe` | `& \"C:\\Path With Spaces\\bin.exe\"` |\n\n**Rule:** Always quote absolute and relative paths that may contain spaces.\n\n### The Call Operator (&)\nIn PowerShell, if an executable path starts with a quote, you MUST use the `&` operator.\n\n**Pattern:**\n```powershell\n& \"C:\\Program Files\\dotnet\\dotnet.exe\" build ...\n```\n\n---\n\n## 3. Common Binary & Cmdlet Pitfalls\n\n| Action | ❌ CMD Style | ✅ PowerShell Choice |\n|--------|-------------|---------------------|\n| Delete | `del \u002Ff \u002Fq file` | `Remove-Item -Force file` |\n| Copy | `copy a b` | `Copy-Item a b` |\n| Move | `move a b` | `Move-Item a b` |\n| Make Dir | `mkdir folder` | `New-Item -ItemType Directory -Path folder` |\n\n**Tip:** Using CLI aliases like `ls`, `cat`, and `cp` in PowerShell is usually fine, but using full cmdlets in scripts is more robust.\n\n---\n\n## 4. Dotnet CLI Reliability\n\n### Build Speed & Consistency\n| Context | Command | Why |\n|---------|---------|-----|\n| Fast Iteration | `dotnet build --no-restore` | Skips redundant nuget restore. |\n| Clean Build | `dotnet build --no-incremental` | Ensures no stale artifacts. |\n| Background | `Start-Process dotnet -ArgumentList 'run' -RedirectStandardOutput output.txt -RedirectStandardError error.txt` | Launches the app without blocking the shell and keeps logs. |\n\n---\n\n## 5. Environment Variables\n\n| Shell | Syntax |\n|-------|--------|\n| PowerShell | `$env:VARIABLE_NAME` |\n| CMD | `%VARIABLE_NAME%` |\n\n---\n\n## 6. Long Paths\nWindows has a 260-character path limit by default.\n\n**Fix:** If you hit long path errors, use the extended path prefix:\n`\\\\?\\C:\\Very\\Long\\Path\\...`\n\n---\n\n## 7. Troubleshooting Shell Errors\n\n| Error | Likely Cause | Fix |\n|-------|-------------|-----|\n| `The term 'xxx' is not recognized` | Path not in $env:PATH | Use absolute path or fix PATH. |\n| `Access to the path is denied` | File in use or permissions | Stop process or run as Admin. |\n| `Encoding mismatch` | Older shell redirection rewrote the output | Re-export the file as UTF-8 or capture with `2>&1 | Out-File -Encoding UTF8`. |\n\n---\n","# Windows Shell Reliability Patterns\n\n> Best practices for running commands on Windows via PowerShell and CMD.\n\n## When to Use\nUse 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.\n\n---\n\n## 1. Encoding & Redirection\n\n### CRITICAL: Redirection Differences Across PowerShell Versions\nOlder Windows PowerShell releases can rewrite native-command output in ways that break\nlater processing. PowerShell 7.4+ preserves the byte stream when redirecting stdout,\nso only apply the UTF-8 conversion workaround when you are dealing with older shell\nbehavior or a log file that is already unreadable.\n\n| Problem | Symptom | Solution |\n|---------|---------|----------|\n| `dotnet > log.txt` | `view_file` fails in older Windows PowerShell | `Get-Content log.txt | Set-Content -Encoding utf8 log_utf8.txt` |\n| `npm run > log.txt` | Need a UTF-8 text log with errors included | `npm run ... 2>&1 | Out-File -Encoding UTF8 log.txt` |\n\n**Rule:** Prefer native redirection as-is on PowerShell 7.4+, and use explicit UTF-8\nconversion only when older Windows PowerShell redirection produces an unreadable log.\n\n---\n\n## 2. Handling Paths & Spaces\n\n### CRITICAL: Quoting\nWindows paths often contain spaces.\n\n| ❌ Wrong | ✅ Correct |\n|----------|-----------|\n| `dotnet build src\u002Fmy project\u002Ffile.fsproj` | `dotnet build \"src\u002Fmy project\u002Ffile.fsproj\"` |\n| `& C:\\Path With Spaces\\bin.exe` | `& \"C:\\Path With Spaces\\bin.exe\"` |\n\n**Rule:** Always quote absolute and relative paths that may contain spaces.\n\n### The Call Operator (&)\nIn PowerShell, if an executable path starts with a quote, you MUST use the `&` operator.\n\n**Pattern:**\n```powershell\n& \"C:\\Program Files\\dotnet\\dotnet.exe\" build ...\n```\n\n---\n\n## 3. Common Binary & Cmdlet Pitfalls\n\n| Action | ❌ CMD Style | ✅ PowerShell Choice |\n|--------|-------------|---------------------|\n| Delete | `del \u002Ff \u002Fq file` | `Remove-Item -Force file` |\n| Copy | `copy a b` | `Copy-Item a b` |\n| Move | `move a b` | `Move-Item a b` |\n| Make Dir | `mkdir folder` | `New-Item -ItemType Directory -Path folder` |\n\n**Tip:** Using CLI aliases like `ls`, `cat`, and `cp` in PowerShell is usually fine, but using full cmdlets in scripts is more robust.\n\n---\n\n## 4. Dotnet CLI Reliability\n\n### Build Speed & Consistency\n| Context | Command | Why |\n|---------|---------|-----|\n| Fast Iteration | `dotnet build --no-restore` | Skips redundant nuget restore. |\n| Clean Build | `dotnet build --no-incremental` | Ensures no stale artifacts. |\n| Background | `Start-Process dotnet -ArgumentList 'run' -RedirectStandardOutput output.txt -RedirectStandardError error.txt` | Launches the app without blocking the shell and keeps logs. |\n\n---\n\n## 5. Environment Variables\n\n| Shell | Syntax |\n|-------|--------|\n| PowerShell | `$env:VARIABLE_NAME` |\n| CMD | `%VARIABLE_NAME%` |\n\n---\n\n## 6. Long Paths\nWindows has a 260-character path limit by default.\n\n**Fix:** If you hit long path errors, use the extended path prefix:\n`\\\\?\\C:\\Very\\Long\\Path\\...`\n\n---\n\n## 7. Troubleshooting Shell Errors\n\n| Error | Likely Cause | Fix |\n|-------|-------------|-----|\n| `The term 'xxx' is not recognized` | Path not in $env:PATH | Use absolute path or fix PATH. |\n| `Access to the path is denied` | File in use or permissions | Stop process or run as Admin. |\n| `Encoding mismatch` | Older shell redirection rewrote the output | Re-export the file as UTF-8 or capture with `2>&1 | Out-File -Encoding UTF8`. |\n\n---\n",{"name":5,"risk":24,"source":29,"date_added":39,"description":7},"2026-03-19","main","7a38d8e7073e61c16eda85681cb32fb68a8657a5","skills-store\u002Fcopilot\u002Fwindows-shell-reliability","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router","https:\u002F\u002Fgithub.com\u002Fsapsapshen","2026-04-14 21:12:12",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add sapsapshen\u002Fai-memory-router --skill windows-shell-reliability",{"tool":52,"command":53},"bunx","bunx skills add sapsapshen\u002Fai-memory-router --skill windows-shell-reliability",{"tool":55,"command":56},"pnpm","pnpm dlx skills add sapsapshen\u002Fai-memory-router --skill windows-shell-reliability","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcopilot\u002Fwindows-shell-reliability\u002FSKILL.md",true,[],[61,71,78,86,92,100],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":66,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M72R8PZX1ABFHJGTYPA4CAF1","webapp-testing","To test local web applications, write native Python Playwright scripts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fwebapp-testing\u002FSKILL.md",[],[],"2026-11-10 22:39:42",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":70},"01M72QG37MMZNDY7X7GXPAK5W6","python-packaging","Comprehensive guide to creating, structuring, and distributing Python packages using modern packaging tools, pyproject.toml, and publishing to PyPI.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fpython-packaging\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":82,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":70},"01M72NXR0QMP9G46TW6A2DH59C","canvas-design","These are instructions for creating design philosophies - aesthetic movements that are then EXPRESSED VISUALLY. Output only .md files, .pdf files, and .png files.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fcanvas-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fcanvas-design\u002FSKILL.md",[],[],{"skillNo":87,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":70},"01M72N55TK3EEQ4QK4AWDC2KZS","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":70},"01M72MTWC150CFAP4Y5GSNKF80","slack-gif-creator","A toolkit providing utilities and knowledge for creating animated GIFs optimized for Slack.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fslack-gif-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fslack-gif-creator\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":70},"01M72KPT3VVNSP88MNAY466TZT","frontend-design","You are a frontend designer-engineer, not a layout generator.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Ffrontend-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Ffrontend-design\u002FSKILL.md",[],[]]