← Back to Skills Marketplace
freedompixels

Cn Text Encoding Detector

by freedompixels · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
31
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install cn-text-encoding-detector
Description
Detect text file encoding (UTF-8, GBK, Latin-1, etc). Auto-detect BOM markers. Pure Python standard library, no API key required.
README (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".

Usage Guidance
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.
Capability Tags
requires-sensitive-credentials
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cn-text-encoding-detector
  3. After installation, invoke the skill by name or use /cn-text-encoding-detector
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug cn-text-encoding-detector
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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. It is an AI Agent Skill for Claude Code / OpenClaw, with 31 downloads so far.

How do I install Cn Text Encoding Detector?

Run "/install cn-text-encoding-detector" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Cn Text Encoding Detector free?

Yes, Cn Text Encoding Detector is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Cn Text Encoding Detector support?

Cn Text Encoding Detector is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Cn Text Encoding Detector?

It is built and maintained by freedompixels (@freedompixels); the current version is v1.0.0.

💬 Comments