/esp32-workbench:esp32-build-fixfrom ESP32 Workbench
Diagnoses and fixes ESP-IDF build, link, CMake/Kconfig, component-manager and flashing failures by classifying the error from build logs before making changes.
Ships in ESP32 Workbench. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Classify first, then make the smallest fix. Never "fix" a build by deleting configuration the user cares about.
If the esp32-workbench MCP server is connected, call its tools; otherwise run the
CLI. If esp32wb is not on PATH, use
uvx --from git+https://github.com/agodianel/esp32-claude-workbench esp32wb <args>.
Add --json for machine-readable output.
| Need | MCP tool | CLI |
|---|---|---|
| Classify build / flash output | build_log_triage | idf.py build 2>&1 | tee build.log; esp32wb build-log build.log (or ... | esp32wb build-log -) |
| App vs partition size | partition_check | esp32wb partitions partitions.csv --sdkconfig sdkconfig --bin build/<app>.bin |
| sdkconfig sanity | sdkconfig_review | esp32wb sdkconfig sdkconfig |
| Chip facts (toolchain, USB/strapping pins for download mode) | chip_info | esp32wb chip <target> |
| API changed / renamed? | search_esp_docs | esp32wb docs search "<symbol or error>" --target T |
Rerun with output captured (idf.py build 2>&1 | tee build.log). The first
error matters; later ones are usually cascades. Run esp32wb build-log build.log.
idf.py --version and the version the project expects (README, CI,
idf_component.yml dependencies.idf).CONFIG_IDF_TARGET in sdkconfig vs the board you have. A stale
sdkconfig from another target causes many confusing errors.managed_components update)?| Category | Signature | Usual fix |
|---|---|---|
| Missing header | fatal error: xyz.h: No such file or directory | Add the owning component to REQUIRES/PRIV_REQUIRES; in recent IDF v5.x releases drivers are split into esp_driver_* components (e.g. esp_driver_gpio, esp_driver_i2c) — driver still works as an umbrella |
| Linker | undefined reference to | Source not in SRCS, missing REQUIRES, C/C++ name mangling (extern "C"), Kconfig option disabling the feature |
| Duplicate symbol | multiple definition of | Function defined in a header without static inline, or same file compiled twice |
| Kconfig | 'CONFIG_X' undeclared | Option renamed/removed in this IDF version or not enabled; check sdkconfig and IDF migration guide |
| Component manager | Failed to resolve component, version solver errors | Fix idf_component.yml constraints; idf.py update-dependencies |
| API change after upgrade | implicit declaration, unknown type name | Follow the ESP-IDF migration guide (ADC → adc_oneshot, I2C → i2c_master driver, legacy timer/RMT/I2S drivers replaced) |
| Memory overflow | region 'iram0_0_seg' overflowed, dram0_0_seg overflow | Move code out of IRAM, reduce static buffers, enable PSRAM for large buffers |
| App too big | app partition is too small / partition check fails | Larger app partition or custom partitions.csv, -Os (CONFIG_COMPILER_OPTIMIZATION_SIZE), drop unused features |
| Target mismatch | static assertions, missing SoC symbols | idf.py set-target <target> (this regenerates sdkconfig) |
| Toolchain / env | xtensa-...-elf-gcc: not found, riscv32-esp-elf-gcc: not found, Python env errors | Re-run install.sh <target> / export.sh for the IDF version in use |
Details and examples: build failure playbook.
Read flash failure playbook for esptool errors
(Failed to connect, Wrong boot mode detected, No serial data received,
permission denied, invalid header boot loops after flashing). Download-mode entry
and the USB port differ per chip — check esp32wb chip <target> for the boot strapping
pins and USB-Serial-JTAG pins.
idf.py fullclean && idf.py build only
after the targeted fix, to prove it is not a stale-cache artifact).app_main reached.idf.py set-target and deleting sdkconfig discard local menuconfig changes.
Back up sdkconfig first and make sure sdkconfig.defaults captures what matters.idf.py erase-flash wipes NVS (Wi-Fi credentials, calibration, bonds). Ask first.What SKILL.md sets; muted values are Claude Code's defaults
11 skills in this plugin
/esp32-arch-reviewReviews ESP32 firmware architecture for FreeRTOS safety, memory and stack sizing, ISR rules, error handling, peripheral and pin safety, networking, storage, logging and build configuration, and returns a PASS / PASS WITH NOTES / FAIL report. Use when the user asks to "review the architecture", "code review this firmware", "is this RTOS-safe", "check for race conditions", "audit task stacks", "memory leak", "heap fragmentation", "stack overflow risk", "/arch-review", or before merging a significant ESP-IDF change or inheriting an existing ESP32 project./esp32-crash-reviewDecodes and analyses ESP32-family panics — Guru Meditation errors, register dumps, backtraces, aborts, stack overflows and watchdog timeouts on both Xtensa (ESP32, S2, S3) and RISC-V (C2, C3, C5, C6, H2, P4) chips — to find the root cause and recommend a fix plus diagnostic config. Use when the user pastes a crash or says "Guru Meditation", "LoadProhibited", "StoreProhibited", "InstrFetchProhibited", "IllegalInstruction", "Load access fault", "Store access fault", "MEPC", "MTVAL", "EXCVADDR", "Backtrace:", "abort() was called", "Stack canary watchpoint triggered", "Interrupt wdt timeout", "Task watchdog got triggered", "crash loop", "/review-crash", or "decode this backtrace".npx claudepluginhub agodianel/esp32-claude-workbench --plugin esp32-workbenchOther plugins' skills for the same job