Text Encoding Guard

Use this skill whenever Chinese text may become garbled during coding, refactors, README edits, Vue/HTML template edits, or shell-based file rewrites. It provides a mandatory post-edit encoding scan and a conservative UTF-8/GBK recovery flow.

tomevault-io 203f81c 2 files · 1.8 KB Updated

File contents

Text Encoding Guard

Purpose

Prevent and repair Chinese text encoding corruption after edits.

Required Behavior

  • After editing files that may contain Chinese text, run the mojibake checker.
  • Inspect every suspicious path before applying recovery.
  • Prefer manual correction for small text changes.
  • Use conservative recovery only when UTF-8/GBK corruption is clear.
  • Re-run the checker after fixes and report the result.

Commands

# If installed via pip:
check-mojibake --root <project_root>

# If running from repo checkout:
python scripts/check_mojibake.py --root <project_root>

# Auto-fix mode:
check-mojibake --root <project_root> --fix-gbk

Source: haodehaode378/text-encoding-guard — distributed by TomeVault.

tomevault-io/skills-registry/tree/main/haodehaode378--text-encoding-guard--text-encoding-guard commit 203f81c8b4

Frequently asked questions

npx skillmds@latest add tomevault-io/text-encoding-guard