[BUG] skill-creator crashes on Windows due to non-UTF-8 terminal encoding (GBK, Shift-JIS, etc.)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When using the skill-creator skill on Windows with a non-UTF-8 system locale (e.g., GBK/Simplified Chinese), the skill crashes with encoding errors. Two scripts are affected:
- quick_validate.py throws UnicodeDecodeError when reading SKILL.md, because Path.read_text() uses the system default encoding (GBK) instead of UTF-8.
- package_skill.py throws UnicodeEncodeError when printing emoji characters (📦 ✅ ❌ 🔍) to a GBK terminal.
The skill-creator is completely non-functional on non-UTF-8 Windows systems.
What Should Happen?
The skill-creator skill should run successfully on Windows regardless of the system locale encoding. Both scripts should handle UTF-8 content and emoji output correctly on GBK/Shift-JIS/Big5 terminals.
Error Messages/Logs
# Bug 1 - quick_validate.py
UnicodeDecodeError: 'gbk' codec can't decode byte 0xe2 in position ...: illegal multibyte sequence
# Bug 2 - package_skill.py
UnicodeEncodeError: 'gbk' codec can't encode character '\U0001f4e6' in position ...: illegal multibyte sequence
Steps to Reproduce
- Use Windows with Simplified Chinese system locale (or any non-UTF-8 locale)
- Install Claude Code desktop version and activate the skill-creator skill
- Run skill-creator to create a new skill
- Bug 1: quick_validate.py crashes immediately with UnicodeDecodeError when reading SKILL.md
- Bug 2: Even if Bug 1 is fixed, package_skill.py crashes with UnicodeEncodeError when printing emoji to terminal
Note: Both bugs share the same root cause — the scripts do not account for non-UTF-8 Windows terminal encodings.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.71 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
I have documented both bugs and their fixes in detail here:
https://github.com/AntlerPotato/claude-code-skill-creator-windows-fix
Related issues in other modules (same root cause, different components):
- #29699: Unicode mojibake in Edit tool on Windows
- #22056: Chrome Native Host failure with non-ASCII Windows usernames
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗