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.
npx agentmods add commands/hermeticormus/libreembed-claude-code/comm-busgit clone --depth 1 https://github.com/HermeticOrmus/LibreEmbed-Claude-CodeWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.02724 |
| Opus 5 | $0.00000 | $0.01362 |
| Sonnet 5 | $0.00000 | $0.00545 |
| Haiku 4.5 | $0.00000 | $0.00272 |
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 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.
How it starts
The opening of the file, as written. The whole thing — 233 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:
- Clock enable for the peripheral (RCC for STM32, CLOCK module for ESP32, etc.)
- Clock enable for the GPIO port the bus uses
- GPIO configuration — mode (alternate function), speed, pull-up/pull-down, alternate function number
- Peripheral configuration — speed, mode, frame size, FIFO threshold
- DMA configuration if using DMA — channel/stream selection, direction, increment mode, mode (normal/circular), priority
- Interrupt configuration — enable peripheral interrupts (TXIE, RXIE, ERR, etc.)
- NVIC — enable + set priority (must be below the RTOS-safe threshold, usually
configMAX_SYSCALL_INTERRUPT_PRIORITY) - 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;
}
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.
- 3d ago First seen · 233 lines · 0 tokens per session scan A 277c9de3db39
comm-bus is a command published in the GitHub repository HermeticOrmus/LibreEmbed-Claude-Code (44 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,724 tokens. 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.
Other commands, from other repositories
fix_board
Automatically diagnose and fix PlatformIO board upload/monitor issues.
expert_rmt5
ESP-IDF v5.x RMT5 API expert for LED protocols, encoders, and multi-channel control.
scope
Command "scope" from jzl-maker/EA-SKILL, covering 命令: /ea scope (示波器), 功能, 调用方式, ✅ 确认 pyvisa 栈 / visa 资源 / 设备 and 抓波形:chan1,存 csv + 出图.
debug
自主调试四件套,用于「代码跑哪了 / 变量值对不对 / 根因是什么」。双后端:--backend jlink(默认)或 --backend openocd(ST-Link/DAP 用,无停机监控)。.
la
Saleae 逻辑分析仪(Logic 8 / Logic 16 / Pro 8 / Pro 16)抓取 + 协议解码,用于排查 UART/SPI/I2C 等总线时序。.
size
解析 Keil 编译生成的 .map 文件,统计固件 Flash / RAM / 栈 / 堆 使用情况,并支持超限预警(使用率 ≥ warn 警告,≥ err 超限)。.