Zephyr foundations

From beriberikix/zephyr-agent-skills · View interactive version

Zephyr foundations is an AI agent skill from the GitHub repository beriberikix/zephyr-agent-skills. Foundational skills for Zephyr RTOS development. Covers essential Embedded C patterns (BIT, CONTAINER_OF), real-time concurrency primitives (mutexes, semaphores, spinlocks), hardware literacy (datasheet-to-DTS mapping), and defensive programming. Trigger when writing core application logic, drivers,

How to use this skill

Skill file

Zephyr Foundations

Mastering the bedrock of Zephyr is essential for writing efficient, robust, and idiomatic code.

Core Workflows

1. Idiomatic C Patterns

Zephyr uses specific macros to manage memory and hardware-software mapping.

2. Real-Time Concurrency

Safe multi-threading and interrupt handling are critical for stability.

3. Hardware Literacy (Devicetree)

Understanding how code interacts with the hardware description.

4. Robust Error Handling

Preventing crashes through defensive programming.

Quick Start (Defensive Pattern)

int sensor_read_checked(const struct device *dev)
{
  if (dev == NULL || !device_is_ready(dev)) {
    return -ENODEV;
  }

  return 0;
}

Validation Checklist

Automation Tools

Examples & Templates

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.