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 skills/hermeticormus/libreembed-claude-code/comm-bus-patternsnpx skills add HermeticOrmus/LibreEmbed-Claude-Code --skill comm-bus-patternsgit clone --depth 1 https://github.com/HermeticOrmus/LibreEmbed-Claude-CodeWrote 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.
[](https://agentmods.dev/skills/hermeticormus/libreembed-claude-code/comm-bus-patterns)<a href="https://agentmods.dev/skills/hermeticormus/libreembed-claude-code/comm-bus-patterns"><img src="https://agentmods.dev/badge/skills/hermeticormus/libreembed-claude-code/comm-bus-patterns.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01655 |
| Opus 5 | $0.00000 | $0.00827 |
| Sonnet 5 | $0.00000 | $0.00331 |
| Haiku 4.5 | $0.00000 | $0.00166 |
Grade A, and why
comm-bus-patterns 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 4d 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 — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.
comm-bus-patterns
Knowledge Base
Production communication bus patterns for embedded C. STM32 HAL and LL examples.
Pattern 1: I2C Register Read/Write for MEMS Sensors
Generic register-addressed I2C sensor driver (BME280, MPU-6050, etc.):
#define I2C_TIMEOUT_MS 5U
HAL_StatusTypeDef sensor_write_reg(I2C_HandleTypeDef *hi2c,
uint8_t dev_addr, uint8_t reg, uint8_t val)
{
uint8_t buf[2] = { reg, val };
return HAL_I2C_Master_Transmit(hi2c, dev_addr << 1, buf, 2, I2C_TIMEOUT_MS);
}
HAL_StatusTypeDef sensor_read_reg(I2C_HandleTypeDef *hi2c,
uint8_t dev_addr, uint8_t reg,
uint8_t *out, uint16_t len)
{
HAL_StatusTypeDef s;
s = HAL_I2C_Master_Transmit(hi2c, dev_addr << 1, ®, 1, I2C_TIMEOUT_MS);
if (s != HAL_OK) { return s; }
return HAL_I2C_Master_Receive(hi2c, (dev_addr << 1) | 1,
out, len, I2C_TIMEOUT_MS);
}
/* I2C bus recovery: toggle SCL 9 times to release stuck SDA */
void i2c_bus_recover(GPIO_TypeDef *scl_port, uint16_t scl_pin,
GPIO_TypeDef *sda_port, uint16_t sda_pin)
{
for (int i = 0; i < 9; i++) {
HAL_GPIO_WritePin(scl_port, scl_pin, GPIO_PIN_SET);
HAL_Delay(1);
HAL_GPIO_WritePin(scl_port, scl_pin, GPIO_PIN_RESET);
HAL_Delay(1);
}
/* Generate STOP: SDA low→high while SCL high */
HAL_GPIO_WritePin(sda_port, sda_pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(scl_port, scl_pin, GPIO_PIN_SET);
HAL_Delay(1);
HAL_GPIO_WritePin(sda_port, sda_pin, GPIO_PIN_SET);
}
Pattern 2: SPI DMA Transfer with Semaphore
Non-blocking SPI using DMA and FreeRTOS binary semaphore for completion notification:
static SemaphoreHandle_t s_spi_done;
void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi)
{
if (hspi == &hspi1) {
BaseType_t woken = pdFALSE;
xSemaphoreGiveFromISR(s_spi_done, &woken);
portYIELD_FROM_ISR(woken);
}
}
void spi_dma_init(void)
{
s_spi_done = xSemaphoreCreateBinary();
}
bool spi_transfer(const uint8_t *tx, uint8_t *rx, uint16_t len)
{
spi_cs_assert();
HAL_SPI_TransmitReceive_DMA(&hspi1, (uint8_t *)tx, rx, len);
/* Block task until DMA complete (max 10ms) */
bool ok = xSemaphoreTake(s_spi_done, pdMS_TO_TICKS(10)) == pdTRUE;
spi_cs_deassert();
return 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.
- 4d ago First seen · 191 lines · 0 tokens per session scan A 610ce5bc83c4
comm-bus-patterns is a skill 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 1,655 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 skills, from other repositories
hardware-iot-bus
Low-level I2C and SPI bus peripheral control for embedded Linux boards (Orange Pi, Raspberry Pi, RISC-V).
aether-iot-query
Use this skill when the user asks about a live AetherEdge runtime: channels, points, real-time values, history, alarms, rules, models, instances, routing, SHM health, service health, or system status. Use aether CLI commands to answer — do NOT inspect source code, local database files, or config YAMLs to answer…
aether-iot
Build, integrate, diagnose, or generate applications for the AetherEdge AI-native edge kernel. Use for AetherEdge onboarding, SDK compositions, device and topology clients, read-only operations UIs, MCP integration, Domain Packs, or governed IoT commands where live-state authority and physical-device safety must be…
avr-bare-metal-embedded
Curated Knowledge API for AI Agents — 68 MCP tools, 200+ skill packs, 46K chunks, semantic search over 670K vectors, 5-layer validation pipeline. Works with Claude Code, Cursor, Cline, Windsurf.
smart-product-dev
End-to-end IoT product development orchestration for TuyaOpen projects. Guides from requirements gathering → Tuya Platform product/DP creation → complete embedded firmware generation. State-machine: detects project state and picks up from wherever development currently stands.
edge-iot
Edge computing, IoT protocols, and embedded systems integration.