espforge-create-device

Implements new ESP32 device drivers for the espforge Rust framework.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/mohankumargupta/skills --skill espforge-create-device-mohankumargupta
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: espforge-create-device
Source: https://github.com/mohankumargupta/skills/tree/main/espforge-create-device
Command: npx skills add https://github.com/mohankumargupta/skills --skill espforge-create-device-mohankumargupta

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, curl, cargo-info, tiged, and includes scripts (resource) and references (resource) components.

What problem does it solve? Adding a new sensor, display, or peripheral to the espforge ESP32 framework requires coordinated changes across a no_std runtime crate and a host-side code-generation crate, plus YAML examples and compile verification. This Skill guides that entire workflow so nothing is missed. ## Core Features & Use Cases - Dual-crate driver implementation: Creates the no_std runtime wrapper in espforge_devices and the DevicePlugin code generator in espforge_devices_builder, with correct feature flags and module registration. - Driver strategy evaluation: Decides between wrapping an external embedded-hal v1 crate or writing an in-tree driver, using scripts that query crates.io for dependency and async/blocking compatibility. - Reference-backed patterns: Ships canonical I2C (SSD1306), SPI+GPIO (ILI9341), and optional-config (FT6206) templates, plus decision guides for delay handling, init patterns, and common compile errors. - Use Case: Ask to add a BMP180 pressure sensor to espforge; the Skill inspects the chosen crate, writes the runtime device and builder plugin, generates a YAML example, and verifies with cargo build. ## Quick Start Add the bmp180 sensor to espforge using the crate documented in bmp180_api.md and compile the result.

Frequently Asked Questions about espforge-create-device

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

FAQPage Schema
How do I add a new sensor driver to espforge?▼

Create a no_std device wrapper in espforge_devices, a DevicePlugin in espforge_devices_builder, register both modules, add the Cargo feature, and write a YAML example. The Skill walks through each file with templates for I2C, SPI, and GPIO devices.

How do I check if a Rust crate works with embedded-hal v1?▼

Use the included check_crate.sh or findcrates.sh scripts, which query the crates.io API and report whether a crate depends on embedded-hal v1.x and embedded-hal-async. Trait bounds in the crate source are the most reliable signal.

Does espforge support async device drivers?▼

The runtime wrappers are built on blocking embedded-hal traits, but the Skill includes an async guide for detecting whether a crate exposes blocking or async APIs. Execution model is determined by trait bounds and module structure, not crate naming.

Why does my espforge device fail with 'Unknown device driver'?▼

This error means the plugin name attribute does not match the YAML using value, or the module is missing from espforge_devices_builder's lib.rs. Verify both the #[plugin(name)] attribute and the pub mod registration.

When should I write an in-tree driver instead of wrapping a crate?▼

Write an in-tree driver when no crate exists, the crate uses an older embedded-hal version, or it lacks no_std support. Port the register logic from the ESPHome C++ source and conversion manifests directly into espforge-runtime.