Serial Hub — AI skill for Claude Code
Let any AI (Cline/workbuddy/Claude Desktop via MCP) share one serial port with you — read output, send commands, and atomically catch boot prompts.
How to install Serial Hub
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open blick-winkel486/serial-hub and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Serial Hub does
Let any AI (Cline/workbuddy/Claude Desktop via MCP) share one serial port with you — read output, send commands, and atomically catch boot prompts. A serial console hub for autonomous embedded debugging.让任意 AI(Cline/workbuddy/Claude Desktop 等,经 MCP 接入)与人共用同一条串口:AI 自主看输出、发命令、原子 expect→send 抢 U-Boot 倒计时与登录窗口,嵌入式开发板自动调试的通用串口中枢。
Alternatives in AI
- Pixel Agents — Compressed Reference — VS Code extension with embedded React webview: pixel art office where AI agents (Claude Code terminals) are an 6.5k ★
- Embeddedskills — An open-source collection of embedded development and debugging skills for Claude Code, Copilot, TRAE, and oth 593 ★
- The Pair — Open-source AI pair programming for desktop: a Mentor + Executor agent cross-check each other's code to catch 358 ★
README
serial-hub
让 **任何 AI**(workbuddy、VS Code 里的 Cline、Claude Desktop、Cursor、DSH……)都能和人类工程师**共用同一条串口**,自主地看输出、发命令、交互式调试嵌入式开发板上的 Linux。
┌──────────────────────────────────┐
人(浏览器)────▶│ serial-hub 守护进程(常驻) │◀── MCP ──▶ VS Code 的 AI (Cline)
Web 控制台 │ 唯一持有并独占串口的那一个对象 │
│ hub: 环形缓冲 + seq + 游标 │◀── MCP ──▶ workbuddy 的 AI
MobaXterm ────▶│ 控制 IPC(本地 TCP,换行 JSON) │
(TCP 桥,可选) └──────────────────────────────────┘
▲
└── CLI (serialctl) ── 任何"只能跑 shell"的 AI
它解决什么
嵌入式工程师调板子时,人盯串口终端、AI 想帮忙却"看不见也摸不着"。serial-hub 把串口提升成一个**常驻服务**:人用 Web 控制台(xterm 终端),AI 通过 MCP 或 CLI 工具接入,**双方共享同一个 SerialHub、同一条物理连接**——AI 看到的 == 人看到的,AI 发的 == 人看到的,`serial_expect_send` 还能让 AI 在正确的毫秒发出命令(抢 U-Boot 倒计时、登录密码)。
核心设计
- 单一真源:所有数据(设备输出、AI 发的、人敲的)进同一个按
seq严格递增的环形缓冲。任何客户端读到的都是同一份真相。 - 独占而不互斥:串口只被守护进程打开一次;人和多个 AI 都是它的客户端,彼此不抢端口。
- 读取游标:每个会话/每个 CLI consumer 有独立游标,
read默认是"给我还没看过的部分"。 - 原子 expect→send:
serial_expect_send在命中正则的同一 tick 内发字节,解决交互式提示的秒级竞态。 - 上下文卫生:read/wait 有硬上限并显式报截断,绝不把整段
dmesg灌进模型上下文。
安装
cd serial-hub
npm install # serialport(N-API 预编译) + ws + @xterm/xterm + MCP SDK + zod
`serialport` 有原生依赖;若在非 Electron 的普通 Node 下加载失败,先用内置 `VIRTUAL` 虚拟端口验证整条链路(见下)。
快速开始(无硬件自测)
# 1) 前台起守护进程(会打印 Web 控制台地址)
node bin/serial-hub.js
# → 人类 Web 控制台:http://127.0.0.1:48080/serial/
# → 控制 IPC:127.0.0.1:48555
# 2) 用 CLI 走一遍(虚拟板)
serialctl ports # 应看到 VIRTUAL 虚拟演示板
serialctl open VIRTUAL
serialctl wait "U-Boot" --timeout 5000
serialctl read
serialctl close
人类打开 `http://127.0.0.1:48080/serial/` 就能看到 xterm 终端,和 CLI/AI 共用同一个口。
三种接入方式
| 方式 | 适合谁 | 说明 |
|---|---|---|
| MCP Server(推荐) | workbuddy、Cline 等支持 MCP 的 AI | 一次配置,工具即插即用 |
CLI (serialctl) |
只能执行 shell 命令的 AI | 零集成,直接跑命令 |
| 人类 Web 控制台 | 你 | xterm 终端,随时看/敲 |
接入 A:MCP Server(workbuddy / Cline / Claude Desktop
Related Skills
Serial MCP
Serial port MCP server for Claude Code, Codex, Opencode and AI agents. Reliable UART/USB-serial access for emb
Secure Agent
🔐 Egress inspection & secret-leak firewall for local AI agents — see what your agents send, catch secrets bef
Obsidian Echobrain
Make Obsidian the Local Brain for AI Agents. Embedded MCP Server (HTTP/SSE) with Graph-RAG for WorkBuddy, Curs
Paseo Canvas
Live-render, share and send-to-chat everything your AI agents build — a Paseo plugin
Port RAG Potty
Sirve a tus agentes de IA (opencode, Claude, Cursor, Cline…) contexto curado de cualquier proyecto: reduce de
AI Intelligence Hub
AI Intelligence Hub - Track 14 AI sources (GitHub, HuggingFace, MCP, Claude Code, Anthropic Skills & Cookbooks
Related Agents
Ehs Local App
Local application security specialist for the Ethical Hacker Squad. Reviews command-line tools, desktop applic
Spring Architecture Review
Read-only auditor for Spring Boot layer boundaries. Dispatch after implementing a feature to catch logic that
Deploy QA
Post-deploy verification in a real browser using the Playwright MCP tools - smoke tests of key journeys, conso