encoding-handler
Handle text encoding across platforms including UTF-8, Windows codepages, and BOM handling.
Best use case
encoding-handler is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Handle text encoding across platforms including UTF-8, Windows codepages, and BOM handling.
Teams using encoding-handler should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/encoding-handler/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How encoding-handler Compares
| Feature / Agent | encoding-handler | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Handle text encoding across platforms including UTF-8, Windows codepages, and BOM handling.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Encoding Handler
Handle text encoding across platforms.
## Capabilities
- Detect file encoding
- Convert between encodings
- Handle BOM markers
- Configure Windows codepage support
- Normalize text encoding
- Handle encoding errors
## Generated Patterns
```typescript
import { Buffer } from 'buffer';
import iconv from 'iconv-lite';
export function detectBOM(buffer: Buffer): string | null {
if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) return 'utf-8';
if (buffer[0] === 0xFF && buffer[1] === 0xFE) return 'utf-16le';
if (buffer[0] === 0xFE && buffer[1] === 0xFF) return 'utf-16be';
return null;
}
export function stripBOM(content: string): string {
return content.charCodeAt(0) === 0xFEFF ? content.slice(1) : content;
}
export function decodeBuffer(buffer: Buffer, encoding = 'utf-8'): string {
const bom = detectBOM(buffer);
if (bom) {
return stripBOM(iconv.decode(buffer, bom));
}
return iconv.decode(buffer, encoding);
}
export function encodeString(content: string, encoding = 'utf-8', addBOM = false): Buffer {
const encoded = iconv.encode(content, encoding);
if (addBOM && encoding.toLowerCase() === 'utf-8') {
return Buffer.concat([Buffer.from([0xEF, 0xBB, 0xBF]), encoded]);
}
return encoded;
}
```
## Target Processes
- cross-platform-cli-compatibility
- cli-output-formatting
- configuration-management-systemRelated Skills
jwt-handler
JWT creation, validation, and management for SDK authentication
tei-text-encoding
Encode texts following Text Encoding Initiative standards for digital editions, annotations, and scholarly apparatus
electron-protocol-handler-setup
Register and handle custom URL protocols (deep linking) across platforms for Electron applications
clipboard-handler
Cross-platform clipboard operations for text, images, files, and rich content
trap-handler-generator
Generate trap handlers for cleanup, signal handling, and graceful shutdown in shell scripts.
mutually-exclusive-group-handler
Generate logic for handling mutually exclusive argument groups with clear error messages and validation in CLI applications.
cross-platform-path-handler
Generate cross-platform path handling utilities for Windows, macOS, and Linux compatibility in CLI applications.
process-builder
Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.
babysitter
Orchestrate via @babysitter. Use this skill when asked to babysit a run, orchestrate a process or whenever it is called explicitly. (babysit, babysitter, orchestrate, orchestrate a run, workflow, etc.)
yolo
Run Babysitter autonomously with minimal manual interruption.
user-install
Install the user-level Babysitter Codex setup.
team-install
Install the team-pinned Babysitter Codex workspace setup.