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/terminalnpx skills add zhinkgit/embeddedskills --skill terminalgit clone --depth 1 https://github.com/zhinkgit/embeddedskillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/zhinkgit/embeddedskills/terminal)<a href="https://agentmods.dev/skills/zhinkgit/embeddedskills/terminal"><img src="https://agentmods.dev/badge/skills/zhinkgit/embeddedskills/terminal.svg" alt="Measured on agentmods" height="20"></a>What 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.00105 | $0.01605 |
| Opus 5 | $0.00053 | $0.00803 |
| Sonnet 5 | $0.00021 | $0.00321 |
| Haiku 4.5 | $0.00011 | $0.00161 |
Grade A, and why
terminal 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 4d 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 — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Terminal — 双向交互终端会话
统一封装串口、SSH 和本地 Shell 的双向交互会话。它补齐 serial 的“监控/发送是分离命令”和 ssh 的“远程命令多为一次性执行”之间的空白:当目标需要保持登录状态、菜单状态、REPL 状态或设备 CLI 上下文时,使用本 skill。
定位
serial:扫描、监控、单次发送、日志、Hex 查看。ssh:OpenSSH 配置、远程命令、传输、隧道。terminal:保持一个可持续读写的交互式会话,并通过send/read驱动下一步判断。
配置
环境级配置 (config.json)
terminal skill 的环境级配置目前为空对象 {}。交互终端的关键参数通常和具体会话绑定,优先通过 start 命令显式传入,避免误连设备或误用凭据。
会话状态 (.embeddedskills/state.json)
后台会话运行时状态保存到工作区的 .embeddedskills/state.json,使用 terminal_sessions 字段记录会话名、后端、PID、TCP 控制端口和日志路径。
参数优先级
- CLI 参数 (
--port,--baudrate,--host,--name等) - 最高优先级 - 会话状态 (
.embeddedskills/state.json中已启动的terminal_sessions) - 默认值 - 最低优先级
子命令
| 子命令 | 用途 | 风险 |
|---|---|---|
start |
启动一个后台交互会话 | 中 |
list |
列出现有会话 | 低 |
status |
查询单个会话状态 | 低 |
send |
向会话写入文本或 Hex 数据 | 中 |
read |
读取并清空会话输出缓冲 | 低 |
attach |
前台行模式接入会话 | 中 |
stop |
停止会话并清理状态 | 中 |
后端
| 后端 | 适用场景 | 依赖 |
|---|---|---|
serial |
MCU UART 控制台、AT 命令、Bootloader 菜单、板卡 CLI | pyserial |
ssh |
Linux 开发板交互 Shell、登录后持续操作 | OpenSSH 客户端 |
local |
本机临时 Shell、REPL、CLI 程序交互 | Python 标准库 |
脚本调用
所有脚本位于 skill 目录的 scripts/ 下,通过 python 直接调用。命令示例均以当前 skill 目录为基准。
# 启动串口终端
python scripts/terminal_session.py start serial --port COM11 --baudrate 115200 --name board
# 启动 SSH 终端,host 使用 ~/.ssh/config 中的 Host 别名
python scripts/terminal_session.py start ssh --host 1380-P904 --name devboard
# 启动本地 Shell
python scripts/terminal_session.py start local --name local-shell
# 发送一行命令并追加 CRLF
python scripts/terminal_session.py send board "help" --crlf
# 读取输出,最多等待 1 秒
python scripts/terminal_session.py read board --timeout 1
# 前台行模式接入
python scripts/terminal_session.py attach board
# 查询与停止
python scripts/terminal_session.py list
python scripts/terminal_session.py status board
python scripts/terminal_session.py stop board
会话状态详情
会话元数据保存到工作区:
.embeddedskills/state.json
What ships with it
4 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.
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.
- 4d ago First seen · 157 lines · 105 tokens per session scan A 93fdc326ded7
terminal is a skill published in the GitHub repository zhinkgit/embeddedskills (620 stars, last pushed yesterday), licensed MIT. It adds 105 tokens to every session and 1,605 once invoked, about $0.0005 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.