Logo di Esp32 Arch Review

Esp32 Arch Review

Community
agodianel
esp32-arch-review

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

Panoramica

Pubblicato daagodianel
Repositoryesp32-claude-workbench
Nome della skillesp32-arch-review
Stelle
81
Fork
7
File inclusi
2
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 2

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da agodianel su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Esp32 Arch Review in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/agodianel/esp32-claude-workbench/tree/main/skills/esp32-arch-review
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/agodianel/esp32-claude-workbench.git /tmp/esp32-claude-workbench
mkdir -p .claude/skills
cp -r /tmp/esp32-claude-workbench/skills/esp32-arch-review .claude/skills/esp32-arch-review
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Esp32 Arch Review in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Esp32 Arch Review non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Esp32 Arch Review non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

ESP32 Architecture Review

Structured, evidence-based review of embedded-specific correctness. Read-only unless the user asks for fixes (fixes then go through an implementation contract).

Tools

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.

NeedMCP toolCLI
All static checks (pins, stacks, sdkconfig, partitions)project_doctoresp32wb doctor . [--target T]
Undersized task stacksstack_checkesp32wb stacks .
GPIO conflicts for the real chippin_auditesp32wb pins .
Risky / debug sdkconfig optionssdkconfig_reviewesp32wb sdkconfig sdkconfig
Partition table sanitypartition_checkesp32wb partitions partitions.csv --sdkconfig sdkconfig
API / peripheral behaviour questionssearch_esp_docsesp32wb docs search "<query>" --target T

Start with esp32wb doctor . and paste its summary into the report; then do the manual checklist below for what static tools cannot see.

Review checklist

Mark each item OK, ISSUE, or N/A, with file:line evidence for every ISSUE.

1. FreeRTOS safety

  • Every task has an explicit stack size. In ESP-IDF the stack argument is in bytes (not words). Guide: ≥2048 simple, ≥4096 with Wi-Fi/BLE/printf-heavy code, ≥8192 for TLS — verify with high-water marks, not guesses.
  • No blocking calls in ISRs; only *FromISR APIs; portYIELD_FROM_ISR used.
  • ISRs that run while flash cache is disabled are IRAM_ATTR and touch only DRAM data.
  • Shared state protected by mutexes (priority inheritance), not by disabling interrupts.
  • Spinlock critical sections (portENTER_CRITICAL) are very short (no logging, no allocation).
  • No busy loops without blocking; taskYIELD() not vTaskDelay(0).
  • Core affinity deliberate and valid for the target's core count (dual-core: classic ESP32, S3, P4; S2 and the C/H series are single-core) — pin only to cores that exist, or use tskNO_AFFINITY.
  • Bounded timeouts on queues/semaphores where a hang would be a bug.
  • Task watchdog: long operations feed it or are restructured.

2. Memory

  • No large stack buffers (> 512 bytes) — heap or static instead.
  • Every allocation checked for NULL; freed on all error paths.
  • DMA buffers from heap_caps_malloc(..., MALLOC_CAP_DMA) (PSRAM is generally not DMA-capable for all peripherals — check the peripheral docs for the target).
  • No allocation in ISRs.
  • Free heap and minimum free heap logged/monitored; fragmentation considered for long-running devices.
  • See the memory review playbook for diagnostics.

3. Error handling

  • Every esp_err_t checked; ESP_ERROR_CHECK() only for fatal init.
  • Runtime errors logged with esp_err_to_name() and handled (retry, degrade, reset state).
  • Network operations retry with exponential backoff.
  • Resources released on failure paths.

4. Peripherals and pins

  • esp32wb pins . has no errors for the configured target.
  • Pin map documented (pin_map.h or header comment) and matches code.
  • I2C/SPI bus recovery and timeouts exist.
  • ADC use respects the chip's ADC2/Wi-Fi behaviour (esp32wb chip <target>).
  • Drivers use the API generation matching the ESP-IDF version (e.g. new I2C master driver vs legacy driver/i2c.h — do not mix both in one bus).

5. Networking

  • Wi-Fi/IP event handlers registered before esp_wifi_start().
  • Reconnect with backoff; disconnect reason logged.
  • TLS server verification enabled (no skip-verify in production).
  • Socket/HTTP timeouts set; DNS failures handled.
  • Wi-Fi + BLE coexistence enabled when both radios are used.

6. Persistent storage

  • NVS namespaces per component; ESP_ERR_NVS_NO_FREE_PAGES / ESP_ERR_NVS_NEW_VERSION_FOUND handled at init.
  • First-boot defaults when keys are missing.
  • Partition table matches flash size and OTA scheme (esp32wb partitions).
  • Filesystem (SPIFFS/LittleFS/FAT) mount errors handled.

7. Logging

  • Correct levels; verbose output at D/V.
  • No secrets in logs.
  • Tags match component names; boot sequence traceable.

8. Build configuration

  • CONFIG_IDF_TARGET matches the hardware.
  • sdkconfig.defaults captures every non-default setting (not only a committed sdkconfig).
  • Component REQUIRES/PRIV_REQUIRES complete and minimal.
  • esp32wb sdkconfig shows no debug-only options in release configs.

Report

markdown
# Architecture Review — <project> (target: <chip>, ESP-IDF <ver>)
## Verdict: PASS | PASS WITH NOTES | FAIL
## Tool output
(esp32wb doctor summary)
## Critical issues (must fix before merge)
- [file:line] issue — why it matters — suggested fix
## Warnings
## Recommendations
## Checklist results
## Not reviewed / unknowns

FAIL if any critical issue exists (ISR misuse, unchecked allocation in a hot path, flash/PSRAM pin use, missing TLS verification, stack overflow evidence).

Rules

  • Evidence for every finding; no generic advice without a location.
  • Do not state chip limits from memory — cite esp32wb chip or Espressif docs.
  • Recommendations that change code require an implementation contract first.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Esp32 Arch Review?

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

Perché usare Esp32 Arch Review su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Esp32 Arch Review è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Esp32 Arch Review in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/agodianel/esp32-claude-workbench/tree/main/skills/esp32-arch-review. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Esp32 Arch Review?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Esp32 Arch Review?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Esp32 Arch Review: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Esp32 Arch Review è gratuita?

Sì. È pubblicata su GitHub da agodianel con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇