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 skills add HermeticOrmus/LibreEmbed-Claude-Code --skill bare-metal-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/bare-metal-patterns)<a href="https://agentmods.dev/skills/hermeticormus/libreembed-claude-code/bare-metal-patterns"><img src="https://agentmods.dev/badge/skills/hermeticormus/libreembed-claude-code/bare-metal-patterns/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.
<a href="https://agentmods.dev/skills/hermeticormus/libreembed-claude-code/bare-metal-patterns"><img src="https://agentmods.dev/badge/skills/hermeticormus/libreembed-claude-code/bare-metal-patterns.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00062 | $0.02208 |
| Opus 5.5 | $0.00025 | $0.00883 |
| Sonnet 5.5 | $0.00012 | $0.00442 |
| Haiku 4.5 | $0.00006 | $0.00221 |
Grade A, and why
bare-metal-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 21d 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 — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.
bare-metal-patterns
Knowledge Base
Production bare-metal C patterns for ARM Cortex-M. All code uses arm-none-eabi-gcc, C11.
Pattern 1: Register Bit Manipulation Macros
Consistent, readable register access without HAL dependency.
/* Generic bit manipulation — safe for any 32-bit register */
#define REG_SET_BIT(reg, bit) ((reg) |= (1U << (bit)))
#define REG_CLR_BIT(reg, bit) ((reg) &= ~(1U << (bit)))
#define REG_TST_BIT(reg, bit) (((reg) >> (bit)) & 1U)
/* Set a multi-bit field: mask off old value, OR in new value */
#define REG_SET_FIELD(reg, mask, shift, val) \
((reg) = ((reg) & ~(mask)) | (((val) << (shift)) & (mask)))
/* Example: set USART1 baud rate divisor in BRR register */
/* BRR = fCK / baud (oversampling by 16) */
#define USART_BRR_SET(uart, fck, baud) \
((uart)->BRR = (uint32_t)((fck) / (baud)))
USART_BRR_SET(USART1, 84000000UL, 115200UL); /* STM32F4 APB2 @ 84MHz */
Pattern 2: GPIO Configuration (Register Level)
Full GPIO setup for STM32F4 without HAL:
/* PA5 = LED (push-pull output), PA0 = button (input, pull-up) */
void gpio_init(void)
{
/* 1. Enable GPIOA clock */
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;
(void)RCC->AHB1ENR; /* Bus latency flush: read back after write */
/* 2. PA5: General purpose output, push-pull, high speed */
GPIOA->MODER = (GPIOA->MODER & ~(3U << 10)) | (1U << 10); /* MODER5 = 01 */
GPIOA->OTYPER &= ~(1U << 5); /* Push-pull */
GPIOA->OSPEEDR|= (3U << 10); /* Very high speed */
GPIOA->PUPDR = (GPIOA->PUPDR & ~(3U << 10)); /* No pull */
/* 3. PA0: Input, pull-up */
GPIOA->MODER = (GPIOA->MODER & ~(3U << 0)); /* MODER0 = 00: input */
GPIOA->PUPDR = (GPIOA->PUPDR & ~(3U << 0)) | (1U << 0); /* Pull-up */
}
static inline void led_on(void) { GPIOA->BSRR = (1U << 5); }
static inline void led_off(void) { GPIOA->BSRR = (1U << (5+16)); }
static inline void led_toggle(void) { GPIOA->ODR ^= (1U << 5); }
static inline int btn_read(void) { return (int)((GPIOA->IDR >> 0) & 1U); }
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.
- 21d ago Changed · +5 lines · +62 tokens per session 621c67cf4f90
- 1mo ago First seen · 235 lines · 0 tokens per session scan A 89692ae8788c
bare-metal-patterns is a skill published in the GitHub repository HermeticOrmus/LibreEmbed-Claude-Code (50 stars, last pushed 12d ago), licensed MIT. It adds 62 tokens to every session and 2,208 once invoked, about $0.0002 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.
Other skills, from other repositories
mspm0-skill
Tool-neutral CLI agent rules for TI MSPM0 development with SysConfig, DriverLib, CCS, Keil/uVision, CMake/GCC/OpenOCD, and supported board references. Use when an agent needs to inspect or modify MSPM0 projects, validate SysConfig output, package examples, or work on NUEDC embedded firmware.
doca-argp
Use this skill for hands-on DOCA Arg Parser CLI work on a shipped sample or new DOCA-using app — adding / removing / renaming flags; wiring docaargpinit → register params → docaargpstart → docaargpdestroy in order; picking a parameter type from the full public enum (DOCAARGPTYPESTRING, INT, BOOLEAN, DEVICE, DEVICEREP…
holoscan-module-lifecycle
Develop external Holoscan Modules with the Holoscan CLI and use them in Holoscan applications: scaffold, test, Python bindings, DEB/WHEEL packaging, and clean-consumer proof.
embedded-stm32
Best practices for embedded C/C++ development on STM32 microcontrollers using the HAL, covering peripherals, DMA, interrupts, memory constraints, and hardware-focused testing. Use when writing STM32 HAL code, configuring peripherals generated by STM32CubeMX, working with interrupts or DMA, debugging with SWD/JTAG…
opengis-skills
Use when AI coding assistant needs GIS/CAD/C#/AI/IoT/3D domain expertise. Index of 96 skills across 8 categories: gis (32), cad (21), csharp (9), ai (14), iot (2), 3d (6), demos (4), others (8). Tag-based search and on-demand loading for GDAL, GeoServer, MapServer, Leaflet, PROJ, PostGIS, JTS, CesiumJS, FreeCAD…
acad-arx-wizard
Agentic ObjectARX project scaffolding for AutoCAD 2027 / Visual Studio 2026. Replaces the broken .vsz VsWizardEngine wizard with a PowerShell script that generates identical C++ project files. Works for new ARX/DBX/CRX projects and add-on class wizards (Jig, Reactors, Custom Object, MFC, .NET Wrapper, COM Wrapper…