serial-debug
CLI-first serial port debugging and macro automation with serial-mcp-server for Codex and Claude Code. Use when working with UART or USB-serial devices, listing serial ports, probing STM32/Arduino/ESP32 boards, writing or reading serial data, running JSON serial macros, controlling RTS/DTR, or using serial-mcp-server through MCP tools.
中文简介正在准备中。当前显示原文说明。
查看安装方法包含的文件(6)
- SKILL.md2.6 KB
- agents/openai.yaml192 B
- references/cli.md3.2 KB
- references/hardware-safety.md1.1 KB
- references/mcp.md2.2 KB
- references/troubleshooting.md1.1 KB
SKILL.md(原文)
安装前可以查看交给 AI 代理的指令内容。
Serial Debug
Operating Rule
Use the serial-mcp-server CLI first unless the user explicitly asks for MCP or an MCP client is already configured. Keep stdout data separate from diagnostics, cite exact commands, and base hardware success on real command evidence from the device.
Workflow
- Confirm the binary is available:
serial-mcp-server --help
- List available ports before choosing a device:
serial-mcp-server list-ports --json
- For a device smoke test, probe the port first, then write/read only when the probe succeeds:
serial-mcp-server probe --port <port> --baud 115200 --json
serial-mcp-server write --port <port> --baud 115200 --data H --read --timeout-ms 1000 --json
- If RTS or DTR is involved, state the requested line levels and use the control-line command:
serial-mcp-server set-control-lines --port <port> --rts high --dtr low --json
- For repeatable serial procedures, prefer JSON macro packs and validate or plan them before real hardware execution:
serial-mcp-server macro validate --file <pack.json> --json
serial-mcp-server macro plan --file <pack.json> --macro <name> --json
serial-mcp-server macro run --file <pack.json> --macro <name> --simulate-read <response> --json
serial-mcp-server macro run --file <pack.json> --macro <name> --port <port> --baud 115200 --json
Macro packs are restricted JSON DSL files. v0.3 supports send, delay, expect contains, expect equals, and assemblies that call macros. It does not support shell commands, language execution, loops, variables, Quick commands, or RTS/DTR macro steps.
References
- Read
references/cli.mdfor exact command behavior, output expectations, and automation rules. - Read
references/mcp.mdwhen the user asks for MCP setup or MCP tool usage. - Read
references/hardware-safety.mdbefore changing baud, wiring, voltage levels, RTS, DTR, or reset/boot lines. - Read
references/troubleshooting.mdwhen a command fails, times out, returns no ports, or cannot open the device.
Reporting
Report the command, exit status, and the relevant JSON or error excerpt. If no hardware is connected, limit the validation summary to discovery and help paths.
评价
还没有评价。欢迎分享你的使用感受。
评论
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。