windows-development-automation

Automates Windows CMD and PowerShell scripting with correct encoding handling for zh-TW systems.

Updated Jul 6, 2026
One-click install
npx skills add https://github.com/Lucien-1127/strata-skill --skill windows-development-automation-lucien-1127
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: windows-development-automation
Source: https://github.com/Lucien-1127/strata-skill/tree/main/windows-development-automation
Command: npx skills add https://github.com/Lucien-1127/strata-skill --skill windows-development-automation-lucien-1127

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Windows command-line automation on Traditional Chinese (zh-TW) systems suffers from encoding pitfalls: CMD batch files default to CP 950 (Big5) while modern tools output UTF-8, causing garbled Chinese text, silently dropped input with chcp 65001 + set /p, and flashing terminal windows. ## Core Features & Use Cases - Encoding Diagnostics: Identifies which CMD/PowerShell approaches fail on zh-TW Windows and provides working alternatives, including file encoding detection and correct save methods (UTF-8 without BOM vs ANSI/CP 950). - PowerShell Menu Launcher Pattern: Provides a structured template for interactive tool launchers using functions, Read-Host, and switch loops that handle Chinese text correctly. - Terminal & Shortcut Configuration: Includes registry commands for Windows Terminal defaults, ANSI escape support, CP 65001 font registration, and programmatic .lnk shortcut creation via WScript.Shell COM. - Use Case: When building a launcher script for a Chinese-language Windows tool, use this Skill to avoid the set /p input-drop bug, configure the console code page correctly, and create a desktop shortcut that opens without window flashing. ## Quick Start Help me write a PowerShell menu launcher script for my zh-TW Windows machine that displays Chinese text correctly and creates a desktop shortcut to run it.

Frequently Asked Questions about windows-development-automation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix garbled Chinese text in Windows CMD batch files?▼

Garbled Chinese in CMD batch files happens because CMD reads scripts as CP 950 (Big5) while editors save as UTF-8. Save the batch file as ANSI/system default encoding, or switch to a PowerShell script which handles Unicode natively.

Why does set /p stop working after chcp 65001?▼

On Windows 10/11, calling chcp 65001 and then using set /p with Chinese characters in the prompt causes input to be silently dropped, leaving the variable empty. Use PowerShell's Read-Host instead, which handles Chinese input correctly.

Should I use CMD batch or PowerShell for Windows automation with Chinese text?▼

PowerShell is the correct choice for any Windows automation involving non-ASCII text. It offers native UTF-16 handling, working Read-Host prompts, try/catch error handling, and full emoji support, while CMD depends on fragile code page settings.

How do I create a Windows desktop shortcut with PowerShell?▼

Use the WScript.Shell COM object: create a shortcut with CreateShortcut, set TargetPath to powershell.exe, add Arguments with -NoProfile -ExecutionPolicy Bypass -File pointing to your script, then call Save. This avoids the window-flash bug of CMD wrappers.

How do I save a file as UTF-8 without BOM in PowerShell?▼

Use [System.IO.File]::WriteAllText with [System.Text.UTF8Encoding]::new($false) as the encoding parameter. For CMD batch files on zh-TW systems, use [System.Text.Encoding]::Default instead to save as CP 950.

Why does cmd /c fail when called from git-bash?▼

Git-bash (MSYS) automatically converts POSIX-style arguments, turning cmd.exe /c into cmd.exe C:\. Use cmd.exe //c instead, or set MSYS2_ARG_CONV_EXCL="*" before the command to disable path conversion.