esp-idf-skill

Generates ESP-IDF firmware code for ESP32 SoCs using verified recipes and API references.

28|3|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/JasonYANG170/esp-dev-skill --skill esp-idf-skill-jasonyang170
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: esp-idf-skill
Source: https://github.com/JasonYANG170/esp-dev-skill/tree/main/repos/esp-idf
Command: npx skills add https://github.com/JasonYANG170/esp-dev-skill --skill esp-idf-skill-jasonyang170

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing ESP-IDF firmware requires exact knowledge of initialization sequences, component dependencies, Kconfig options, and version-specific APIs; mistakes like missing NVS error handling or wrong Bluetooth startup order cause silent failures. This Skill grounds AI code generation in real ESP-IDF repository sources so generated firmware builds and runs correctly. ## Core Features & Use Cases - Scenario Recipes: 20 step-by-step recipes covering project creation, FreeRTOS tasks, GPIO/UART/I2C/SPI/LEDC/GPTimer peripherals, Wi-Fi STA/SoftAP/Mesh, Ethernet, BLE GATT Server/Client, Classic BT SPP/A2DP, BLE Mesh, NVS, partition tables, OTA, and deep sleep. - Verified API & Config References: Module-grouped function signatures, Kconfig quick reference, pitfall lists with WRONG/CORRECT examples, and an index of real ESP-IDF example paths. - Chip Support Matrix: Capability tables for ESP32, ESP32-S2/S3, ESP32-C2/C3/C5/C6/C61, ESP32-H2/H4/H21, and ESP32-P4. - Use Case: Ask the agent to create a BLE GATT server on ESP32-C3; it follows the fixed Bluedroid startup order, builds the attribute table via esp_ble_gatts_create_attr_tab, and outputs the correct CMakeLists dependencies and build commands. ## Quick Start Ask the agent to create an ESP-IDF project that connects an ESP32-S3 to Wi-Fi in STA mode and stores credentials in NVS.

Frequently Asked Questions about esp-idf-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new ESP-IDF project with correct CMake structure?

Copy the closest example from the ESP-IDF examples directory, keep the top-level CMakeLists.txt order of cmake_minimum_required, include project.cmake, then project(), and register sources in main/CMakeLists.txt with idf_component_register. Run idf.py set-target for your chip before building.

How do I implement a BLE GATT server on ESP32 with Bluedroid?

Follow the fixed startup order: NVS init, esp_bt_controller_init and enable with ESP_BT_MODE_BLE, esp_bluedroid_init_with_cfg and enable, then register callbacks and app. Define services with an esp_gatts_attr_db_t attribute table and create them via esp_ble_gatts_create_attr_tab.

Which ESP32 chips support Classic Bluetooth and which only BLE?

Classic Bluetooth features like SPP and A2DP are supported only on the original dual-mode ESP32. Chips such as ESP32-C3, ESP32-S3, ESP32-C6, and ESP32-H2 support BLE only, and ESP32-S2 has no Bluetooth at all.

Why does my ESP-IDF Wi-Fi code fail to connect?

Wi-Fi requires esp_netif_init and esp_event_loop_create_default before esp_wifi_init, plus registered WIFI_EVENT and IP_EVENT handlers. Also verify NVS is initialized with handling for ESP_ERR_NVS_NO_FREE_PAGES and that SSID and password are correct.

What partitions are required for ESP-IDF OTA updates?

OTA requires a partition table containing otadata plus at least two OTA app partitions such as factory with ota_0 and ota_1, or just ota_0 and ota_1. Use esp_ota_begin, esp_ota_write, esp_ota_end, then esp_ota_set_boot_partition before restarting.

When should I not use this ESP-IDF skill?

Do not use it for ESP8266 targets, which require the separate ESP8266_RTOS_SDK, or for Arduino-ESP32 projects whose APIs and component names differ. It also does not cover upper-layer frameworks like ESP-ADF or ESP-Matter, or hardware schematic design.