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 skills add royforlinux/openocd-mcu-mcp --skill openocd-mcu-debuggit clone --depth 1 https://github.com/royforlinux/openocd-mcu-mcpWrote 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/royforlinux/openocd-mcu-mcp/openocd-mcu-debug)<a href="https://agentmods.dev/skills/royforlinux/openocd-mcu-mcp/openocd-mcu-debug"><img src="https://agentmods.dev/badge/skills/royforlinux/openocd-mcu-mcp/openocd-mcu-debug.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.1 | $0.00081 | $0.01378 |
| Opus 5 | $0.00041 | $0.00689 |
| Sonnet 5 | $0.00016 | $0.00276 |
| Haiku 4.5 | $0.00008 | $0.00138 |
Grade A, and why
openocd-mcu-debug 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 6d 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 — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.
OpenOCD MCU Debug - 芯片探测与寄存器解读
连接目标 MCU 后,通过 OpenOCD 读取 CPU/芯片 ID,加载本地 SVD 文件,解读外设寄存器,并辅助 HardFault、挂死、外设、时钟、内存和 ELF 源码级调试。
前置要求
硬件操作依赖一个正在运行的 OpenOCD 会话。若当前环境已安装 openocd-mcu MCP,优先调用 MCP 工具;否则使用 scripts/openocd_client.py 连接默认 telnet 端口 4444:
python .\scripts\openocd_client.py connect
如果 OpenOCD 尚未启动,先读 openocd-debugging-workflow.md。
OpenOCD MCP
本技能带一个无第三方依赖的 stdio MCP server:
python .\tools\openocd-mcu-mcp\server.py
工具名:
connecthaltresumereset_haltregister_readregistersmemory_readmemory_writeraw_commandprobe_chipfind_svddecode_register
按用户要求,MCP 工具会真实执行 resume、reset_halt、memory_write 等操作,不再做二次确认拦截。脚本 CLI 仍保留确认参数,适合作为手工保护层。
核心流程
OpenOCD MCP connect 或 openocd_client.py connect/start
↓
halt
↓
probe_chip.py 读取 CPUID/DBGMCU/FICR/CSR
↓
find_svd.py 或 fetch_svd.py 找到 SVD
↓
openocd_client.py mdw 读取寄存器
↓
decode_register.py 按 SVD 位域解码
工作流路由
| 场景 | 参考流程 | 可执行工具 |
|---|---|---|
| 启动/连接 OpenOCD | openocd-debugging-workflow.md | scripts/openocd_client.py |
| 连接后识别芯片 | chip-probing-workflow.md | scripts/probe_chip.py |
| 查看/解读寄存器 | register-decoding.md | scripts/find_svd.py, scripts/decode_register.py |
| 芯片ID速查 | chip-id-reference.md | 人工核对表 |
| ELF符号/源码调试 | elf-debugging-workflow.md | scripts/elf_lookup.py |
芯片探测与寄存器
| 现象 | 诊断流程 | 核心策略 |
|---|---|---|
| HardFault/崩溃/异常 | hardfault-diagnosis.md | 读CFSR+栈回溯+Fault地址 |
| 程序挂死/跑飞/不响应 | hang-diagnosis.md | 多次PC采样+死循环定位 |
| 外设不工作 | peripheral-diagnosis.md | 时钟→GPIO→外设寄存器逐层排查 |
| 时钟/波特率异常 | clock-diagnosis.md | RCC时钟树分析+频率计算 |
| 栈溢出/内存踩踏 | memory-diagnosis.md | SP检查+栈canary+内存填充对比 |
What ships with it
19 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.
- agents/openai.yaml 276 B
- chip-id-reference.md 5.0 KB
- chip-probing-workflow.md 4.3 KB
- clock-diagnosis.md 3.9 KB
- elf-debugging-workflow.md 7.7 KB
- hang-diagnosis.md 5.0 KB
- hardfault-diagnosis.md 6.2 KB
- memory-diagnosis.md 4.9 KB
- openocd-debugging-workflow.md 5.5 KB
- peripheral-diagnosis.md 7.4 KB
- register-decoding.md 4.3 KB
- scripts/decode_register.py 6.9 KB runs code
- scripts/elf_lookup.py 4.7 KB runs code
- scripts/fetch_svd.py 2.7 KB runs code
- scripts/find_svd.py 2.0 KB runs code
- scripts/openocd_client.py 12 KB runs code
- scripts/probe_chip.py 5.2 KB runs code
- svd/README.md 341 B
- tools/openocd-mcu-mcp/server.py 10 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.
- 6d ago First seen · 114 lines · 81 tokens per session scan A 135e5275110e
openocd-mcu-debug is a skill published in the GitHub repository royforlinux/openocd-mcu-mcp (5 stars, last pushed 3mo ago), licensed MIT. It adds 81 tokens to every session and 1,378 once invoked, about $0.0004 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-31.
Other skills, from other repositories
embedded-debugger
Embedded hardware debugging workflow for probe-rs targets using embedded-debugger-mcp. Use when Codex or Claude Code needs to inspect debug probes, validate embedded debugger setup, start the MCP server, guide a user through ARM Cortex-M/RISC-V flashing/debugging/RTT workflows, or operate without installing an MCP…
embedded-debugging
Debug embedded firmware on real hardware through the jlink-mcp server — crashes, hangs, peripheral misconfiguration, silent devices. Covers loading ELF symbols for source-level backtraces, supplying an SVD for named peripheral fields, and the halt/read/resume discipline. Use whenever debugging a microcontroller over a…
kicad-review
Design review and validation workflow for KiCAD projects via MCP tools. Triggers on: "review my design", "check for errors", "audit", "DRC", "ERC", "find problems", "design review", "is this ready", "validate", "check my schematic", "check my PCB", "what's wrong", "run checks", "pre-fab review".
8051-mcu-debug
Use when debugging 8051-compatible microcontrollers, 51 MCU firmware, STC download issues, Keil C51 projects, interrupts, timers, UART, or startup failures.
cortex-m-debug
Use when debugging Cortex-M microcontrollers, firmware bring-up, SWD/JTAG sessions, faults, startup code, or flashing failures.
cortex-r5-debug
Use when debugging Cortex-R5 or Cortex-R firmware — TCM, MPU, caches, DFSR/DFAR aborts, exceptions, GIC/VIC interrupts, lockstep or split mode, ECC, or JTAG bring-up.