openocd

openocd is a skill for Claude Code from zhinkgit/embeddedskills. It costs 247 tokens per session (4,414 once invoked), scanned A, original, MIT.

A toolkit for programming and debugging microcontrollers through hardware probes such as ST-Link or CMSIS-DAP. OpenOCD can act as a GDB Server, allowing a debugger to inspect source code, registers, memory, breakpoints, and program execution.

In plain words
What is it for?
Use it to detect probes, flash or erase firmware, start a GDB Server, reset and control a target, debug through Telnet or GDB, inspect registers and memory, set breakpoints, and capture Semihosting or ITM output.
Why use it?
It combines firmware flashing, flash erasing, reset control, live debugging, and output capture in one workflow. This helps investigate both software behavior and low-level device state.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to detect probes, flash or erase firmware, start a GDB Server, reset and control a target, debug through Telnet or GDB, inspect registers and memory, set breakpoints, and capture Semihosting or ITM output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhinkgit/embeddedskills/openocd
Install

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.

Any agent
npx skills add zhinkgit/embeddedskills --skill openocd
Clone the repo
git clone --depth 1 https://github.com/zhinkgit/embeddedskills

Made for: Claude Code.

Wrote 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.

agentmods badge for openocd

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhinkgit/embeddedskills/openocd/github.svg)](https://agentmods.dev/skills/zhinkgit/embeddedskills/openocd)
Your own site
<a href="https://agentmods.dev/skills/zhinkgit/embeddedskills/openocd"><img src="https://agentmods.dev/badge/skills/zhinkgit/embeddedskills/openocd/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for openocd

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhinkgit/embeddedskills/openocd"><img src="https://agentmods.dev/badge/skills/zhinkgit/embeddedskills/openocd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 247 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,414 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 19 Nov 2026
  • Snyk warn 27 Nov 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00247 $0.04414
Opus 5.5 $0.00099 $0.01766
Sonnet 5.5 $0.00049 $0.00883
Haiku 4.5 $0.00025 $0.00441

Measured 4d ago against content hash 34cf435b2d1a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

openocd 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.

The scan reads SKILL.md. This mod also ships 7 executable files (scripts/openocd_gdb_common.py, scripts/openocd_gdb.py, scripts/openocd_itm.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

openocd/SKILL.md · 351 lines

How it starts

The opening of the file, as written. The whole thing — 351 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenOCD 下载与调试

本 skill 提供 OpenOCD 的探针探测、固件烧录、Flash 擦除、GDB Server 启动、目标复位、 Telnet 在线调试、GDB 源码级调试和 Semihosting 输出捕获能力。

运行依赖

Windows 或 Linux,Python 3.10+、OpenOCD、目标和适配器配置。源码调试需要对应的 GDB。

配置

环境级配置(skill/config.json)

skill 目录下的 config.json(可按需从 config.example.json 复制创建)包含环境级配置(工具路径、端口号等),工具未加入 PATH 时可在此配置 exe:

{
  "exe": "openocd",
  "scripts_dir": "",
  "gdb_port": 3333,
  "telnet_port": 4444,
  "gdb_exe": "",
  "operation_mode": 1
}
  • exe:openocd.exe 路径或命令名(必填)
  • scripts_dir:OpenOCD 配置脚本目录,为空时使用 OpenOCD 内置路径
  • gdb_port:GDB Server 端口,默认 3333
  • telnet_port:Telnet 端口,默认 4444
  • gdb_exe:arm-none-eabi-gdb 路径,GDB 调试子命令(run/backtrace/locals)需要
  • operation_mode:1 直接执行 / 2 输出风险摘要但不阻塞 / 3 执行前确认

工程级配置(.embeddedskills/config.json)

board/interface/target 等工程参数统一在工作区的 .embeddedskills/config.json 中管理:

{
  "openocd": {
    "board": "",
    "interface": "interface/stlink.cfg",
    "target": "target/stm32f4x.cfg",
    "adapter_speed": "4000",
    "transport": "swd",
    "tpiu_name": "stm32f4x.tpiu",
    "traceclk": "168000000",
    "pin_freq": "2000000"
  }
}
  • board:board 配置(如 board/stm32f4discovery.cfg),优先级高于 interface+target
  • interface:interface 配置(如 interface/stlink.cfg)
  • target:target 配置(如 target/stm32f4x.cfg)
  • adapter_speed:调试速率 kHz
  • transport:传输协议(swd/jtag)
  • tpiu_name / traceclk / pin_freq:ITM/SWO 观测所需的 TPIU 参数

工程参数依次读取 CLI、工程配置和本 Skill 的状态。工具路径依次读取 CLI、本机配置和 PATH。

成功执行后,确认过的参数会自动写回工程配置。

子命令

基础操作

子命令 用途 风险
probe 验证 board 或 interface+target 组合,探测目标连通性 低
flash 烧录固件(.elf / .hex / .bin) 高
erase 擦除目标 Flash 高
reset / reset-init 复位目标芯片 高
targets / flash-banks / adapter-info 查询底层 target / flash / adapter 信息 低
raw 执行受控 OpenOCD 原生命令 高

GDB Server

子命令 用途 风险
gdb-server 启动 GDB Server,保持运行等待 GDB 连接 低
gdb backtrace/locals 快捷获取调用栈和局部变量 低
gdb break/continue/next/step/finish/until one-shot 执行流控制 低
gdb frame/print/watch/disassemble/threads/crash-report one-shot 源码级诊断 低

Read the full file on GitHub · 351 lines

Changes

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.

  1. 4d ago Changed 34cf435b2d1a
  2. 12d ago Changed · +4 lines fd17c8a75785
  3. 3mo ago First seen · 347 lines · 247 tokens per session scan A 3fac6ece22de

Subscribe to this mod's changes

openocd is a skill published in the GitHub repository zhinkgit/embeddedskills (821 stars, last pushed 5d ago), licensed MIT. It adds 247 tokens to every session and 4,414 once invoked, about $0.0010 per session on Opus 5.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.

Related

openocd compared with skills from other repositories

openocd next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
openocdzhinkgit/embeddedskillsSkill8215d agoMITA247Claude Code
mastra-apiliatrio-labs/ai-promptsSkill62mo agoApache-2.0A80Claude Code, Codex
d3kvercel-labs/dev3000Skill1.6k12d agoMITA54Codex
devtools-bidirectionalTanStack/devtoolsSkill519todayMITA59Claude Code, Codex
devtools-instrumentationTanStack/devtoolsSkill519todayMITA64Claude Code, Codex
review-agent-harnessmajiayu000/spellbookSkill301yesterdayMITA90Codex
codex-agentmajiayu000/spellbookSkill301yesterdayMITA45Claude Code