claude-fix-unicode-decode — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited claude-fix-unicode-decode (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Treat encoding as a byte-to-text contract. Identify the original bytes, producer, and actual codec before editing. Do not suppress errors with errors="ignore", and do not overwrite a file after decoding it with an unverified codec.
open, Path.read_text, parser, subprocess, HTTP client, database driver, or terminal.Read output alone because the display has already crossed a decoding boundary. python scripts/diagnose_encoding.py path/to/fileIf the current directory is not this skill directory, resolve the script from the loaded skill's directory first.
latin-1 and gb18030 accept many byte sequences.encoding=, configure the child process or terminal, or correct a producer that declares the wrong charset.encoding="utf-8" for Python file I/O.utf-8-sig only for a verified UTF-8 BOM or an explicit interoperability requirement such as some Excel CSV workflows.gb18030 for legacy Simplified Chinese only when provenance or byte evidence supports it. Prefer it over gbk for broader character coverage.utf-16 when a BOM exists. Without a BOM, establish endianness from the producer or format.errors="replace" only for deliberate lossy display or telemetry, and disclose data loss.U+FFFD replacement characters or ignored bytes appear unless original bytes or a backup exists.from pathlib import Path
text = Path(path).read_text(encoding="utf-8")
Path(path).write_text(text, encoding="utf-8", newline="\n")result = subprocess.run(
command,
capture_output=True,
text=True,
encoding="utf-8", # Match the child's documented output contract.
errors="strict",
check=True,
)Read references/encoding-playbook.md for the relevant CSV, JSON, HTTP, database, Windows console, Git migration, or mojibake section. Do not load unrelated sections unless needed.
errors="strict".中文,编码测试。; checking only that no exception occurs is insufficient.git diff --word-diff and git diff --check for replacement characters, newline churn, or unrelated rewrites.Use --json for machine-readable output and --encodings for producer-specific candidates. Treat candidate scores as hints rather than detection guarantees. For ambiguous valid results such as GB18030 versus Big5, ask for provenance or compare known text instead of selecting the top score blindly.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.