bydisentinel· 40 skills
Fix intermittent {:no_translation, :unicode, :latin1} crashes in Elixir escript daemons that use length-prefixed framed IPC on stdin/stdout. Use when: (1) daemon worker crashes only on some input files, usually ones with non-ASCII bytes (kanji, cyrillic, emoji); (2) error surfaces as Protocol error from daemon's error branch or as garbled frame-length bytes seen by the orchestrator/client side; (3) standalone one-shot mode works fine on the same input but multi-request daemon mode fails; (4) IO.binread(:stdio, N) returns {:error, {:no_translation, :unicode, :latin1}} despite the "bin" prefix suggesting it should be encoding-agnostic. Root cause is the escript default :standard_io encoding — it's :unicode, and IO.binread still routes through the io_server, which translates bytes to codepoints and errors when raw binary frames contain invalid UTF-8 sequences.
$npx -y skills add disentinel/grafema --skill elixir-escript-daemon-stdio-encodingInstalls into the current project.
Run `npx skills use "https://github.com/disentinel/grafema" --skill "disentinel/grafema/elixir-escript-daemon-stdio-encoding"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/disentinel/grafema" that are relevant to the current task. Run `npx skills add "https://github.com/disentinel/grafema"` and select the relevant skills, then follow their instructions.