CA

claudius-ars/embedded-agent-skills

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

21 stars 质量 55 趋势 10MIT

Claude 代码:嵌入式系统开发代理技能。

概览

Claude 代码:嵌入式系统开发代理技能。 一个代理技能,负责为嵌入式平台分配和配置GPIO引脚。给定项目描述,它: 1. 检测目标平台及其变体 2.从28个设备配置文件数据库中查找设备需求 3.在避免冲突(闪存针脚、绑带引脚、外设组)的情况下分配GPIO引脚 4.根据电气和协议约束验证完整分配 5.生成平台特定配置文件(config.txt用于RPi,sdkconfig注释用于ESP32) 6.生成相应框架中的初始化代码 7.

概述(AI 翻译)

Claude 代码:嵌入式系统开发代理技能。

GPIO-config

一个代理技能,负责为嵌入式平台分配和配置GPIO引脚。给定项目描述,它:

  1. 检测目标平台及其变体
  2. 从28个设备配置文件数据库中查找设备需求
  3. 在避免冲突(闪存针脚、绑带针脚、外设组)的情况下分配GPIO引脚
  4. 验证完整分配是否符合电气和协议约束
  5. 生成平台特定的配置文件(RPi 的 config.txt 和 ESP32 的 sdkconfig 注释)
  6. 在适当的框架下生成初始化代码
  7. 提供带有安全警告的接线说明

支持的平台

平台 变体 框架
树莓派 树莓派 3,π 4,π 5,零 2W gpiozero,RPi.GPIO
ESP32 ESP32,ESP32-S2,ESP32-S3,ESP32-C3,ESP32-C6 Arduino,ESP-IDF

特色

  • 28个设备配置文件,涵盖传感器、显示器、通信模块和电机控制器
  • 20个RPi设备树叠加定义,带有冲突矩阵
  • **绑带引脚、闪光电压引脚(GPIO12/GPIO45)及启动模式影响的安全警告

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

embedded-agent-skills

Claude Code Agent Skills for embedded systems development.

gpio-config

An agent skill that handles GPIO pin assignment and configuration for embedded platforms. Given a project description, it:

  1. Detects the target platform and variant
  2. Looks up device requirements from a 28-device profile database
  3. Assigns GPIO pins while avoiding conflicts (flash pins, strapping pins, peripheral groups)
  4. Validates the full assignment against electrical and protocol constraints
  5. Generates platform-specific config files (config.txt for RPi, sdkconfig comments for ESP32)
  6. Generates initialization code in the appropriate framework
  7. Provides wiring notes with safety warnings

Supported Platforms

Platform Variants Frameworks
Raspberry Pi Pi 3, Pi 4, Pi 5, Zero 2W gpiozero, RPi.GPIO
ESP32 ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 Arduino, ESP-IDF

Features

  • 28 device profiles covering sensors, displays, communication modules, and motor controllers
  • 20 RPi device tree overlay definitions with conflict matrix
  • Safety warnings for strapping pins, flash voltage pins (GPIO12/GPIO45), and boot-mode implications
  • I2C address collision detection across 13 common address ranges
  • Cross-platform support with platform-appropriate pin numbers, function names, and code patterns
  • Variant-aware validation — ESP32-S3 allows GPIO6-11 (blocked on base ESP32), different strapping pin sets per variant

Protocols

I2C, SPI, UART, PWM, 1-Wire, ADC, CAN

Installation

git clone https://github.com/your-org/embedded-agent-skills.git
cd embedded-agent-skills

Usage

Example prompts for Claude Code with this skill installed:

"Set up a BME280 temperature sensor and SSD1306 OLED on a Raspberry Pi 4"
"Configure an ESP32-S3 with SPI LoRa, I2C OLED, and UART GPS"
"I want to use GPIO12 as a button on an ESP32 — is that safe?"

The skill will warn that GPIO12 is a strapping pin (MTDI) that sets flash voltage. If pulled HIGH at boot, it selects 1.8V which can damage 3.3V flash chips.

"Add a CAN bus with MCP2515 on SPI0 to my Pi 4 project"

Testing

cd embedded-agent-skills/gpio-config
python3 -m venv .venv
source .venv/bin/activate
pip install pytest
pytest tests/ -v

Expected: 94 tests passed across 5 modules.

Repository Structure

embedded-agent-skills/
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
└── embedded-agent-skills/
    └── gpio-config/
        ├── SKILL.md
        ├── assets/
        ├── references/
        │   ├── common-devices.md
        │   ├── electrical-constraints.md
        │   ├── protocol-quick-ref.md
        │   └── platforms/
        │       ├── esp32-pins.md
        │       ├── esp32-specifics.md
        │       ├── rpi-overlays.md
        │       └── rpi-pins.md
        ├── scripts/
        │   ├── generate_config.py
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add claudius-ars/embedded-agent-skills
新手?先看 mcpskill.org 教程 →