windows-utf8-text-hygienelisted
Install: claude install-skill h8nc4y/windows-utf8-text-hygiene
# Windows UTF-8 Text Hygiene
Procedure for normalizing and verifying text-file encodings on Windows,
aimed at repositories that carry Japanese (or any non-ASCII) content. The
convention it enforces: **repository text files are UTF-8 without BOM, LF
line endings, no trailing whitespace, no NUL bytes** — with one deliberate
exception for Windows PowerShell 5.1 scripts, explained below.
The core of the skill is ordering: inspect non-destructively first,
normalize only what passes a strict UTF-8 decode, prevent corruption at
generation time, and verify again after every append.
## When To Use
- After writing or appending Japanese text to a repository's Markdown,
docs, or scripts, as the post-edit verification step.
- When `git diff --check` warns about trailing whitespace, or CRLF shows up
in a diff.
- When Japanese renders as mojibake (garbled characters such as `縺` or
`?`), or ripgrep/grep starts reporting `binary file matches` — a sign of
NUL-byte contamination.
- When a code span in PowerShell-generated Markdown is broken — `` `t ``
became a TAB, `` `f `` became a form feed (backtick expansion).
- When adding a Japanese comment to a `.ps1` executed by Windows PowerShell
5.1 caused a parse error — or worse, a statement silently stopped
executing.
- When Japanese written to hook stdout (for example agent-harness hooks
configured in a settings file) arrives garbled on the reading side.
## Ground Rules
- Repository text files are **UTF-8 without BOM + LF + n