К основному содержанию
плагин

esp32-ai-agent-skill — плагин для Claude Code

Плагин для Claude, который подбирает чип ESP32, проверяет назначение GPIO и генерирует код под Arduino и ESP-IDF.

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add anthropics/claude-plugins-community
/plugin install esp32-ai-agent-skill@claude-community
Открыть на GitHub

Что делает esp32-ai-agent-skill

Плагин включается сам, когда вы работаете с проектом на ESP32. Он подгружает справочники по железу и прогоняет вашу распиновку через скрипты проверки, чтобы поймать ошибки до прошивки. Покрытие — 9 вариантов чипа: ESP32, S2, S3, C3, C6, C2, C5, H2, P4.

Проверка GPIO ищет то, на чём обычно и горят платы: страппинг-пины, конфликт ADC2 с активным Wi-Fi, пины, занятые флешем, выводы только на вход и пины, которых физически нет на модуле. Отдельно считается бюджет по току с предупреждением у предела 200 мА. Генерация кода идёт под Arduino (setup()/loop()) и ESP-IDF (app_main()) с правильной инициализацией шин.

Для работы нужен CLI Claude и Python 3.9+ — на нём написаны scripts/validate_pinmap.py и scripts/generate_config.py. Без Python скрипты не запустятся, и проверка распиновки останется только на справочниках. В комплекте также документация по LVGL с 8.2 по 9.5, распиновки 60+ плат Waveshare и 50 автотестов.

Какие задачи решает

  • выбрать чип ESP32 под задачу с Wi-Fi 6 или Zigbee
  • проверить распиновку до прошивки и не увести модуль в брик
  • сгенерировать инициализацию шин под Arduino или ESP-IDF
  • разобраться, чем отличается LVGL v8 от v9 и что брать для S3
  • найти распиновку конкретной платы Waveshare с LCD

Примеры запросов агенту

  • Мне нужно подключить BME280 и дисплей ST7789 к ESP32-S3 с Wi-Fi
  • Сгенерируй код инициализации ESP-IDF для моих пинов на ESP32-C6
  • Покажи распиновку платы Waveshare ESP32-S3 Touch LCD 4.3 inch

Как установить esp32-ai-agent-skill

Через маркетплейс плагинов

/plugin marketplace add anthropics/claude-plugins-community
/plugin install esp32-ai-agent-skill@claude-community

По шагам, с командами для каждой платформы: Плагины Claude Code: маркетплейсы, установка и как собрать свой

Вопросы о esp32-ai-agent-skill

Как установить esp32-ai-agent-skill в Claude Code?

Через маркетплейс: сначала /plugin marketplace add anthropics/claude-plugins-community, затем /plugin install esp32-ai-agent-skill@claude-community.

Что делает esp32-ai-agent-skill?

Подбирает вариант ESP32 под задачу, проверяет назначение GPIO на опасные ошибки и генерирует код под Arduino и ESP-IDF. Плюс справочники по LVGL и платам Waveshare.

Что нужно для работы плагина?

Установленный CLI Claude и Python 3.9+ — на нём работают скрипты проверки распиновки и генерации кода.

Исходный текст

SKILL.md · MIT
# ESP32

A Claude Code plugin for ESP32 embedded systems development. Provides expert-level chip selection, GPIO pin validation with anti-bricking safety checks, code generation for Arduino and ESP-IDF, and comprehensive reference documentation for LVGL and Waveshare hardware.

## Installation

```bash
claude /install-plugin https://github.com/ezrover/ESP32-AI-Agent-Skill
```

Or install from a local clone:

```bash
git clone https://github.com/ezrover/ESP32-AI-Agent-Skill.git
claude /install-plugin ./ESP32-AI-Agent-Skill
```

### Prerequisites

- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI installed
- Python 3.9+ (for validation and code generation scripts)

## Overview

Once installed, Claude automatically activates this plugin when you work on ESP32 projects. It loads hardware reference data on demand and uses validation scripts to prevent common mistakes that can damage hardware.

**What it covers:**

- **Chip selection** across 9 ESP32 variants (ESP32, S2, S3, C3, C6, C2, C5, H2, P4)
- **GPIO validation** that catches strapping pin traps, ADC2/Wi-Fi conflicts, flash pin violations, and input-only pin misuse
- **Code generation** for Arduino (`setup()`/`loop()`) and ESP-IDF (`app_main()`) with correct bus initialization
- **LVGL references** for versions 8.2 through 9.5 with API docs, widget catalogs, and migration guides
- **Waveshare board references** for 60+ dev boards and LCD displays with full pinout tables

## Usage

Ask Claude naturally about any ESP32 topic:

```
I need to wire a BME280 sensor and ST7789 display to an ESP32-S3 with WiFi
```

```
Generate ESP-IDF initialization code for my pin assignments on ESP32-C6
```

```
What changed between LVGL v8 and v9? Which version should I use with ESP32-S3?
```

```
Show me the pinout for the Waveshare ESP32-S3 Touch LCD 4.3 inch board
```

Claude will load the relevant reference files, validate your configuration, and generate working code.

### Validation Scripts

The plugin includes Python scripts that Claude invokes during its workflow. You can also run them directly:

```bash
# Validate a GPIO pin assignment
echo '{"platform":"esp32s3","pins":[{"gpio":21,"function":"I2C_SDA","protocol_bus":"i2c"}]}' \
  | python scripts/validate_pinmap.py

# Generate Arduino boilerplate
python scripts/generate_config.py input.json --framework arduino --format text

# Generate ESP-IDF boilerplate
python scripts/generate_config.py input.json --framework espidf --format text
```

### Input JSON Format

Both scripts accept the same JSON structure:

```json
{
  "platform": "esp32s3",
  "module": "WROOM",
  "wifi_enabled": true,
  "pins": [
    {
      "gpio": 21,
      "function": "I2C_SDA",
      "protocol_bus": "i2c",
      "device": "BME280",
      "pull": "external_up"
    },
    {
      "gpio": 22,
      "function": "I2C_SCL",
      "protocol_bus": "i2c",
      "device": "BME280",
      "pull": "external_up"
    }
  ]
}
```

## Supported Variants

| Variant | Validation | Code Gen | Reference Docs | Best For |
|---------|:----------:|:--------:|:--------------:|----------|
| ESP32   | Yes | Yes | Yes | Bluetooth Classic, legacy projects |
| ESP32-S2 | Yes | Yes | Yes | Ultra-low power, USB OTG/HID |
| ESP32-S3 | Yes | Yes | Yes | AI/ML, complex GUIs, cameras |
| ESP32-C3 | Yes | Yes | Yes | Budget IoT nodes (RISC-V) |
| ESP32-C6 | Yes | Yes | Yes | Wi-Fi 6, Matter/Thread, Zigbee |
| ESP32-C2 | - | - | Yes | Ultra-low-cost WiFi/BLE |
| ESP32-C5 | - | - | Yes | Wi-Fi 6 dual-band |
| ESP32-H2 | - | - | Yes | Zigbee/Thread hub (no WiFi) |
| ESP32-P4 | - | - | Yes | Multimedia, H.264, dual MIPI |

## Safety Checks

The plugin actively prevents these common hardware mistakes:

| Check | What It Catches |
|-------|----------------|
| **GPIO12 Flash Voltage Trap** | Pulling GPIO12 HIGH at boot sets flash to 1.8V, potentially bricking 3.3V modules |
| **ADC2/WiFi Conflict** | ADC2 pins are unavailable when WiFi is active on ESP32/S2/S3 |
| **Flash Pin Protection** | Blocks assignment of GPIO6-11 (ESP32), GPIO12-17 (C3), GPIO24-29 (C6), GPIO26-32 (S2/S3) |
| **Input-Only Pins** | Rejects output assignments to GPIO34-39 (ESP32) or GPIO46 (S2/S3) |
| **PSRAM Conflicts** | Blocks GPIO16-17 on WROVER modules |
| **Non-Exposed Pins** | Rejects pins not physically bonded on the module (GPIO20, 24, 28-31, 37, 38 on WROOM) |
| **Current Budget** | Warns when estimated GPIO current approaches the 200mA limit |

## Reference Documentation

The plugin includes structured reference docs that Claude loads on demand:

### ESP32 Hardware
- Per-variant GPIO pin databases with usability ratings
- Strapping pin behavior and boot mode implications
- Protocol quick reference (I2C, SPI, UART, PWM, 1-Wire, ADC, DAC)
- Electrical constraints (voltage levels, current limits, pull-up requirements)

### LVGL (v8.2 - v9.5)
- Per-version API references with function signatures
- Complete widget catalogs (32+ widgets in v8, 37 in v9.5)
- v8-to-v9 migration guide with 100+ renamed functions
- ESP32 integration guide with SPI display, I2C touch, PSRAM, and FreeRTOS setup

### Waveshare
- 60+ ESP32 dev board specs with GPIO pinout tables
- LCD display modules (SPI, I2C, parallel, round, e-paper)
- Display controller ICs (ST7789, ILI9341, GC9A01, etc.)
- Touch controller ICs (CST816S, GT911, FT6336, XPT2046)

## Plugin Structure

```
ESP32-AI-Agent-Skill/
├── .claude-plugin/
│   └── plugin.json           # Plugin metadata
├── skills/
│   └── esp32/
│       └── SKILL.md          # Main skill (auto-activates on ESP32 topics)
├── references/               # Loaded on demand by the skill
│   ├── platforms/            # GPIO databases, pin specifics
│   ├── esp32*/               # Per-variant spec sheets
│   ├── lvgl/                 # LVGL v8.2-v9.5
│   └── waveshare/            # Waveshare boards and displays
├── scripts/                  # Validation and code generation
│   ├── validate_pinmap.py
│   ├── generate_config.py
│   └── platforms/
└── tests/                    # 50 automated tests
```

## Testing

```bash
pip install pytest
python3 -m pytest tests/ -v
```

## Contributing

Contributions welcome. To extend the reference documentation:

- **New ESP32 variant**: Add `references/esp32-XX/specs.md`
- **New LVGL version**: Add `references/lvgl/vX.Y/README.md` and `api-reference.md`
- **New Waveshare board**: Add to the appropriate file in `references/waveshare/dev-boards/`
- **New display/touch controller**: Add to `references/waveshare/common/`

## Author

[ezrover](https://github.com/ezrover)

## License

MIT

© ezrover · MIT · ezrover/ESP32-AI-Agent-Skill

Похожие плагины

Все плагины по теме «Настройка агента: память, контекст, субагенты» →
esp32-wroom-38pin alexex1993 Скилл для прошивки 38-пиновых плат ESP32-WROOM-32: карта выводов, безопасные GPIO, ловушки флеш-пинов и IO0, рецепты кода. CX Codex +1 ★ 22звёзд репо esp32c6-touch-lcd147 alexex1993 Скилл для работы с платой Waveshare ESP32-C6-Touch-LCD-1.47: распиновка, дисплей JD9853, тач AXS5106L, PlatformIO и sdkconfig. Нужен, чтобы не ловить молчаливые ошибки на этой плате. CX Codex +1 ★ 22звёзд репо esp32-firmware-engineer adamlipecz Помогает писать, проверять и отлаживать прошивки ESP32 на ESP-IDF. При работе с железом сначала выясняет плату, вариант чипа и подключённые устройства. CX Codex +1 1 300установок ESP32 UI Library Development koradeh Промпт включает роль разработчика встраиваемых систем и ведёт ИИ через проектирование UI-библиотеки для ESP32 по заданному стеку. GP ChatGPT ★ 174 676звёзд репо arduino-code-generator wedsamuel1230 Генерирует код на C++ для плат UNO, ESP32 и RP2040: от опроса датчиков и устранения дребезга кнопок до конечных автоматов и сохранения в EEPROM. CX Codex +1 429установок arduino-project-builder wedsamuel1230 Собирает полный проект под Arduino из требований: прошивка, датчики, приводы, сеть, питание. Пригодится, когда нужен не сниппет, а рабочая заготовка. CX Codex +1 540установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой