# 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.

- Skill: `tomevault-io/text-encoding-guard` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/text-encoding-guard`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/text-encoding-guard/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/text-encoding-guard

---


# 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

```bash
# 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](https://github.com/haodehaode378/text-encoding-guard) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-27 -->

