esp32-arduino-embedded-c

esp32-arduino-embedded-c is a skill for Claude Code, Codex from hamzabellouch/agent-skills. It costs 71 tokens per session (2,432 once invoked), scanned A, original, MIT.

A guide to programming ESP32 microcontrollers with Arduino and embedded C/C++. It covers firmware tasks, memory, interrupts, two-core coordination, and hardware peripherals.

In plain words
What is it for?
Use it when writing ESP32 firmware for sensors, motors, displays, wireless devices, or real-time control tasks.
Why use it?
It helps avoid timing bugs, unsafe interrupt code, memory problems, and concurrency issues in connected hardware.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when writing ESP32 firmware for sensors, motors, displays, wireless devices, or real-time control tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hamzabellouch/agent-skills/esp32-arduino-embedded-c
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.

Any agent
npx skills add hamzabellouch/agent-skills --skill esp32-arduino-embedded-c
Clone the repo
git clone --depth 1 https://github.com/hamzabellouch/agent-skills

Made for: Claude Code, Codex.

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 esp32-arduino-embedded-c

README.md
[![agentmods](https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/esp32-arduino-embedded-c/github.svg)](https://agentmods.dev/skills/hamzabellouch/agent-skills/esp32-arduino-embedded-c)
Your own site
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/esp32-arduino-embedded-c"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/esp32-arduino-embedded-c/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 esp32-arduino-embedded-c

Your own site · 80×15
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/esp32-arduino-embedded-c"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/esp32-arduino-embedded-c.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,432 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00071 $0.02432
Opus 5 $0.00036 $0.01216
Sonnet 5 $0.00014 $0.00486
Haiku 4.5 $0.00007 $0.00243

Measured 9d ago against content hash 6a397428375a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

esp32-arduino-embedded-c 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 9d 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.

Embedded Systems and IoT/esp32-arduino-embedded-c/SKILL.md · 230 lines

How it starts

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

ESP32 Arduino & Embedded C/C++ Production Guidelines

This skill provides architecture patterns, memory management guidelines, hardware interrupt safety rules, and production code patterns for high-reliability ESP32 embedded applications using Arduino / ESP-IDF C++.


1. Core Architecture & Multi-Core Strategy

1.1 Dual-Core Pinning & Priority Allocation

ESP32 (dual-core Xtensa LX6/LX7) splits responsibilities across Core 0 (PRO_CPU) and Core 1 (APP_CPU):

  • Core 0: Reserved primarily for Wi-Fi, Bluetooth, TCP/IP stack, and system tasks managed by ESP-IDF.
  • Core 1: Dedicated to application logic, sensor polling, motor control, display UI, and real-time DSP.
  Core 0 (PRO_CPU)                     Core 1 (APP_CPU)
+-----------------------+            +-----------------------+
| WiFi / Bluetooth Task |            | App Logic / Sensor    |
| TCP/IP Stack          |            | Data Processing Task  |
| System Watchdog WDT   |            | Real-time Control Task|
+-----------------------+            +-----------------------+
            ^                                    ^
            |       FreeRTOS Queue / EventGroup  |
            +------------------------------------+
  • Task Priorities: FreeRTOS priorities range from 0 (lowest, idle) to configMAX_PRIORITIES - 1 (highest, typically 24).
    • Real-time hard timing tasks: Priority 18 - 22
    • I/O & Sensor Polling: Priority 10 - 15
    • Network & Telemetry tasks: Priority 5 - 8
    • Background/Idle tasks: Priority 1 - 3

1.2 Task Stack & Watchdog Timers (WDT)

  • Task Watchdog Timer (TWDT): Monitors tasks for starvation or deadlocks. Any task pinned to a core executing a loop must either block (vTaskDelay(), xQueueReceive()) or trigger esp_task_wdt_reset().
  • Never use blocking delay() from Arduino in FreeRTOS tasks — use vTaskDelay(pdMS_TO_TICKS(ms)) or vTaskDelayUntil().

2. Real-Time Memory Management

2.1 Dynamic Allocation Hazards

In embedded real-time systems, heap allocation (malloc, new, std::string, std::vector, Arduino String) causes:

  1. Heap Fragmentation: Repeated allocations of varying sizes leave non-contiguous small gaps, leading to runtime Out of Memory (OOM) crashes after days/weeks of continuous operation.
  2. Nondeterministic Execution: Heap allocation time depends on current heap topology, violating hard real-time guarantees.

Read the full file on GitHub · 230 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. 9d ago First seen · 230 lines · 71 tokens per session scan A 6a397428375a

Subscribe to this mod's changes

esp32-arduino-embedded-c is a skill published in the GitHub repository hamzabellouch/agent-skills (4 stars, last pushed 1mo ago), licensed MIT. It adds 71 tokens to every session and 2,432 once invoked, about $0.0004 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-09-03.