zephyr-uart

zephyr-uart is a skill for Claude Code, Codex from ksachdeva/zephyr-rtos-ai. It costs 144 tokens per session (2,250 once invoked), scanned A, original, Apache-2.0.

A guide to Zephyr’s UART subsystem for serial communication between a device and another component. It covers polling, interrupt-driven communication, and asynchronous DMA transfers.

In plain words
What is it for?
Use it to configure UART through devicetree or Kconfig and implement polling, interrupt-based, or asynchronous serial input and output.
Why use it?
It helps select the right communication method and avoid incompatible UART configurations, especially when balancing simplicity, responsiveness, throughput, and CPU use.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to configure UART through devicetree or Kconfig and implement polling, interrupt-based, or asynchronous serial input and output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ksachdeva/zephyr-rtos-ai/zephyr-uart
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ksachdeva/zephyr-rtos-ai --skill zephyr-uart
Clone the repo
git clone --depth 1 https://github.com/ksachdeva/zephyr-rtos-ai

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for zephyr-uart

README.md
[![agentmods](https://agentmods.dev/badge/skills/ksachdeva/zephyr-rtos-ai/zephyr-uart.svg)](https://agentmods.dev/skills/ksachdeva/zephyr-rtos-ai/zephyr-uart)
Your own site
<a href="https://agentmods.dev/skills/ksachdeva/zephyr-rtos-ai/zephyr-uart"><img src="https://agentmods.dev/badge/skills/ksachdeva/zephyr-rtos-ai/zephyr-uart.svg" alt="Measured on agentmods" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,250 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00144 $0.02250
Opus 5 $0.00072 $0.01125
Sonnet 5 $0.00029 $0.00450
Haiku 4.5 $0.00014 $0.00225

Measured 8d ago against content hash 8382778ebfaf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

zephyr-uart scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/zephyr-uart/SKILL.md · 291 lines

How it starts

The opening of the file, as written. The whole thing — 291 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Zephyr UART

Expert guidance for Zephyr's UART driver subsystem covering three API modes: polling, interrupt-driven, and asynchronous (DMA).

Table of Contents

  1. API Selection
  2. Getting Device Reference
  3. Common Workflows
  4. Configuration
  5. Error Handling
  6. Troubleshooting

API Selection

Zephyr provides three UART access methods. Choose based on requirements:

API Kconfig Use Case Blocking?
Polling (default) Simple, low-throughput, debug output Yes (TX), No (RX)
Interrupt-driven CONFIG_UART_INTERRUPT_DRIVEN Background RX, medium throughput No
Async (DMA) CONFIG_UART_ASYNC_API High throughput, zero-copy, low CPU No

Decision Tree

Need simple debug output? → Polling
Need background receive? → Interrupt-driven
Need high throughput + low CPU? → Async (DMA)
Need both RX and TX without blocking? → Interrupt-driven or Async

API Mutual Exclusivity

WARNING: Interrupt-driven and Async APIs must NOT be used simultaneously on the same peripheral. Both require hardware interrupts. CONFIG_UART_EXCLUSIVE_API_CALLBACKS=y (default) ensures only one callback type is active.


Getting Device Reference

From Devicetree (Preferred)

#include <zephyr/device.h>
#include <zephyr/drivers/uart.h>

/* Using chosen node (common for console) */
#define UART_NODE DT_CHOSEN(zephyr_shell_uart)
static const struct device *const uart_dev = DEVICE_DT_GET(UART_NODE);

/* Using specific node label */
#define UART_NODE DT_NODELABEL(uart0)
static const struct device *const uart_dev = DEVICE_DT_GET(UART_NODE);

/* Runtime check (in main or init) */
if (!device_is_ready(uart_dev)) {
    printk("UART device not ready\n");
    return -ENODEV;
}

Common Workflows

1. Polling API (Simplest)

Best for debug output or simple blocking TX.

Read the full file on GitHub · 291 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 291 lines · 144 tokens per session scan A 8382778ebfaf

Subscribe to this mod's changes

zephyr-uart is a skill published in the GitHub repository ksachdeva/zephyr-rtos-ai (23 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 144 tokens to every session and 2,250 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

home-assistant

This skill should be used when helping with Home Assistant setup, including creating automations, modifying dashboards, checking entity states, debugging automations, and managing the smart home configuration. Use this for queries about HA entities, YAML automation/dashboard generation, or troubleshooting HA issues.

sammcj/agentic-coding · 57 tokens

raspberry-pi-pico2

Use when developing with Raspberry Pi Pico 2 or the Pi Debug Probe.

sammcj/agentic-coding · 24 tokens

piper-tts-training

Train custom TTS voices for Piper (ONNX format) using fine-tuning or from-scratch approaches. Use when creating new synthetic voices, fine-tuning existing Piper checkpoints, preparing audio datasets for TTS training, or deploying voice models to devices like Raspberry Pi or Home Assistant. Covers dataset preparation…

sammcj/agentic-coding · 79 tokens

gap

Program robots with GaP (graph-as-policy) — compile natural-language tasks into typed, verified robot skill graphs and run them on simulators or real robots. Use when the user mentions GaP or graph-as-policy, robot manipulation, robot skills, robot tools or capabilities, skill registries, open-robot-skills, LIBERO or…

graph-robots/graph-as-policy · 195 tokens

web-components

Architecture and coding rules for single-page applications using web components, BCE layering, lit-html templating, unidirectional Redux-style state management (reduction.js, standards-based), and standards-based client-side routing (Navigation API + URLPattern). Web standards and web platform first, minimal external…

AdamBien/airails · 160 tokens

sbce

Spec-driven BCE workflow where one capability spec equals one business component (same name) and the spec is the boundary contract. Invoked as /sbce new|apply (or by intent), it drives declare → converge; the stack's own test loop is the oracle for "done". new accepts a BC name or a natural-language feature…

AdamBien/airails · 215 tokens