@longhun12346/file-encoding

Encoding guard for Windows C++ projects (GBK/ANSI/UTF-16): blocks unsafe native edits and steers agents to transcode tools. Works as a Claude Code plugin and a Pi extension.

Packages

Package details

extensionskill

Install @longhun12346/file-encoding from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@longhun12346/file-encoding
Package
@longhun12346/file-encoding
Version
3.1.0
Published
Aug 9, 2026
Downloads
142/mo · 21/wk
Author
longhun12346
License
MIT
Types
extension, skill
Size
111.4 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./skills/file-encoding/pi/file-encoding.ts"
  ],
  "skills": [
    "./skills/file-encoding"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

artifact-skills

Claude Code agent skills collection.

Skills

Skill Description
file-encoding Guard hooks for multi-encoding files (ANSI/GBK/UTF-8/UTF-16): blocks unsafe edits, steers Claude to transcode tools

Install

Pi (coding agent)

This repository is also a Pi package (pi-package keyword). The Pi extension (skills/file-encoding/pi/file-encoding.ts) blocks unsafe native edits on non-UTF-8 files and rewrites read results with decoded content. Install the Python detection library first:

python skills/file-encoding/scripts/install_deps.py
pi install git:github.com/longhun12346/artifact-skills
# or, via npm:
pi install npm:@longhun12346/file-encoding

See pi/README.md for details.

Claude Code plugin (recommended)

This repository is a Claude Code plugin marketplace:

claude plugin marketplace add longhun12346/artifact-skills
claude plugin install artifact-skills file-encoding

The plugin registers the encoding guard hooks automatically. Then install the Python detection library (required for reliable encoding detection):

python skills/file-encoding/scripts/install_deps.py

Manual

Copy the skill directory to ~/.claude/skills/ and register hooks manually:

cp -r skills/file-encoding ~/.claude/skills/

Requirements

  • Claude Code
  • Python 3.9+
  • Windows 10/11 (tested), Linux/WSL2 Fedora (tested), macOS (untested)

License

MIT