Skip to content
Skills Library
Programming · Automation

esp-idf-local-debug-handoff

/esp-idf-local-debug-handoff

Self-contained prompt for a LOCAL Hermes agent to debug/build ESP-IDF firmware (M5Stack Stick S3) on Windows. Use when the remote agent can't build (no ESP-IDF toolchain/space) and the user wants a local agent to run the error→fix→rebuild loop directly. Includes v6.0 environment activation (idf_cmd_init.bat) which is the critical gotcha.

Licence
MIT
Last repository change
17.07.2026

Assessment and security

98/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene13 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 17.07.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Self-contained prompt for a LOCAL Hermes agent to debug/build ESP-IDF firmware (M5Stack Stick S3) on Windows. Use when the remote agent can't build (no ESP-IDF toolchain/space) and the user wants a local agent to run the error→fix→rebuild loop directly. Includes v6.0 environment activation (idf_cmd_init.bat) which is the critical gotcha.

Original author description

Self-contained prompt for a LOCAL Hermes agent to debug/build ESP-IDF firmware (M5Stack Stick S3) on Windows. Use when the remote agent can't build (no ESP-IDF toolchain/space) and the user wants a local agent to run the error→fix→rebuild loop directly. Includes v6.0 environment activation (idf_cmd_init.bat) which is the critical gotcha.

How it works

  1. When to use
  2. CRITICAL: v6.0 environment activation
  3. The handoff prompt (copy verbatim to local Hermes)
  4. Pitfalls
  5. Verify
Original SKILL.md headings · 93 lines, 521 words
SKILL.md preview
---
name: esp-idf-local-debug-handoff
description: "Self-contained prompt for a LOCAL Hermes agent to debug/build ESP-IDF firmware (M5Stack Stick S3) on Windows. Use when the remote agent can't build (no ESP-IDF toolchain/space) and the user wants a local agent to run the error→fix→rebuild loop directly. Includes v6.0 environment activation (idf_cmd_init.bat) which is the critical gotcha."
---

# ESP-IDF Local Debug Handoff (Stick S3 firmware)

## When to use
- Remote Hermes can't build ESP-IDF (no toolchain, no disk space)
- User has ESP-IDF installed locally (Windows, v6.0.x via Espressif IDE)
- Build-debug loop should run on user's machine, not round-trip to remote

## CRITICAL: v6.0 environment activation
The Espressif IDE shortcut runs `idf_cmd_init.bat` first — this sets
`IDF_PATH`, `PATH`, and the Python venv. A bare `idf.py` in a fresh shell
fails ("command not found"). Each agent shell call is fresh, so you MUST
chain activation + build in ONE command:

```bat
call "C:\Espressif\idf_cmd_init.bat" && cd /d C:\hermes_plugins\esp-hermes\firmware && idf.py build
```

If the path differs, find it:
```bat
dir "C:\Espressif\idf_cmd_init.bat"
```

(v5 used `export.bat`; v6 renamed it to `idf_cmd_init.bat`.)

## The handoff prompt (copy verbatim to local Hermes)
```
Du debuggst den Firmware-Build von "esp-hermes" — M5Stack Stick S3 (ESP32-S3)
als Voice/IO-Client für den Hermes AI Gateway. Device verbindet per WebSocket
mit Gateway, capturet Audio, rendert Pet/TUI auf LCD, liest IMU-Gesten,
führt IO-Tool-Calls aus.

UMGEBUNG:
- OS: Windows, ESP-IDF v6.0.2 (Espressif IDE installiert)
- Pfad: C:\hermes_plugins\esp-hermes\firmware  (Repo: ohrbit/hermes_plugins, branch main)
- Du hast PowerShell/CMD-Zugriff. ESP-IDF-Env MUSS geladen werden:
  call "C:\Espressif\idf_cmd_init.bat" && cd /d C:\hermes_plugins\esp-hermes\firmware
  (jeder Build-Befehl braucht das Prefix — sonst "idf.py not found")

BUILD (ein Befehl):
  call "C:\Espressif\idf_cmd_init.bat" && cd /d C:\hermes_plugins\esp-hermes\firmware && idf.py build
  (falls "target not set": set-target esp32s3 voranstellen)

SCHON GEFIXT (nicht erneut anfassen):
- esp_websocket_client + espressif/cjson = Component-Manager-Deps in idf_component.yml
- i2c/ledc/uart/spi_flash in `driver` (kein eigenes REQUIRES)
- json(cJSON) in v6 entfernt -> #include <cjson/cJSON.h>, Dep espressif/cjson
- sdkconfig.defaults: FLASH 8MB (CONFIG_ESPTOOLPY_FLASHSIZE="8MB"),
  LOG level = int (3=INFO), keine ESP_WIFI_*-Symbole (kommen via NVS)
- partitions.csv: 8MB Flash (factory 3MB, storage ~5MB)
- ADC: neue esp_adc oneshot-API (adc1_get_raw in v5+ entfernt)

STICK-S3 PINMAP (nicht ändern außer begründet):
- LCD ST7789P3: MOSI=G39 SCK=G40 RS=G45 CS=G41 RST=G21 BL=G38
- IMU BMI270: SCL=G48 SDA=G47  (I2C addr 0x68)
- Audio ES8311: MCLK=G18 DOUT=G14 BCLK=G17 LRCK=G15 DIN=G16
- Buttons: KEY1=G11 (PTT) KEY2=G12 (mode toggle)

WICHTIG — STALE SDKCONFIG:
Bei Partition-Error "does not fit in configured flash size 2MB":
  del C:\hermes_plugins\esp-hermes\firmware\sdkconfig
  (dann rebuild — sdkconfig.defaults setzt nur Defaults für UNSET-Werte)

AUFGABE:
idf.py build ausführen. FÜR JEDEM Fehler:
1. echten Fehler aus Build-Output lesen (nicht raten)
2. relevantes File in firmware\main\ fixen
3. rebuild
4. wiederholen bis firmware.bin entsteht

CONSTRAINTS:
- esp_hermes.h = WS-Protokoll-Contract mit Gateway. Nur ändern wenn Build es erzwingt.
- Pin-Safety in io_tools.c (eh_pin_is_blocked) NICHT entfernen.
- Device = Gateway-CLIENT, kein LLM drauf. Dünn halten.
- v6-API-Kompatibilität Prio 1. LCD/ES8311/BMI270-Init aus Datasheet ->
  vermutlich erste echte Compile-Fehler dort.
- EDITIEREN LOKAL. Kein git commit/push ohne explizite Erlaubnis.
- Melde was du geändert hast.

WENN BUILD OK: firmware.bin Pfad + Größe nennen, verbleibende TODOs
(ungetestete HW-Init, stubbed Audio-Codec) auflisten.
```

## Pitfalls
- **Each shell is fresh** → always prefix with `call idf_cmd_init.bat && cd ...`
- **Stale sdkconfig** → delete it when flash-size/partition errors persist
- **v6 renames**: `export.bat`→`idf_cmd_init.bat`, `json`→`espressif/cjson`
- **Don't push** → keep user in control of the repo

## Verify
After local agent reports success, ask for the `firmware.bin` path + size,
then optionally commit via the safe-push script on the REMOTE agent side.

Versions

The database has no other skills named esp-idf-local-debug-handoff.

Database snapshot: 13.11.2026 · package version 0e43f259532e (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90esp32-esp-idf-version-pinning
    Use when designing, reviewing, debugging or validating esp idf version pinning for ESP32 firmware; apply target-specific constraints, failure analysis and measurable verification before release.
  • 100embedded-best-practices
    Embedded systems development best practices for ESP32, FreeRTOS, and ESP-IDF. Use when writing firmware code, reviewing implementations, or learning about embedded patterns.
  • 100esp-idf-integration
    Use when integrating, configuring, or debugging ESP-IDF projects, components, sdkconfig, partition tables, bootloader, NVS, Wi-Fi, BLE, FreeRTOS, flash, or peripherals
  • 90idf-version-regression-bisect
    Use when a previously stable ESP32 feature breaks after upgrading ESP-IDF, Arduino core, component or radio controller libraries. Establish target-specific constraints, evidence, failure analysis and measurable verification before release.
  • 95esp-idf-handling
    Complete ESP-IDF lifecycle: project setup, build, flash, monitor, and OTA. Automatically detects whether a testbench is available or the device is connected locally via USB. Covers sdkconfig, partition tables, esptool, RFC2217 remote flashing, GPIO download mode, OTA updates,…
  • 100expert-rmt5
    ESP-IDF v5.x RMT5 API expert for LED protocols, encoders, and multi-channel control. Use when working with RMT peripheral programming, LED strip control, or migrating from RMT4 to RMT5.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.