comm-bus

comm-bus is a command for Claude Code from HermeticOrmus/LibreEmbed-Claude-Code. It costs 31 tokens per session (3,704 once invoked), scanned A, original, MIT.

A coding-agent command for designing, debugging, or moving communication-bus drivers. Communication buses are hardware links such as I2C, SPI, UART, CAN, and USB; an MCU is the small processor inside an embedded device.

In plain words
What is it for?
Use it to plan driver initialization, choose between direct, interrupt, or DMA transfers, handle errors, configure MCU peripherals, or investigate a faulty bus driver.
Why use it?
It helps structure the problem before driver work begins and avoids guessing about the bus, processor, connected device, transfer needs, or reliability constraints.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the communication-buses plugin — 1 skill, 1 command, 1 agent shipped together

Good fit Use it to plan driver initialization, choose between direct, interrupt, or DMA transfers, handle errors, configure MCU peripherals, or investigate a faulty bus driver.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hermeticormus/libreembed-claude-code/comm-bus
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 communication-buses, 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 comm-bus

README.md
[![agentmods](https://agentmods.dev/badge/commands/hermeticormus/libreembed-claude-code/comm-bus/github.svg)](https://agentmods.dev/commands/hermeticormus/libreembed-claude-code/comm-bus)
Your own site
<a href="https://agentmods.dev/commands/hermeticormus/libreembed-claude-code/comm-bus"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreembed-claude-code/comm-bus/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 comm-bus

Your own site · 80×15
<a href="https://agentmods.dev/commands/hermeticormus/libreembed-claude-code/comm-bus"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreembed-claude-code/comm-bus.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 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,704 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.00031 $0.03704
Opus 5.5 $0.00012 $0.01482
Sonnet 5.5 $0.00006 $0.00741
Haiku 4.5 $0.00003 $0.00370

Measured 2mo ago against content hash 98a6afc13711, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

comm-bus 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 2mo 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/communication-buses/commands/comm-bus.md · 331 lines

How it starts

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

Communication bus driver design and debug

You are a bus-driver-engineer agent using deep expertise across I2C, SPI, UART, CAN, and USB. Help the user design a correct driver, debug a misbehaving driver, or migrate a driver between MCU families.

Context

The user is writing or debugging a communication bus driver. They need: driver structure design, DMA strategy choice, error-handling pattern, MCU-specific peripheral configuration, or root-cause analysis for a misbehaving bus.

Requirements

$ARGUMENTS

Instructions

1. Clarify before designing

If any of these are missing, ask:

  • Which bus: I2C, SPI, UART, CAN, USB, or other?
  • Target MCU + HAL: STM32F4 + STM32 HAL? ESP32 + ESP-IDF? nRF52 + nRFx? RP2040 + pico-sdk?
  • Transfer characteristics: throughput required, packet size, frequency
  • Slave / peer details: chip name, datasheet hints (mode for SPI, address for I2C, etc.)
  • Constraints: low power (sleep between transfers?), real-time (microsecond latency target?), high reliability (ECC, retries)?

Do not fabricate any of these.

2. Design the init sequence

The init order matters. Wrong order = peripheral doesn't work. Right order is:

  1. Clock enable for the peripheral (RCC for STM32, CLOCK module for ESP32, etc.)
  2. Clock enable for the GPIO port the bus uses
  3. GPIO configuration — mode (alternate function), speed, pull-up/pull-down, alternate function number
  4. Peripheral configuration — speed, mode, frame size, FIFO threshold
  5. DMA configuration if using DMA — channel/stream selection, direction, increment mode, mode (normal/circular), priority
  6. Interrupt configuration — enable peripheral interrupts (TXIE, RXIE, ERR, etc.)
  7. NVIC — enable + set priority (must be below the RTOS-safe threshold, usually configMAX_SYSCALL_INTERRUPT_PRIORITY)
  8. Enable the peripheral as the last step

Example (STM32F4 SPI master, mode 0, DMA RX + TX):

spi_status_t spi_init(SPI_HandleTypeDef *hspi) {
    // 1. Clock enable
    __HAL_RCC_SPI1_CLK_ENABLE();
    __HAL_RCC_GPIOA_CLK_ENABLE();
    __HAL_RCC_DMA2_CLK_ENABLE();

    // 2. GPIO config: PA5=SCK, PA6=MISO, PA7=MOSI, AF5 for SPI1
    GPIO_InitTypeDef g = {0};
    g.Pin = GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7;
    g.Mode = GPIO_MODE_AF_PP;
    g.Pull = GPIO_NOPULL;
    g.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
    g.Alternate = GPIO_AF5_SPI1;
    HAL_GPIO_Init(GPIOA, &g);

    // 3. SPI peripheral config
    hspi->Instance = SPI1;
    hspi->Init.Mode = SPI_MODE_MASTER;
    hspi->Init.Direction = SPI_DIRECTION_2LINES;
    hspi->Init.DataSize = SPI_DATASIZE_8BIT;
    hspi->Init.CLKPolarity = SPI_POLARITY_LOW;     // CPOL = 0
    hspi->Init.CLKPhase = SPI_PHASE_1EDGE;          // CPHA = 0
    hspi->Init.NSS = SPI_NSS_SOFT;                  // GPIO CS
    hspi->Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_8;  // 84 MHz / 8 = 10.5 MHz
    hspi->Init.FirstBit = SPI_FIRSTBIT_MSB;
    hspi->Init.TIMode = SPI_TIMODE_DISABLE;
    hspi->Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
    HAL_SPI_Init(hspi);

    // 4. DMA config
    static DMA_HandleTypeDef hdma_tx, hdma_rx;
    hdma_tx.Instance = DMA2_Stream3;     // SPI1 TX uses stream 3 or 5
    hdma_tx.Init.Channel = DMA_CHANNEL_3;
    hdma_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
    hdma_tx.Init.MemInc = DMA_MINC_ENABLE;
    hdma_tx.Init.PeriphInc = DMA_PINC_DISABLE;
    hdma_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
    hdma_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
    hdma_tx.Init.Mode = DMA_NORMAL;
    hdma_tx.Init.Priority = DMA_PRIORITY_HIGH;
    HAL_DMA_Init(&hdma_tx);
    __HAL_LINKDMA(hspi, hdmatx, hdma_tx);

    // (Similar for RX on stream 0 or 2)

    // 5. NVIC
    HAL_NVIC_SetPriority(DMA2_Stream3_IRQn, 5, 0);  // Below RTOS-safe threshold
    HAL_NVIC_EnableIRQ(DMA2_Stream3_IRQn);
    HAL_NVIC_SetPriority(SPI1_IRQn, 5, 0);
    HAL_NVIC_EnableIRQ(SPI1_IRQn);

    return SPI_OK;
}

Read the full file on GitHub · 331 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. 2mo ago Changed · +98 lines · +31 tokens per session 98a6afc13711
  2. 3mo ago First seen · 233 lines · 0 tokens per session scan A 277c9de3db39

Subscribe to this mod's changes

comm-bus is a command published in the GitHub repository HermeticOrmus/LibreEmbed-Claude-Code (50 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 3,704 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.

Related

comm-bus compared with commands from other repositories

comm-bus next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
comm-busHermeticOrmus/LibreEmbed-Claude-CodeCommand501mo agoMITA31Claude Code
debugjzl-maker/EA-SKILLCommand151mo agoMITA0Claude Code
lajzl-maker/EA-SKILLCommand151mo agoMITA0Claude Code
sizejzl-maker/EA-SKILLCommand151mo agoMITA0Claude Code
testjzl-maker/EA-SKILLCommand151mo agoMITA0Claude Code
mapjzl-maker/EA-SKILLCommand151mo agoMITA0Claude Code
verifyjzl-maker/EA-SKILLCommand151mo agoMITA0Claude Code