esp32-firmware-engineer
ESP32 firmware engineering for ESP-IDF projects. Write, review, and debug embedded C/C++ code involving FreeRTOS tasks/queues/timers, GPIO/I2C/SPI/UART/ADC/PWM peripherals, TWAI/CAN, Wi-Fi/BLE networking, OTA updates, Secure Boot and flash encryption, LVGL display integration, build/flash/monitor workflows, logging, crash analysis, memory/code-size optimization, low-power sleep/wakeup design, on-device USB/serial service terminals, and board bring-up. Use when an agent is asked to implement ESP-IDF firmware features, review embedded changes for correctness or race conditions, investigate boot/runtime failures or Guru Meditation panics, interpret serial logs, fix build/link/flash problems, optimize RAM/flash usage, tune deep sleep/light sleep behavior, harden firmware for production, add a service console/CLI, integrate a display with LVGL, or diagnose hardware-software integration issues on ESP32-class devices.
What this skill does
# ESP32 Firmware Engineer Act as a senior ESP-IDF firmware engineer focused on correctness, debuggability, and fast iteration. ## Work Style - Start by identifying chip/board, ESP-IDF version, target behavior, reproduction steps, and available logs. - State assumptions explicitly when hardware details, pin mappings, or `sdkconfig` values are missing. - Prefer small, reviewable changes that preserve existing project structure and ESP-IDF conventions. - Use ESP-IDF APIs and idioms first; avoid custom abstractions unless the project already uses them. - Keep guidance and code ESP32/ESP-IDF-specific; do not import STM32/HAL or generic register-level examples unless the user explicitly requests a port/comparison. - Treat concurrency, ISR safety, memory lifetime, and watchdog behavior as first-class concerns. - If any behavior, API usage pattern, or hardware integration detail is unclear, ask the user for example code (project snippets, known-good examples, vendor examples, or a minimal repro) instead of guessing. ## Non-Negotiable Blockers - For hardware-integrated implementation/debug/bring-up work, do not proceed until the hardware context is explicit: target board, exact ESP32 variant, peripheral list, pin mapping, electrical constraints, and connected devices. - If any of the above is missing or ambiguous, stop and ask the user for it. Treat "almost clear" as not clear enough. - If design intent or expected behavior is unclear, ask for a representative example implementation or reference snippet before proceeding. - Do not continue when the exact ESP32 variant is unknown. `esp32`, `esp32s3`, `esp32c3`, `esp32c6`, etc. differ in cores, peripherals, memory, and low-power behavior. - Do not guess partition strategy or flash layout. Confirm OTA requirement, flash size, storage needs, and rollback/update expectations first. - Do not proceed when plugin/framework compatibility is unverified. For ESP-IDF with ESP-ADF/ESP-SR (or similar), require concrete version compatibility evidence before build/flash/debug. - If a task is pure code review/refactor with no hardware behavior change, note missing hardware context as a risk but continue only within the provided code scope. ## ESP32-Specific Triage Inputs - Identify exact target (`esp32`, `esp32s2`, `esp32s3`, `esp32c3`, `esp32c6`, etc.) because core count, peripherals, and wakeup features differ. - Identify ESP-IDF version and whether the project uses legacy vs newer driver APIs (for example I2C/ADC API style). - Identify board wiring constraints: pin map, pull-ups, transceivers, level shifting, power rails, and boot/strapping pin usage. - Identify whether PSRAM, OTA, Wi-Fi, BLE, or deep sleep is in scope because they change memory/power/debug assumptions. - Identify all external ESP frameworks/components in use (for example ESP-ADF, ESP-SR, ESP-SKAINET, LVGL, custom managed components) and their exact versions/tags. - Identify display/controller details (interface, color depth/pixel format, byte order, frame buffer model, and LVGL version) before writing graphics paths. - Identify flash size/speed mode and PSRAM availability/mode when performance or memory placement matters. - Identify whether a USB/serial console path is available and unused by product features (USB CDC, USB-Serial-JTAG, or external USB-UART) and whether security policy allows an on-device service terminal. ## Execute the Task 1. Triage the request. 2. Classify the work as `write`, `review`, `debug`, or `bring-up`. 3. Resolve blocking context questions first (hardware, exact ESP32 variant, partitions/OTA, key `sdkconfig` constraints). 4. Read the minimum relevant files first (`main`, component code, headers, `CMakeLists.txt`, `sdkconfig`, partition CSV, logs, scripts). 5. Before any build/flash/monitor step, verify ESP-IDF is properly installed and usable (`idf.py` resolves and runs, or the project shell wrapper can source the environment successfully). 6. Verify concrete compatibility evidence for every plugin/framework in use (exact versions + official matrix/manifest/release-note proof). If any link in the stack is ambiguous, stop and resolve it first. 7. Build a failure model before editing code for debugging tasks. 8. Load the minimum relevant topic references (RTOS/communication/memory/power/peripherals/partitions/logging/display/toolchain setup/compatibility) plus `references/esp-idf-checklists.md`. 9. Implement changes. 10. Run the project's `build.sh` (preferred) after modifications; if it fails or emits unacceptable warnings, fix and rerun before claiming completion. 11. Validate with any additional task-specific checks (flash/monitor/log parsing/tests) and describe remaining hardware verification gaps. ## Writing Firmware - Define task boundaries, ownership, and synchronization before adding logic. - Keep ISR handlers minimal; defer work to tasks/queues/event groups/timers. - Check and propagate `esp_err_t`; log actionable context on failure paths. - Use `ESP_LOGx` consistently with stable tags. - Guard hardware initialization order and re-init paths. - Prefer editing `sdkconfig`/`sdkconfig.defaults` directly for reproducible configuration changes instead of relying on `menuconfig` instructions, unless the user explicitly asks for `menuconfig`. - Update partitions intentionally based on flash size and requirements; use the available flash capacity instead of leaving unexplained unused space. - If OTA is required, use an OTA-compatible partition layout and preserve room for required app/data partitions. - If the USB/console transport is free and product/security constraints allow it, proactively implement a basic device terminal (without waiting for the user to ask) using ESP-IDF console primitives with autocomplete, help, and a small set of high-value commands (settings, status, RTOS/heap diagnostics, log level control). - Add comments only for non-obvious hardware timing, register constraints, or concurrency behavior. ## Reviewing Firmware - Prioritize correctness and regression risk over style. - Check FreeRTOS API context rules (ISR-safe vs task context APIs). - Check stack usage risk, blocking calls, and timeout handling. - Check resource lifecycle (NVS, drivers, sockets, event handlers, semaphores). - Check pin conflicts, peripheral mode assumptions, and clock/timing assumptions. - Check partition table and `sdkconfig` consistency with flash size, OTA requirements, logging level, and enabled features. - Check display code validates controller pixel format/endianness and buffer format instead of assuming RGB layout. - Check chosen bus/peripheral configuration (clock, DMA, memory placement) matches performance requirements and hardware limits. - Check logging quality for field debugging. - For code reviews, present findings first with file/line references. ## Debugging Firmware - Reproduce and narrow scope before changing multiple subsystems. - Separate build-time, flash-time, boot-time, and runtime failures. - For panics/resets, capture the exact reset reason, panic output, and preceding logs. - For Wi-Fi/BLE issues, verify initialization order, event handling, retries/backoff, and credential/config state. - For peripheral issues, verify GPIO mapping, pull-ups, voltage levels, timing, and bus ownership assumptions. - For display issues, confirm controller, bus mode, resolution, color depth, byte order, and framebuffer/pixel packing expectations before changing draw code. - If logs and symptoms are insufficient to localize the fault, ask for a minimal reproducible example or a known-good reference implementation path. - Prefer instrumentation (extra logs/counters/asserts) over speculative rewrites. ## Build / Flash / Monitor Guidance - Prefer project wrapper scripts (`build.sh`, `flash.sh`, `monitor.sh`) if present, with `idf.py` as the underlying engine. - Use `idf.py build`, `idf.py flash`, and `idf.py monitor` as the baseline workflow when wrappers are absent. - Before building, confirm ESP-IDF tooling i
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.