- shellrs exec --json 从标准输入读 {"host", "command"},命令结束后输出
{"exit_code", "stdout", "stderr"},出错时输出 {"error": {"code", "message"}},
退出码和不加 --json 时一样。非 ASCII 字符都转成 \uXXXX,不是 UTF-8 的输出
换成 U+FFFD:命令不经过本机 shell 的引号处理,控制台代码页也弄不乱输出。
- skill 的 Windows 一节:PowerShell 优先用 --json;要边执行边看输出时用
here-string 加 --stdin,先设 UTF-8 编码;Git Bash 用 heredoc。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>