home / skills / a5c-ai / babysitter / zephyr-rtos

This skill helps you configure and develop Zephyr RTOS projects by managing device trees, Kconfig, networking, and secure boot workflows.

npx playbooks add skill a5c-ai/babysitter --skill zephyr-rtos

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.6 KB
---
name: zephyr-rtos
description: Specialized skill for Zephyr RTOS development and configuration
category: RTOS
allowed-tools:
  - Bash
  - Read
  - Write
  - Edit
  - Glob
  - Grep
---

# Zephyr RTOS Skill

## Overview

This skill provides specialized support for Zephyr RTOS development, including device tree configuration, Kconfig management, and integration with Zephyr's extensive subsystems.

## Capabilities

### Build System
- West build system operation and configuration
- CMake integration and customization
- Multi-image builds (MCUboot + app)
- Sysbuild configuration
- Custom board definitions

### Device Tree
- Device tree overlay generation
- Binding creation and modification
- Node property configuration
- Pinctrl and GPIO configuration
- Compatible string management

### Kconfig Management
- Kconfig option configuration
- Fragment file organization
- Configuration dependency analysis
- Board-specific defconfig
- Application-specific prj.conf

### Networking Stack
- TCP/IP stack configuration
- Socket API setup
- Network interface configuration
- MQTT, CoAP, LwM2M protocols
- Network shell commands

### Bluetooth Stack
- Bluetooth LE configuration
- GATT service definition
- Bluetooth Mesh setup
- Connection management
- Advertising configuration

### Power Management
- Power management framework configuration
- Device power states
- System power states
- Policy configuration

### Logging and Shell
- Logging backend configuration
- Log level management
- Shell command registration
- RTT and UART backends

### Secure Boot
- MCUboot integration
- Signed image generation
- Upgrade slot configuration
- Hardware security integration

## Target Processes

- `rtos-integration.js` - Zephyr RTOS setup and integration
- `secure-boot-implementation.js` - MCUboot and secure boot
- `ota-firmware-update.js` - Firmware update with MCUboot
- `low-power-design.js` - Zephyr power management

## Dependencies

- Zephyr SDK
- West meta-tool
- Device tree compiler (dtc)
- CMake and Ninja

## Usage Context

This skill is invoked when tasks require:
- Zephyr project setup and configuration
- Device tree customization
- Networking or Bluetooth stack setup
- Power management implementation
- Secure boot with MCUboot

## Example Configurations

### Basic Project Structure
```
app/
  CMakeLists.txt
  prj.conf
  boards/
    my_board.overlay
  src/
    main.c
```

### Device Tree Overlay
```dts
&i2c0 {
    status = "okay";
    clock-frequency = <I2C_BITRATE_FAST>;

    sensor@48 {
        compatible = "ti,tmp102";
        reg = <0x48>;
    };
};
```

### Kconfig Fragment
```kconfig
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="My Device"
CONFIG_BT_GATT_DYNAMIC_DB=y
```

Overview

This skill provides focused assistance for Zephyr RTOS development, covering device tree, Kconfig, build system integration, networking, Bluetooth, power management, and secure boot. It helps produce reproducible project layouts, generate overlays and fragments, and configure MCUboot-based secure firmware flows. The skill is optimized for practical integration tasks and deterministic orchestration of multi-stage builds and updates.

How this skill works

The skill inspects Zephyr project artifacts (CMakeLists.txt, prj.conf, device tree overlays, Kconfig fragments) and suggests concrete edits, additions, or file scaffolds. It generates device tree overlays and binding snippets, synthesizes Kconfig fragments with dependency-aware options, and produces West build and CMake adjustments for multi-image and sysbuild scenarios. For secure boot and OTA, it outlines MCUboot configuration and signed image generation steps.

When to use it

  • Setting up a new Zephyr project with custom board definitions and build scripts
  • Creating or modifying device tree overlays and binding entries for peripherals
  • Tuning Kconfig options and arranging prj.conf or board defconfig files
  • Configuring networking, Bluetooth, or power management stacks
  • Implementing MCUboot secure-boot or OTA update flows

Best practices

  • Keep device tree overlays small and focused; use include files for shared nodes
  • Group Kconfig fragments by feature and document option dependencies
  • Use West manifest pinning for deterministic multi-repo builds
  • Validate builds with dtc and CMake locally before CI integration
  • Use signed images and dual-slot MCUboot layout for safe OTA upgrades

Example use cases

  • Generate a board-specific overlay enabling an I2C sensor and pinctrl settings
  • Compose a prj.conf fragment to enable Bluetooth LE peripheral and GATT services
  • Configure a multi-image build: MCUboot + application with CMake tweaks
  • Produce power management policies and system sleep state configurations
  • Draft steps and commands to produce signed firmware images for OTA

FAQ

Can the skill modify existing device tree files safely?

Yes. It suggests focused overlay edits and binding snippets to avoid direct changes to upstream DTS files, preferring overlays and fragments for safe customization.

Does it handle MCUboot signing and slot configuration?

It outlines the required MCUboot config, image layout, and signing steps, including tooling and recommended slot policies, but signing keys and hardware security setup remain under developer control.