zephyr-threading

zephyr-threading is a skill for Claude Code, Codex from ksachdeva/zephyr-rtos-ai. It costs 102 tokens per session (1,496 once invoked), scanned A, original, Apache-2.0.

A guide to managing Zephyr RTOS threads, the independently scheduled tasks that run application code, along with workqueues for running deferred work.

In plain words
What is it for?
Use it to create, prioritize, pause, resume, stop, and join threads, and to configure workqueues and delayable background work.
Why use it?
It helps choose how code should run, how tasks should be prioritized, and how to manage blocking, timing, and thread lifecycles.

Skill for Claude CodeCodex

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

Good fit Use it to create, prioritize, pause, resume, stop, and join threads, and to configure workqueues and delayable background work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ksachdeva/zephyr-rtos-ai/zephyr-threading
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-threading
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-threading

README.md
[![agentmods](https://agentmods.dev/badge/skills/ksachdeva/zephyr-rtos-ai/zephyr-threading.svg)](https://agentmods.dev/skills/ksachdeva/zephyr-rtos-ai/zephyr-threading)
Your own site
<a href="https://agentmods.dev/skills/ksachdeva/zephyr-rtos-ai/zephyr-threading"><img src="https://agentmods.dev/badge/skills/ksachdeva/zephyr-rtos-ai/zephyr-threading.svg" alt="Measured on agentmods" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,496 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.00102 $0.01496
Opus 5 $0.00051 $0.00748
Sonnet 5 $0.00020 $0.00299
Haiku 4.5 $0.00010 $0.00150

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

Security

Grade A, and why

zephyr-threading 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-threading/SKILL.md · 174 lines

How it starts

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

Zephyr Threading

Overview

This skill provides expert knowledge on Zephyr kernel threading: creating and managing threads, understanding the scheduling model, selecting appropriate priorities, and using workqueues for deferred processing.

When thread blocking behavior and idle residency matter for battery life or low-power operation, also read ../zephyr-power-management/SKILL.md.

Workflow

1. Determine Thread Type Needed

First, identify what kind of execution context is required:

Need Solution
Lengthy/complex processing not suitable for ISR Create a thread
Deferred work from ISR or high-priority thread Use workqueue
Background processing with timeout control Use delayable work item
Single-threaded application Use main thread directly

2. Select Priority Class

Zephyr has two priority classes. Choose based on preemption requirements:

Cooperative threads (negative priority, e.g., -1 to -CONFIG_NUM_COOP_PRIORITIES):

  • Never preempted by scheduler until they voluntarily yield
  • Best for: device drivers, performance-critical code, short atomic operations
  • Use K_PRIO_COOP(x) macro where x=0 is highest cooperative priority

Preemptive threads (non-negative priority, 0 to CONFIG_NUM_PREEMPT_PRIORITIES-1):

  • Can be preempted by higher-priority threads at any reschedule point
  • Best for: application logic, time-sensitive processing
  • Use K_PRIO_PREEMPT(x) macro where x=0 is highest preemptive priority

Meta-IRQ threads (optional, highest priority cooperative):

  • Enable with CONFIG_NUM_METAIRQ_PRIORITIES
  • Can preempt even cooperative threads — use only for interrupt bottom-half processing

Rule of thumb: Lower numeric value = higher priority. Priority -2 > -1 > 0 > 1.

3. Implementation

Once requirements are clear, implement using the appropriate reference:

Step 3a: For thread creation and lifecycle management:

Read the full file on GitHub · 174 lines

Files

What ships with it

4 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 · 174 lines · 102 tokens per session scan A f5484185f42e

Subscribe to this mod's changes

zephyr-threading is a skill published in the GitHub repository ksachdeva/zephyr-rtos-ai (23 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 102 tokens to every session and 1,496 once invoked, about $0.0005 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