Bug
agr sync fails on Windows with a UnicodeDecodeError when any SKILL.md file
contains non-ASCII characters (em dashes, arrows, box-drawing characters, emojis, etc.).
Error
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 4811: character maps to
The traceback points to skill.py → update_skill_md_name → skill_md.read_text().
Root cause
read_text() is called without an explicit encoding parameter. On Windows this
defaults to the system locale encoding (cp1252), which cannot decode UTF-8
multibyte sequences for characters like — (U+2014), → (U+2192), ✅ (U+2705), etc.
Expected behaviour
SKILL.md files are markdown — UTF-8 is the universal standard. read_text() should
be called with encoding="utf-8" (or encoding="utf-8-sig" to also handle BOM).
Workaround
Set PYTHONUTF8=1 before running agr:
PYTHONUTF8=1 agr sync # bash/zsh $env:PYTHONUTF8=1; agr sync # PowerShell
Environment
- OS: Windows 11
- System encoding: cp1252
- agr version: 0.8.4
- Python: 3.12.10
Bug
agr syncfails on Windows with aUnicodeDecodeErrorwhen anySKILL.mdfilecontains non-ASCII characters (em dashes, arrows, box-drawing characters, emojis, etc.).
Error
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 4811: character maps to
The traceback points to
skill.py→update_skill_md_name→skill_md.read_text().Root cause
read_text()is called without an explicitencodingparameter. On Windows thisdefaults to the system locale encoding (
cp1252), which cannot decode UTF-8multibyte sequences for characters like
—(U+2014),→(U+2192),✅(U+2705), etc.Expected behaviour
SKILL.mdfiles are markdown — UTF-8 is the universal standard.read_text()shouldbe called with
encoding="utf-8"(orencoding="utf-8-sig"to also handle BOM).Workaround
Set
PYTHONUTF8=1before runningagr:PYTHONUTF8=1 agr sync # bash/zsh $env:PYTHONUTF8=1; agr sync # PowerShell
Environment