embedded-buffer-queue-libs

A guide for integrating and debugging ring buffers and lightweight queues in embedded systems. A ring buffer is a fixed-size area that stores incoming items in a loop, such as bytes received from a device.

In plain words
What is it for?
Use it when working with UART receive buffers, logging or event queues, DMA handoffs, circular buffers, or FIFO libraries, especially when deciding ownership and behavior when the buffer is full.
Why use it?
It helps prevent common problems such as lost data, incorrect wraparound, full or empty buffer mistakes, and unsafe sharing between an interrupt and a task.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/easyzoom/aix-skills/embedded-buffer-queue-libs
Any agent
npx skills add easyzoom/aix-skills --skill embedded-buffer-queue-libs
Clone the repo
git clone --depth 1 https://github.com/easyzoom/aix-skills

Made for: Claude Code, Codex.

Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 612 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00038 $0.00612
Opus 5 $0.00019 $0.00306
Sonnet 5 $0.00008 $0.00122
Haiku 4.5 $0.00004 $0.00061

Measured 3d ago against content hash 5bb564099e52, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

embedded-buffer-queue-libs 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 3d 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/embedded-buffer-queue-libs/SKILL.md · 81 lines

How it starts

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

Embedded Buffer Queue Libs

Overview

Use this skill for embedded ring buffers and lightweight queues. The core decision is ownership and concurrency: single producer/consumer, ISR-to-task, task-to-task, DMA-to-task, or multi-producer use.

When To Use

Use this skill when:

  • The user wants to integrate or debug Ring-Buffer, QueueForMcu, circular buffers, FIFOs, UART RX buffers, log queues, or event queues.
  • The issue involves overflow, data loss, race conditions, wraparound, off-by-one capacity, ISR safety, or DMA buffer handoff.

Do not use this skill for RTOS-native queues unless the issue is about wrapping a custom buffer around them.

First Questions

Ask for:

  • Buffer/queue library and intended data type.
  • Producer and consumer contexts: ISR, DMA, task, main loop, shell, or logger.
  • Required behavior on full/empty: drop, overwrite oldest, block, error, or backpressure.
  • Element size, capacity, maximum burst, and latency budget.
  • Whether operations must be lock-free or protected by critical sections.

Integration Checklist

  1. Define ownership. Specify exactly who writes, who reads, and whether there can be multiple producers or consumers.

  2. Define full/empty semantics. Do not leave overwrite/drop/block behavior implicit.

  3. Check capacity math. Many ring buffers hold N-1 items to distinguish full from empty.

  4. Protect concurrent access. Use interrupt masking, atomics, mutexes, or single-producer/single-consumer rules as appropriate.

  5. Verify wraparound. Test writes and reads across the end of the buffer.

  6. Add telemetry. Track high-water mark, overflow count, drop count, or queue full events.

Common Failures

  • Race between ISR producer and task consumer.
  • Off-by-one capacity causes one byte or one element to disappear.
  • DMA writes into a buffer while CPU reads stale cached data.
  • Full buffer silently overwrites critical data.
  • Queue stores pointers to stack objects that go out of scope.

Verification

Read the full file on GitHub · 81 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. 3d ago First seen · 81 lines · 38 tokens per session scan A 5bb564099e52

Subscribe to this mod's changes

embedded-buffer-queue-libs is a skill published in the GitHub repository easyzoom/aix-skills (31 stars, last pushed 1mo ago), licensed MIT. It adds 38 tokens to every session and 612 once invoked, about $0.0002 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

auditing-uefi-firmware-with-chipsec

Use Intel CHIPSEC to assess platform firmware configuration, SPI flash write protection, BIOS lock, SMM/SMRR, and Secure Boot variable state, dump SPI flash, and triage UEFI variables for firmware-level threats.

adriannoes/awesome-agentic-ai · 56 tokens

tdmcp-kinect-wall-harp

Orchestrates the dedicated Kinect wall harp implementation team. Use whenever the user asks to build, implement, continue, fix, QA, document, or ship the Kinect wall harp, Kinect v2 wall-depth harp, FreenectTD depth-blob hand tracking, projected wall strings, pluck synth harp, or this feature's Layer 1…

Pantani/tdmcp · 97 tokens

db-performance

PostgreSQL query performance — EXPLAIN ANALYZE, index design, pgstatstatements, slow query detection, connection pool tuning.

sawrus/agent-guides · 32 tokens

slo-implementation

Implement SLOs end-to-end in Prometheus — recording rules, burn rate alerts, error budget dashboards, and Sloth/pyrra integration.

sawrus/agent-guides · 35 tokens

github-actions-patterns

Production-grade GitHub Actions workflows — reusable workflows, OIDC cloud auth, caching, matrix builds, and environment protection rules. Use when the user creates, reviews, or debugs CI/CD pipelines in .github/workflows, or asks about GitHub Actions deployment, OIDC authentication, or workflow optimization.

sawrus/agent-guides · 66 tokens

backup-restore

PostgreSQL backup and restore with pgBackRest — full/incremental/WAL, PITR, K8s CronJob scheduling, and restore verification.

sawrus/agent-guides · 36 tokens