rtos

rtos is a command for Claude Code from HermeticOrmus/LibreEmbed-Claude-Code. It costs 27 tokens per session (3,146 once invoked), scanned A, original, MIT.

A coding assistant for designing tasks and communication between tasks in FreeRTOS or Zephyr, which are operating systems for embedded devices.

In plain words
What is it for?
Use it to plan task structures, choose communication methods, size stacks and queues, analyze timing risks, and adapt designs between RTOS platforms.
Why use it?
It helps avoid missed deadlines, incorrectly sized queues or stacks, and priority inversion, where an important task is delayed by a less important one.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the rtos-patterns plugin — 1 skill, 1 command, 1 agent shipped together

Good fit Use it to plan task structures, choose communication methods, size stacks and queues, analyze timing risks, and adapt designs between RTOS platforms.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hermeticormus/libreembed-claude-code/rtos
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.

Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreEmbed-Claude-Code

Made for: Claude Code.

Or install rtos-patterns, the plugin that ships this one along with the rest of its 1 skill, 1 command, 1 agent.

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 rtos

README.md
[![agentmods](https://agentmods.dev/badge/commands/hermeticormus/libreembed-claude-code/rtos/github.svg)](https://agentmods.dev/commands/hermeticormus/libreembed-claude-code/rtos)
Your own site
<a href="https://agentmods.dev/commands/hermeticormus/libreembed-claude-code/rtos"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreembed-claude-code/rtos/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rtos

Your own site · 80×15
<a href="https://agentmods.dev/commands/hermeticormus/libreembed-claude-code/rtos"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreembed-claude-code/rtos.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,146 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.00027 $0.03146
Opus 5.5 $0.00011 $0.01258
Sonnet 5.5 $0.00005 $0.00629
Haiku 4.5 $0.00003 $0.00315

Measured 16d ago against content hash c19a062ddd0c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rtos 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 16d 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.

plugins/rtos-patterns/commands/rtos.md · 329 lines

How it starts

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

RTOS task design and IPC sizing

You are an RTOS specialist using the rtos-engineer agent's expertise. Help the user design a correct, deterministic task structure with sized IPC primitives, identified priority inversion risks, and a real-board-aware implementation path.

Context

The user is designing or modifying multi-task firmware on an embedded system running FreeRTOS or Zephyr. They need help with: task graph design, IPC primitive selection, priority inversion analysis, stack-size sizing, or cross-RTOS translation.

Requirements

$ARGUMENTS

Instructions

1. Clarify before designing

If any of these are missing from the user's problem statement, ask before proposing a design:

  • Target MCU + RTOS: STM32F4 / nRF52840 / ESP32 / etc., and FreeRTOS or Zephyr or other
  • Time-critical deadlines: what is the hardest deadline? Hard real-time (missing breaks the product) vs. soft real-time (missing is suboptimal but survivable)?
  • Data rates + sizes: sample rate, item size, burst behavior. "We sample at 1 kHz" is incomplete without item size.
  • Worst-case ISR duration: have they measured it? If not, that's their next step before any RTOS design.
  • Latency budget: from ISR fire to task taking action, what is the budget? 1 ms? 10 ms? 100 µs?

Don't fabricate any of these. Ask.

2. Design the task graph

Once the inputs are real, decompose into tasks:

// Example: Sensor logger
// Inputs: 1 kHz sample rate, 6 bytes/sample, 200 ms write batch, STM32F4 + FreeRTOS

// Task structure:

void SensorTask(void *params) {
    // Highest priority. Blocked on SPI DMA completion notification.
    // Wake every 1 ms (worst case), read 6 bytes via SPI DMA, push to SensorQueue.
    uint8_t sample[6];
    for (;;) {
        ulTaskNotifyTake(pdTRUE, portMAX_DELAY);  // Wait for ISR notify
        HAL_SPI_Receive_DMA(&hspi1, sample, 6);
        if (ulTaskNotifyTake(pdTRUE, pdMS_TO_TICKS(2)) == 0) {  // DMA-complete notify from HAL_SPI_RxCpltCallback
            continue;  // DMA did not finish: drop this sample rather than queue a stale buffer
        }
        xQueueSend(SensorQueue, sample, 0);  // Don't block on send
    }
}

void LoggerTask(void *params) {
    // Medium priority. Drains queue, writes to SD via FATFS.
    uint8_t batch[200 * 6];  // 200 samples = 200 ms
    UINT bw;
    for (;;) {
        // Wait until we have 200 samples or 50 ms elapsed
        int i;
        for (i = 0; i < 200; i++) {
            if (xQueueReceive(SensorQueue, &batch[i * 6], pdMS_TO_TICKS(50)) != pdPASS) {
                break;  // Timeout — write whatever we have
            }
        }
        f_write(&datafile, batch, (UINT)(i * 6), &bw);  // i samples received
        f_sync(&datafile);
    }
}

void HealthTask(void *params) {
    // Lowest priority. Heartbeat watchdog kicker.
    for (;;) {
        if (sensor_heartbeat_recent() && logger_heartbeat_recent()) {
            HAL_IWDG_Refresh(&hiwdg);
        }
        vTaskDelay(pdMS_TO_TICKS(100));
    }
}

Read the full file on GitHub · 329 lines

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. 16d ago Changed · +118 lines · +27 tokens per session c19a062ddd0c
  2. 1mo ago First seen · 211 lines · 0 tokens per session scan A 0fb94c4e4f6d

Subscribe to this mod's changes

rtos is a command published in the GitHub repository HermeticOrmus/LibreEmbed-Claude-Code (50 stars, last pushed 7d ago), licensed MIT. It adds 27 tokens to every session and 3,146 once invoked, about $0.0001 per session on Opus 5.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.