powershell
Prevent file-writing via Windows PowerShell to avoid GBK encoding corruption. Use when Kimi Code CLI is running on Windows and the task involves creating, writing, or modifying text files, especially when content contains Chinese or other non-ASCII characters.
Documentation & Preview
Description:
Prevents agents on Windows from corrupting UTF-8 text by avoiding unsafe PowerShell file-writing methods and using deterministic UTF-8 writes.
This skill is ready for commercial/non-commercial use.
Publisher:
License/Terms of Use:
MIT-0
Use Case:
Developers and agent operators use this skill when editing text files from Kimi Code CLI on Windows, especially Chinese Windows environments, to avoid GBK/code page 936 corruption and choose safe UTF-8 writing methods.
Deployment Geography for Use:
Global
Known Risks and Mitigations:
Risk: Using PowerShell redirection, Set-Content, or Out-File without explicit UTF-8 encoding can corrupt Chinese or other non-ASCII text on systems using GBK/code page 936.
Mitigation: Use dedicated file-editing tools for writes, or force UTF-8 explicitly with Out-File -Encoding UTF8 or System.IO.File.WriteAllText and verify the resulting file is readable.
Risk: The skill changes an agent's file-writing workflow and may steer it away from shell-based writes when dedicated file tools are available.
Mitigation: Apply the guidance only to file creation or modification tasks and use the explicit UTF-8 shell alternatives when a PowerShell write is unavoidable.
Reference(s):
Skill Output:
Output Type(s): [guidance, shell commands]
Output Format: [Markdown guidance with PowerShell command snippets]
Output Parameters: [1D]
Other Properties Related to Output: [None]
Skill Version(s):
1.0.0 (source: server release metadata)
Ethical Considerations:
Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.