Serial shell

From LeoKemp223/embed-ai-tool · View interactive version

Serial shell is an AI agent skill from the GitHub repository LeoKemp223/embed-ai-tool. 当需要通过串口与嵌入式设备建立交互式 Shell 会话、执行单条命令或批量脚本时使用。

How to use this skill

Skill file

串口 Shell 交互

适用场景

必要输入

自动探测

执行步骤

  1. 确认 pyserial 已安装(pip install pyserial),若缺失则返回 environment-missing 并指导安装。
  2. 运行自带脚本 shell_proxy.py,根据用户意图选择模式:
  1. 若设备 Shell 需要先登录或进入特定目录,使用 --init "<命令>"(可重复多次),按顺序在连接后自动发送。
  2. 若设备回显乱码,先用 --encoding gbk 尝试;若仍无法识别,用 --hex 查看原始字节辅助诊断。
  3. 若设备使用 RS-485 半双工,启用 --rs485;若需捕获逐字符回显,进一步启用 --rs485-byte。
  4. 若需要将输出保存到文件,使用 --log <文件路径>。
  5. 读取脚本输出时,重点关注命令执行结果、错误信息和 Shell 提示符返回状态,而不是只转述原始文本。
  6. 将确认有效的串口、波特率和编码写回 Project Profile。

失败分流

平台说明

输出约定

交接关系

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.