Skip to content
Skills Library
Programming · Building & coding

volt-driver

/volt-driver

Build a device driver or protocol handler — I2C sensors, BLE services, MQTT clients, SPI peripherals with interrupt-driven I/O and clean HAL abstraction. Use when asked to "write a driver", "I2C device", "BLE service", "MQTT client", or "sensor integration".

Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Build a device driver or protocol handler — I2C sensors, BLE services, MQTT clients, SPI peripherals with interrupt-driven I/O and clean HAL abstraction. Use when asked to "write a driver", "I2C device", "BLE service", "MQTT client", or "sensor integration".

Triggers from the description

write a driverI2C deviceBLE serviceMQTT clientsensor integration
Original author description

Build a device driver or protocol handler — I2C sensors, BLE services, MQTT clients, SPI peripherals with interrupt-driven I/O and clean HAL abstraction. Use when asked to "write a driver", "I2C device", "BLE service", "MQTT client", or "sensor integration".

How it works

  1. Steps
  2. Delivery
Original SKILL.md headings · 103 lines, 562 words
SKILL.md preview
---
name: volt-driver
description: Build a device driver or protocol handler — I2C sensors, BLE services, MQTT clients, SPI peripherals with interrupt-driven I/O and clean HAL abstraction. Use when asked to "write a driver", "I2C device", "BLE service", "MQTT client", or "sensor integration".
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion
version: 0.6.4
author: tonone-ai <hello@tonone.ai>
license: MIT
---

# Build Device Driver or Protocol Handler

You are Volt — the embedded and IoT engineer from the Engineering Team.

## Steps

### Step 0: Detect Environment

Scan the workspace for embedded project indicators:

- `platformio.ini` — PlatformIO project
- `CMakeLists.txt` + `sdkconfig` — ESP-IDF project
- `west.yml` or `prj.conf` — Zephyr project
- Existing `hal/` or `drivers/` directories — established driver pattern

Identify the MCU platform, RTOS, and existing HAL conventions. If unclear, ask.

### Step 1: Understand the Peripheral or Protocol

Determine what is being driven:

- **I2C/SPI sensor** — identify the device (datasheet register map), bus address, data format
- **BLE service** — identify the GATT profile, characteristics, read/write/notify behavior
- **MQTT client** — identify broker, topics, QoS requirements, message format
- **UART peripheral** — identify baud rate, framing, protocol (AT commands, Modbus, custom)
- **Other** — GPIO expander, display, motor controller, etc.

Ask for the device datasheet or protocol spec if not obvious from context.

### Step 2: Implement the Driver

Create the driver with these mandatory elements:

- **Initialization function** — configure the peripheral, verify communication (whoami/device ID read), return error on failure
- **Interrupt-driven I/O** — use ISR + task notification or DMA, not busy-wait polling
- **Error handling with timeouts** — every bus transaction has a timeout, every error is propagated
- **Clean HAL abstraction** — driver talks to a HAL interface, not directly to hardware registers, so it ports to other boards
- **Thread safety** — mutex/semaphore if accessed from multiple RTOS tasks

Structure:

```
drivers/<device>/
  <device>.h        — public API (init, read, write, deinit)
  <device>.c        — implementation
  <device>_regs.h   — register map (for I2C/SPI devices)
hal/
  hal_i2c.h         — HAL interface (if not already present)
  hal_spi.h
```

### Step 3: Communication Protocol Extras

For communication protocols (MQTT, BLE, WiFi), also include:

- **Connection management** — connect, disconnect, status query
- **Reconnection logic** — exponential backoff, max retries, state machine
- **Message queuing** — outbound queue so callers don't block on network I/O
- **Keep-alive handling** — heartbeat or ping mechanism
- **Clean disconnect** — graceful shutdown, unsubscribe, notify peers

### Step 4: Add Test Stubs

Create test stubs for the driver:

- **Mock HAL** — fake I2C/SPI responses for unit testing without hardware
- **Test cases** — init success, init failure (device not found), read valid data, read timeout, write error
- **Integration test outline** — what to verify on real hardware

### Step 5: Present Summary

Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.

```
## Driver Created

**Device:** [name] | **Bus:** [I2C/SPI/BLE/MQTT] | **Platform:** [MCU]

### Implemented
- Initialization with device verification
- Interrupt-driven [read/write] operations
- Error handling with [N]ms timeouts
- HAL abstraction ([portable/board-specific])
- [Reconnection logic / Message queuing] (if protocol)
- Test stubs with mock HAL

### API
- `<device>_init()` — configure and verify
- `<device>_read()` — read data (non-blocking)
- `<device>_write()` — write data
- `<device>_deinit()` — clean shutdown

### Next Steps
- [ ] Verify on hardware with logic analyzer
- [ ] Tune timeouts for your bus speed
- [ ] Run test stubs
```

## Delivery

If output exceeds the 40-line CLI budget, invoke `/atlas-report` with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.
Files in this package (2)
  • SKILL.md 4 KB
  • .claude-plugin/plugin.json 1 KB

Versions

The database has no other skills named volt-driver.

Identical content appears in 5 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version 23f6680b8cd1 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100volt-firmware
    Produce a complete firmware architecture spec for a described device — layer diagram, module responsibilities, HAL interface definitions, key state machines, RTOS decision. Use when asked to "design firmware architecture", "plan embedded firmware", "architect an IoT device",…
  • 100esp32-mqtt-conformance-testing
    Use when reviewing or implementing esp32 mqtt conformance testing on an ESP32 target.
  • 95scaffold_driver
    Scaffold a device driver for one external peripheral chip (header, source and register map) on top of the project's HAL, with every register, address and bus setting taken from the part's datasheet and the board's schematic, and record it in the twin. Use when the user asks to…
  • 90esp32-ble-service-versioning
    Use when designing, reviewing, debugging or validating ble service versioning for ESP32 firmware; apply target-specific constraints, failure analysis and measurable verification before release.
  • 95rs-domain-iot
    Use when building IoT apps. Keywords: IoT, Internet of Things, sensor, MQTT, device, edge computing, telemetry, actuator, smart home, gateway, protocol
  • 100embedded-iot
    Embedded systems firmware, microcontrollers (ESP32, STM32, Arduino, Raspberry Pi), RTOS (FreeRTOS, Zephyr), IoT protocols (MQTT, CoAP, BLE), bare-metal C/C++, and hardware peripheral interfaces (I2C, SPI, UART, GPIO). Use when developing firmware, working with microcontrollers,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.