Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/zhinkgit/embeddedskills/serialnpx skills add zhinkgit/embeddedskills --skill serialgit clone --depth 1 https://github.com/zhinkgit/embeddedskillsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00137 | $0.02486 |
| Opus 5 | $0.00068 | $0.01243 |
| Sonnet 5 | $0.00027 | $0.00497 |
| Haiku 4.5 | $0.00014 | $0.00249 |
Grade A, and why
serial scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Serial — 嵌入式串口调试工具
统一封装端口发现、实时监控、数据发送、日志记录和 Hex 查看能力。
配置
环境级配置 (skill/config.json)
serial skill 的环境级配置目前为空对象 {},因为串口参数属于工程级配置,统一在工作区的 .embeddedskills/config.json 中管理。
工程级配置 (.embeddedskills/config.json)
工作区下的 .embeddedskills/config.json 存放工程级串口配置:
{
"serial": {
"port": "",
"baudrate": 115200,
"bytesize": 8,
"parity": "none",
"stopbits": 1,
"encoding": "utf-8",
"timeout_sec": 1.0,
"log_dir": ".embeddedskills/logs/serial"
}
}
| 字段 | 说明 | 默认值 |
|---|---|---|
port |
串口号,如 COM3 |
"" |
baudrate |
波特率 | 115200 |
bytesize |
数据位 | 8 |
parity |
校验位:none/even/odd/mark/space | none |
stopbits |
停止位:1/1.5/2 | 1 |
encoding |
文本编码 | utf-8 |
timeout_sec |
读写超时(秒) | 1.0 |
log_dir |
日志输出目录 | .embeddedskills/logs/serial |
参数解析优先级
- CLI 参数 (
--port,--baudrate等) - 最高优先级 - 工程级配置 (
.embeddedskills/config.json中的serial部分) - 状态文件 (
.embeddedskills/state.json中的历史记录) - 默认值 - 最低优先级
自动扫描行为
当未指定 port 时,脚本会自动扫描系统串口:
- 若只找到一个串口,自动使用该端口并写入工程配置
- 若找到多个串口,返回候选列表让用户选择(通过
--port指定) - 若未找到串口,提示错误
子命令
| 子命令 | 用途 | 风险 |
|---|---|---|
scan |
扫描可用串口 | 低 |
monitor |
实时查看文本输出 | 低 |
send |
发送文本或 Hex 数据 | 中 |
hex |
实时查看二进制流 | 低 |
log |
保存串口日志到文件 | 低 |
执行流程
- 检查
pyserial是否可用,未安装时提示pip install pyserial - 按优先级解析参数:CLI > 工程级配置 > 状态文件 > 默认值
- 无子命令时默认执行
scan monitor / send / hex / log使用解析后的连接参数- 若未指定
port,自动扫描系统串口:- 唯一候选:自动使用并写入工程配置
- 多候选:返回列表让用户选择
- 成功执行后,将确认的参数写回工程配置
- 运行对应脚本并输出结构化结果
- 失败时优先反馈端口占用、驱动、波特率和编码问题
脚本调用
所有脚本位于 skill 目录的 scripts/ 下,通过 python 直接调用。
脚本会按优先级从 CLI 参数、工程级配置、状态文件中读取参数。
# 扫描串口
python scripts/serial_scan.py [--filter <关键词>] [--json]
# 实时监控
python scripts/serial_monitor.py [--port <串口>] [--baudrate <波特率>] [--timestamp] [--filter <regex>] [--timeout <秒>] [--json]
# 发送数据
python scripts/serial_send.py [--port <串口>] [--baudrate <波特率>] <data> [--hex] [--crlf] [--repeat <次>] [--wait-response] [--json]
# Hex 查看
python scripts/serial_hex.py [--port <串口>] [--baudrate <波特率>] [--width <列>] [--timeout <秒>] [--json]
# 日志记录
python scripts/serial_log.py [--port <串口>] [--baudrate <波特率>] [--output <文件>] [--duration <秒>] [--format text|csv|json] [--json]
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- config.example.json 3 B
- README.md 2.3 KB
- references/common_devices.json 889 B
- scripts/serial_hex.py 5.8 KB runs code
- scripts/serial_log.py 6.2 KB runs code
- scripts/serial_monitor.py 6.5 KB runs code
- scripts/serial_mux.py 17 KB runs code
- scripts/serial_runtime.py 14 KB runs code
- scripts/serial_scan.py 3.4 KB runs code
- scripts/serial_send.py 5.7 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 219 lines · 137 tokens per session scan A beb7cdcaf3a2
serial is a skill published in the GitHub repository zhinkgit/embeddedskills (610 stars, last pushed 13d ago), licensed MIT. It adds 137 tokens to every session and 2,486 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
browser-qa
Use when you need lightweight browser QA for a web page, local HTML file, or app: inspect console errors, broken assets, keyboard/focus behavior, viewport readability, and publish evidence-backed findings JSON through a local HTML report viewer.
mastra-api
Interact with Mastra development server API for debugging agents, viewing conversation threads, listing/inspecting tools and workflows, accessing observability data, and managing Mastra resources. Use when working with Mastra agents and need to inspect runtime state, debug agent errors, view thread history, see…
create-mermaid-diagrams
Create, validate, and repair Mermaid diagrams for technical documentation with a deterministic CLI feedback loop. Use when an AI needs to create Mermaid diagrams, improve Mermaid diagram quality, validate Mermaid fences in markdown, diagnose Mermaid rendering failures, or fix Mermaid syntax and formatting issues.
create-pull-request
Generate a reviewer-ready pull request or merge request title and description from branch changes. Use when a user asks to draft PR/MR content, summarize branch deltas against a base branch, or optionally create the PR with gh/glab after approval.
tilt-dev
Manage local development environments with Tilt. Use when working with projects that run services via Tilt (indicated by presence of Tiltfile), including checking service status, viewing logs, troubleshooting connectivity issues, or managing the Tilt stack. Essential for projects using Tiltfile with localresource for…
uv-usage
Provides concise guidance for using uv (Python package manager), including project workflows, pip-compatible commands, Python version management, and PEP 723 inline script dependencies. Use when users mention uv, uv run, inline dependencies, PEP 723, or Python dependency/project management.