Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

volt-driver

/volt-driver

Buduje sterownik urządzenia lub obsługę protokołu, takiego jak czujniki I2C, usługi BLE, klienci MQTT i peryferia SPI, z wejściem-wyjściem na przerwaniach i czystą abstrakcją HAL.

Licencja
MIT
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Buduje sterownik urządzenia lub obsługę protokołu, takiego jak czujniki I2C, usługi BLE, klienci MQTT i peryferia SPI, z wejściem-wyjściem na przerwaniach i czystą abstrakcją HAL.

Wyzwalacze z opisu

write a driverI2C deviceBLE serviceMQTT clientsensor integration
Oryginalny opis (EN)

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".

Jak działa

  1. Steps
  2. Delivery
Sekcje z nagłówków SKILL.md, w oryginale · 103 linii, 562 słów
Podgląd SKILL.md
---
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.
Pliki w paczce (2)
  • SKILL.md 4 KB
  • .claude-plugin/plugin.json 1 KB

Wersje

W bazie nie ma innych skilli o nazwie volt-driver.

Identyczna treść występuje jeszcze w 5 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 13.11.2026 · wersja paczki 23f6680b8cd1 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100volt-firmware
    Tworzy pełną specyfikację architektury firmware dla opisanego urządzenia: diagram warstw, odpowiedzialności modułów, interfejsy HAL, kluczowe maszyny stanów i decyzję o RTOS.
  • 100esp32-mqtt-conformance-testing
    Testuje zgodność klienta MQTT na ESP32 ze specyfikacją protokołu i oczekiwaniami brokera.
  • 95scaffold_driver
    Tworzy szkielet sterownika układu zewnętrznego na SPI, I2C lub UART, z mapą rejestrów z noty katalogowej.
  • 90esp32-ble-service-versioning
    Projektuje wersjonowanie usług BLE w ESP32, z ograniczeniami urządzenia, analizą awarii i testami przed wydaniem.
  • 95rs-domain-iot
    Pomaga budować aplikacje IoT w Rust: czujniki, protokół MQTT, telemetrię, sterowanie urządzeniami i bramki brzegowe.
  • 100embedded-iot
    Wspiera tworzenie firmware'u na mikrokontrolery (ESP32, STM32, Arduino, Raspberry Pi), z RTOS, protokołami IoT (MQTT, CoAP, BLE) i interfejsami I2C, SPI, UART, GPIO.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.