encoding-guard SKILL.md skillA

encoding-guard from cropflre/nowen-note is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add cropflre/nowen-note/encoding-guard@git:20260624.1207194

Pins git:20260624.1207194 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
cropflre/nowen-note
Path
.claude/skills/encoding-guard/SKILL.md
Versions recorded
1
Latest version
git:20260624.1207194, committed Jun 24, 2026
Size
4,477 bytes
Repository stars
596
License
GPL-3.0

Prevent garbled text (乱码) when editing code and comments. Use this skill whenever reading, writing, or modifying files to ensure proper UTF-8 encoding handling. Activates on any file edit operation, especially when working with Chinese characters, emoji, or non-ASCII content.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Encoding Guard

Ensures all file operations use proper UTF-8 encoding to prevent garbled text (乱码).

## Core Principles

1. **Always use UTF-8** — Read and write files with explicit UTF-8 encoding
2. **Validate before write** — Check that content is valid UTF-8 before saving
3. **Preserve BOM awareness** — Detect and handle BOM (Byte Order Mark) when present
4. **Handle mixed encoding** — Convert legacy encodings (GBK, GB2312, Big5) to UTF-8

## When Reading Files

```bash
# Always specify encoding when reading
cat -n file.tsx  # Use Read tool which handles encoding

# If you suspect encoding issues, check with:
file -I file.tsx  # Shows charset
hexdump -C file.tsx | head -5  # Inspect raw bytes
```

## When Writing Files

```bash
# Ensure locale supports UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

# When using Edit tool, the content is already validated
# When using Write tool, ensure content is proper UTF-8
```

## Detection Patterns

Watch for these signs of encoding problems:

1. **Mojibake characters**: `é`, `è`, `ü` (UTF-8 read as Latin-1)
2. **Chinese garbled**: `锟斤拷`, `烫烫烫`, `屯屯屯` (GBK/UTF-8 mismatch)
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add cropflre/nowen-note/encoding-guard@sha256:ce429d6024c5f527

The line at the top of this page pins the label git:20260624.1207194, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_jia7evs2ahvwlooj.svg)](https://markdownregistry.com/a/art_jia7evs2ahvwlooj)

0 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 1 version of this file, committed on Jun 24, 2026.

versioncommittedcommitsizeaudit
git:20260624.1207194 latest2026-06-24 1207194 4,477 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (4477 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

cropflre/nowen-note · 596 stars · license GPL-3.0 · pushed 2026-11-02 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_jia7evs2ahvwlooj
GET https://markdownregistry.com/api/v1/resolve?ref=cropflre/nowen-note/encoding-guard
GET https://markdownregistry.com/api/v1/blob/ce429d6024c5f527249a64c4f4b5e812ec6470a5104b85194a35bc037895c116

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from cropflre/nowen-note

AGENTS.md@.agents/skills AGENTS.md file
cropflre/nowen-note · .agents/skills/AGENTS.md
git:20260603.157e2e8 · audit A · 596 stars
nowen-note-development SKILL.md skill
cropflre/nowen-note · .agents/skills/nowen-note-development/SKILL.md · 维护 Nowen Note 仓库:需求与 Bug 分析、实现、回归、PR 审核和发布验收。不用于访问私人笔记。
git:20261017.3c6737e · audit A · 596 stars
nowen-note SKILL.md skill
cropflre/nowen-note · .agents/skills/nowen-note/SKILL.md · 使用 Nowen Note MCP 或 CLI 搜索、读取、创建、更新和整理笔记、任务、标签与附件。适用于用户要求查询个人知识库、整理笔记、写入 Nowen Note、管理任务或让 AI 基于 Nowen Note 内容工作的场景。
git:20261008.364dd4f · audit A · 596 stars
nowen-product-assetization SKILL.md skill
cropflre/nowen-note · .agents/skills/nowen-product-assetization/SKILL.md · 将 Nowen Note 的用户需求、Issue、Bug 和工程投入转化为可复用的长期产品资产。用于需求分析、架构设计、Bug 修复、功能实现、测试设计、插件/API 评估、文档与社区增长决策。
git:20260911.2a47cdd · audit A · 596 stars
nowen-ui SKILL.md skill
cropflre/nowen-note · .agents/skills/nowen-ui/SKILL.md · Recreate, extend, or audit the NOWEN whole-site UI language: Deep Space / Solar Clarity themes, semantic CSS tokens…
v1.0.0 · audit A · 596 stars
chinese-commit SKILL.md skill
cropflre/nowen-note · .claude/skills/chinese-commit/SKILL.md · 确保 git commit message 使用中文。在提交代码时自动应用中文提交规范。
git:20260626.9d2f2a1 · audit A · 596 stars
chinese-reply SKILL.md skill
cropflre/nowen-note · .claude/skills/chinese-reply/SKILL.md · Force AI to always respond in Chinese (中文). Use this skill at the start of any conversation to ensure all responses are…
git:20260626.dd52e9d · audit A · 596 stars
nowen-note-development SKILL.md skill
cropflre/nowen-note · .claude/skills/nowen-note-development/SKILL.md · 维护 Nowen Note 仓库:需求与 Bug 分析、实现、回归、PR 审核和发布验收。不用于访问私人笔记。
git:20261017.3c6737e · audit A · 596 stars
nowen-note SKILL.md skill
cropflre/nowen-note · .claude/skills/nowen-note/SKILL.md · 使用 Nowen Note MCP 或 CLI 搜索、读取、创建、更新和整理笔记、任务、标签与附件。适用于用户要求查询个人知识库、整理笔记、写入 Nowen Note、管理任务或让 AI 基于 Nowen Note 内容工作的场景。
git:20261008.364dd4f · audit A · 596 stars
nowen-ui SKILL.md skill
cropflre/nowen-note · .claude/skills/nowen-ui/SKILL.md · Recreate, extend, or audit the NOWEN whole-site UI language: Deep Space / Solar Clarity themes, semantic CSS tokens…
v1.0.0 · audit A · 596 stars
AGENTS.md AGENTS.md file
cropflre/nowen-note · AGENTS.md
git:20261012.65eda82 · audit A · 596 stars

Every file in cropflre/nowen-note

Browse by kind, by grade A, or by owner.