← 返回 Skills 市场
freedompixels

Cn Text Encoding Detector

作者 freedompixels · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
31
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cn-text-encoding-detector
功能描述
Detect text file encoding (UTF-8, GBK, Latin-1, etc). Auto-detect BOM markers. Pure Python standard library, no API key required.
使用说明 (SKILL.md)

Text Encoding Detector

Automatically detect the character encoding of text files.

Features

  • Support common Chinese encodings (UTF-8, GBK, GB2312)
  • Detect BOM (Byte Order Mark) markers
  • Report file size along with encoding
  • Pure Python, no external dependencies

Supported Encodings

  • UTF-8 (with or without BOM)
  • UTF-16 LE/BE
  • GBK / GB2312
  • Latin-1 / ISO-8859-1
  • Unknown (when detection fails)

Usage

python3 scripts/encoding_detector.py --file document.txt

Example Output

{
  "file": "document.txt",
  "encoding": "UTF-8",
  "size_bytes": 15234
}

Use Cases

  • Fix garbled text files
  • Batch convert files between encodings
  • Verify file encoding before processing

Notes

Detection tries UTF-8 first, then GBK. If both fail, returns "UNKNOWN".

安全使用建议
This skill appears safe for ordinary use as a local encoding checker. Only run it on files you intend to inspect, and do not grant API keys or credentials because the reviewed artifacts do not need them.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose and implementation are coherent: the script reads a specified file, checks BOM/UTF-8/GBK, and prints JSON with the file name, detected encoding, and size. The docs mention Latin-1 support, but the code returns UNKNOWN after UTF-8 and GBK, which is a functional limitation rather than a security concern.
Instruction Scope
The tool accepts an arbitrary --file path and reads that local file, including reading the full file to calculate size. This is expected for an encoding detector, but users should invoke it only on files they intend to inspect.
Install Mechanism
There is no install spec, no external dependency, and the included script uses only the Python standard library.
Credentials
The local file-read behavior is proportionate to the purpose. A supplied capability signal says requires-sensitive-credentials, but the requirements, SKILL.md, and code show no credential or API-key use.
Persistence & Privilege
No persistence, background process, elevated privilege, credential storage, network call, or account mutation behavior is evident.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cn-text-encoding-detector
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cn-text-encoding-detector 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of Text Encoding Detector. - Detects text file encoding, including UTF-8, GBK, GB2312, Latin-1, and UTF-16 LE/BE. - Automatically recognizes BOM (Byte Order Mark) markers. - Pure Python implementation with no external dependencies. - Reports both encoding type and file size. - Useful for fixing garbled files, batch conversion, and verifying encodings before processing.
元数据
Slug cn-text-encoding-detector
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Cn Text Encoding Detector 是什么?

Detect text file encoding (UTF-8, GBK, Latin-1, etc). Auto-detect BOM markers. Pure Python standard library, no API key required. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 31 次。

如何安装 Cn Text Encoding Detector?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cn-text-encoding-detector」即可一键安装,无需额外配置。

Cn Text Encoding Detector 是免费的吗?

是的,Cn Text Encoding Detector 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cn Text Encoding Detector 支持哪些平台?

Cn Text Encoding Detector 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cn Text Encoding Detector?

由 freedompixels(@freedompixels)开发并维护,当前版本 v1.0.0。

💬 留言讨论