fix(plugins): prepend UTF-8 BOM to SKILL.md on codex branches

Codex on Windows opens SKILL.md without a declared encoding and
defaults to CP1252, mangling Cyrillic. Adding the BOM lets the loader
auto-detect UTF-8.

Applied only on codex/codex-py builds to leave other ports untouched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-05-07 21:19:10 +03:00
parent e635a5be52
commit 35bec4a2a1
+9
View File
@@ -206,6 +206,15 @@ jobs:
sed -e "s|{{PLUGIN_NAME}}|${PLUGIN_NAME}|g" \
.github/templates/claude-plugin.json.tmpl > build/.claude-plugin/plugin.json
- name: Add UTF-8 BOM to SKILL.md (Codex reads Cyrillic as CP1252 without BOM)
if: matrix.platform == 'codex'
run: |
find build -name 'SKILL.md' -print0 | while IFS= read -r -d '' f; do
if ! head -c 3 "$f" | od -An -tx1 | tr -d ' \n' | grep -q '^efbbbf'; then
{ printf '\xef\xbb\xbf'; cat "$f"; } > "$f.tmp" && mv "$f.tmp" "$f"
fi
done
- name: Copy LICENSE
run: cp LICENSE build/LICENSE