esp-debug

An ESP32 debugging assistant for investigating crashes, freezes, watchdog timeouts, memory problems, and malfunctioning peripherals. A watchdog timeout is a forced reset when a device task stops responding on time.

In plain words
What is it for?
Use it with crash logs, hangs, peripheral failures, memory issues, or Wi-Fi and Bluetooth problems to decode reports, inspect call paths, and suggest targeted checks.
Why use it?
It helps connect symptoms such as a crash log or unresponsive device to likely causes in the code, task scheduling, memory, wiring, or configuration.

Command

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.

agentmods
npx agentmods add commands/mathisk2095/jko-claude-plugins/esp-debug
Clone the repo
git clone --depth 1 https://github.com/mathisk2095/jko-claude-plugins
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 571 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00011 $0.00571
Opus 5 $0.00005 $0.00285
Sonnet 5 $0.00002 $0.00114
Haiku 4.5 $0.00001 $0.00057

Measured 2d ago against content hash d7fb6ee84be9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

plugins/esp32-cpp/commands/esp-debug.md · 70 lines

How it starts

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

ESP32 Debug Assistant

First: Use the esp32-expert skill. → Consult debugging reference for crash decoding, GDB commands, and the code inspection checklist.

Think like a field support engineer with a crashed device and only a serial log to work with. Find the root cause, not just the symptom.

Process

  1. Identify the problem type from $ARGUMENTS:

    • Crash log / Guru Meditation: Decode the backtrace and register dump
    • Watchdog timeout: Identify which task is blocked and why
    • Hang / freeze: Check for deadlocks, infinite loops, blocked tasks
    • Peripheral not working: Check wiring, configuration, timing
    • Memory issues: Check heap, fragmentation, stack overflow
    • WiFi/BLE issues: Check events, reconnection, signal strength
  2. For crash logs:

    • Identify the exception type (LoadProhibited, StoreProhibited, etc.)
    • Decode addresses to file:line using addr2line
    • Check for null pointer patterns (0x00000000)
    • Check if addresses are in IRAM, DRAM, flash, or peripheral space
    • Look at the backtrace to identify the call chain
  3. For hangs:

    • Suggest enabling task runtime stats (configGENERATE_RUN_TIME_STATS)
    • Check for potential deadlock scenarios (multiple mutexes)
    • Check for tasks waiting on empty queues or unavailable semaphores
    • Check Core 0 vs Core 1 affinity issues
  4. For peripheral issues:

    • Verify pin assignments match the target variant
    • Check if pins conflict with strapping pins or flash SPI
    • Verify voltage levels and pullups
    • Suggest bus scanning (I2C) or logic analyzer capture (SPI/UART)
    • Search for the device datasheet for timing requirements
  5. Provide the root cause and a fix, not just a workaround.

Output Format

## Diagnosis

### Symptom
[What the user reported]

### Root Cause
[Identified cause with evidence]

### Fix
[Concrete code changes or configuration changes]

### Prevention
[How to avoid this class of bug in the future]

Read the full file on GitHub · 70 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. 2d ago First seen · 70 lines · 11 tokens per session scan A d7fb6ee84be9

Subscribe to this mod's changes

esp-debug is a command published in the GitHub repository mathisk2095/jko-claude-plugins (3 stars, last pushed 3d ago), licensed MIT. It adds 11 tokens to every session and 571 once invoked, about $0.0001 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.