.claude/skills/cloudflare-workers-utf8-github-api/SKILL.md
Fix UTF-8 encoding corruption when Cloudflare Workers send content to GitHub API. Use when: (1) Non-ASCII characters like arrows (→), emojis, or accented letters become corrupted (e.g., → becomes â or â), (2) YAML parsing fails with "non-printable characters" error, (3) Content looks correct locally but corrupted after GitHub commit. Covers charset header and YAML string quoting.
npx skillsauth add Dbochman/dotfiles cloudflare-workers-utf8-github-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When sending content from Cloudflare Workers to GitHub's API (especially the
Trees/Blobs API), non-ASCII characters get corrupted. The UTF-8 bytes are
interpreted as Latin-1/ISO-8859-1, causing multi-byte characters to become
garbled sequences like â instead of →.
â, âÂÂ, é appear where Unicode should beconst response = await fetch(`${GITHUB_API}${endpoint}`, {
...options,
headers: {
Authorization: `Bearer ${token}`,
Accept: 'application/vnd.github+json',
'Content-Type': 'application/json; charset=utf-8', // ADD charset=utf-8
'User-Agent': 'my-worker',
...options.headers,
},
});
When serializing YAML, detect and quote strings with non-ASCII characters:
function escapeYamlString(value: string): string {
// Check for non-ASCII characters (any character > 127)
const hasNonAscii = /[^\x00-\x7F]/.test(value);
if (
hasNonAscii ||
value.includes(':') ||
value.includes('#') ||
// ... other YAML special chars
) {
// Use double quotes and escape internal quotes/newlines
return `"${value
.replace(/\\/g, '\\\\')
.replace(/"/g, '\\"')
.replace(/\n/g, '\\n')}"`;
}
return value;
}
const response = await fetch(`${GITHUB_API}/repos/.../git/blobs`, {
method: 'POST',
headers: { /* ... with charset=utf-8 */ },
body: JSON.stringify({
content: fileContent,
encoding: 'utf-8', // Explicitly specify encoding
}),
});
Test string: Create migration script (JSON → markdown files)
Before fix:
text: "Create migration script (JSON â markdown files)"
After fix:
text: "Create migration script (JSON → markdown files)"
encoding: 'utf-8' when creating blobs, not encoding: 'base64'
unless you're explicitly base64-encoding the content yourselftools
Use exact configured Reolink cameras through the local Home Hub for availability and power status, fresh stills, visual commentary, protected Dylan/Julia/household sharing, and reversible spotlight control. Supports trusted owner tasks and explicitly scoped proactive automations; not for Nest or Ring cameras, arbitrary recipients, recordings, account changes, or raw camera APIs.
data-ai
Privately manage Dylan and Julia's household plant inventory and care history by physical location, bed, and exact Flower Cam view. Use for confirmed plant onboarding from camera conversations, camera- or bed-filtered inventory, record corrections, individual or whole-bed care, and private filtered exports. Pair with reolink-camera when an owner asks about plants visible in Flower Cam images.
testing
Inspect and control the physically secured Reachy Mini at Crosstown through ClawBody. Use for requests to check Reachy, look around, express an emotion, play any official emotion or dance preset, speak proactively, mute or unmute its microphone, stop movement, or describe what its camera sees.
tools
Handle Reachy/iMessage handoffs, selective durable memory, forgetting, and diagnostics; automatic context comes from the gateway plugin.