Embedded-AI-Harness: Skill for Claude Code

.claude/skills/testbench-debug/SKILL.md

testbench-debug is a skill for Claude Code from SensorsIot/Embedded-AI-Harness. It costs 106 tokens per session (5,424 once invoked), scanned C, original, MIT.

A setup for debugging ESP32 chips remotely with GDB, a program that lets developers pause and inspect running code. It connects the debugger through JTAG, a hardware debugging interface, using USB JTAG or an ESP-Prog adapter.

In plain words
What is it for?
Use it to set up breakpoints, inspect ESP32 programs, connect GDB, configure OpenOCD, and troubleshoot USB JTAG or ESP-Prog connections.
Why use it?
It removes the need to connect a debugger directly to the computer running GDB. It also helps diagnose connection problems and selects suitable OpenOCD settings, where OpenOCD is the program that communicates with the hardware probe.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is SensorsIot/Embedded-AI-Harness's own configuration. It tells Claude Code how to work on Embedded-AI-Harness itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Embedded-AI-Harness configures →

Reuse

Borrowing it

Nothing to install: this file belongs to SensorsIot/Embedded-AI-Harness. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/SensorsIot/Embedded-AI-Harness/main/.claude/skills/testbench-debug/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/SensorsIot/Embedded-AI-Harness

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 testbench-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/sensorsiot/embedded-ai-harness/testbench-debug/github.svg)](https://agentmods.dev/skills/sensorsiot/embedded-ai-harness/testbench-debug)
Your own site
<a href="https://agentmods.dev/skills/sensorsiot/embedded-ai-harness/testbench-debug"><img src="https://agentmods.dev/badge/skills/sensorsiot/embedded-ai-harness/testbench-debug/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 testbench-debug

Your own site · 80×15
<a href="https://agentmods.dev/skills/sensorsiot/embedded-ai-harness/testbench-debug"><img src="https://agentmods.dev/badge/skills/sensorsiot/embedded-ai-harness/testbench-debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,424 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 3 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00106 $0.05424
Opus 5.5 $0.00042 $0.02170
Sonnet 5.5 $0.00021 $0.01085
Haiku 4.5 $0.00011 $0.00542

Measured 2mo ago against content hash 1b912f2f5cbf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

testbench-debug scanned grade C with 3 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 2mo 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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

curl -X POST $TESTBENCH_URL/api/debug/stop -d '{}'

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo cp openocd-esp32/bin/openocd /usr/local/bin/openocd-esp32

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl $TESTBENCH_URL/api/devices
.claude/skills/testbench-debug/SKILL.md · 528 lines

How it starts

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

Testbench GDB Debugging

Remote GDB debugging of ESP32 devices through the testbench Pi. OpenOCD runs on the Pi, GDB connects from the container over TCP.

Architecture:

[Container]              [Pi (testbench)]           [ESP32]
  GDB ──── TCP :3333 ────── OpenOCD ──── USB JTAG ──────── CPU
                             (or)
                           OpenOCD ──── ESP-Prog ── JTAG pins

Three Approaches

Approach Chips Extra Hardware Serial During Debug
USB JTAG (FR-024) C3, S3 (native USB only) None Yes
Dual-USB (FR-025) S3 (two USB connectors) None Yes + app USB
ESP-Prog (FR-026) All ESP32 variants ESP-Prog (~$15) + cable Yes

Auto-Debug (Zero Config)

OpenOCD starts automatically when a device is plugged in or at boot. No API call needed.

How it works:

  1. Device hotplugged → serial proxy starts → auto-detect tries OpenOCD configs
  2. Chip identified via JTAG TAP ID → OpenOCD starts on the assigned GDB port
  3. If USB JTAG fails (e.g. classic ESP32), falls back to ESP-Prog probe if available
  4. GDB port reported in /api/devices response

Check debug status:

curl $TESTBENCH_URL/api/devices
# Look for: "debugging": true, "debug_chip": "esp32s3", "debug_gdb_port": 3335

Manual override (optional -- only needed to force-stop or force-start):

# Force stop (won't auto-restart until next hotplug)
curl -X POST $TESTBENCH_URL/api/debug/stop -d '{}'

# Force start with specific chip
curl -X POST $TESTBENCH_URL/api/debug/start \
  -d '{"chip": "esp32c3"}'

JTAG Reset (Preferred When Available)

When a debug session is active, the testbench automatically uses JTAG reset instead of DTR/RTS serial reset. This is transparent — the same /api/serial/reset API is used.

Why JTAG reset is better:

  • No USB re-enumeration (device node stays stable)
  • No flapping risk
  • No 2-second boot delay
  • Works even when serial port is unresponsive
  • Can halt the CPU to stop boot loops

Read the full file on GitHub · 528 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. 2mo ago First seen · 528 lines · 106 tokens per session scan C 1b912f2f5cbf

Subscribe to this mod's changes

testbench-debug is a skill published in the GitHub repository SensorsIot/Embedded-AI-Harness (273 stars, last pushed 20d ago), licensed MIT. It adds 106 tokens to every session and 5,424 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 3 findings (sends data to an external url, asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

hardware-logging

Debug firmware on a real board using hwlog structured serial logs. Use whenever working with ESP32/embedded firmware — flashing, testing on hardware, reading device output, or diagnosing crashes, reboots, or silent boards.

gurul/hardware-logging · 48 tokens

firmware-debugger

(oh-my-embedded) Firmware debugging via GDB and serial monitor. Breakpoints, memory inspection, stack traces, JTAG/SWD. Requires debug probe.

captainluzik/oh-my-embedded · 38 tokens

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…

Klievan/jlink-mcp · 77 tokens

m5stack-cap-lora-1262

Hardware reference and firmware helper for the M5Stack Cap LoRa-1262 (SKU U214) — a snap-on cap for the Cardputer Adv (K132-Adv) and CardputerZero that carries a Semtech SX1262 sub-GHz LoRa radio (868–923 MHz, +22 dBm TX, external RP-SMA antenna) and an ATGM336H-6N GNSS receiver (GPS/QZSS/BeiDou/Galileo/GLONASS, UART…

iot-forge/m5stack-skills · 254 tokens

nuedc

A workflow for solving China’s National Undergraduate Electronic Design Contest (TI Cup), from understanding a task to designing circuits, writing code, compiling, flashing, and debugging. It can generate wiring diagrams and support MCU, FPGA, simulation, and PCB work, but physical wiring, soldering, and instrument operation still need a person.

ProfYangShengXu/nuedc-skills · 65 tokens

new-device-skill

Build or update an M5Stack hardware skill in this marketplace — a Controller (a board that runs firmware, like Core2 or AtomS3), a Unit (a peripheral you drive from a Controller, like a ToF sensor or a relay), or a Chip (an Espressif SoC capability layer, like esp32-c6). Use whenever adding a new board/unit/chip to…

iot-forge/m5stack-skills · 171 tokens