bare-metal-patterns SKILL.md skillA
bare-metal-patterns from hermeticormus/libreembed-claude-code is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add hermeticormus/libreembed-claude-code/bare-metal-patterns@git:20260930.ba05790Pins git:20260930.ba05790 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- hermeticormus/libreembed-claude-code
- Path
plugins/bare-metal/skills/bare-metal-patterns/SKILL.md- Versions recorded
- 4
- Latest version
- git:20260930.ba05790, committed Sep 30, 2026
- First version recorded
- Feb 25, 2026
- Size
- 7,368 bytes
- Repository stars
- 51
- License
- MIT
Register-level C patterns for Cortex-M without a HAL: bit manipulation macros, GPIO and polled UART setup, SysTick timebase, interrupt-driven UART ring buffer, linker sections and map files, and weak default ISR handlers. Use when writing or reviewing HAL-free drivers and startup code.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 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.
```c
/* 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:
```c
/* PA5 = LED (push-pull output), PA0 = button (input, pull-up) */
void gpio_init(void)
{
/* 1. Enable GPIOA clock */
…Read the whole file at its exact version.
How to install
mdr add hermeticormus/libreembed-claude-code/bare-metal-patterns@sha256:621c67cf4f907ebcThe line at the top of this page pins the label git:20260930.ba05790, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_riognsaiqknehfpb)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 4 versions of this file, between Feb 25, 2026 and Sep 30, 2026, about one every 73 days. Its first recorded version is graded C and its latest A.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260930.ba05790 latest | 2026-09-30 | ba05790 | 7,368 B | A | view · diff |
| git:20260930.dffc082 | 2026-09-30 | dffc082 | 7,132 B | A | view · diff |
| git:20260226.186740f | 2026-02-26 | 186740f | 7,029 B | C | view · diff |
| git:20260225.a4aeb64 | 2026-02-25 | a4aeb64 | 2,959 B | C | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (7368 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
hermeticormus/libreembed-claude-code · 51 stars · license MIT · pushed 2026-10-09 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_riognsaiqknehfpb GET https://markdownregistry.com/api/v1/resolve?ref=hermeticormus/libreembed-claude-code/bare-metal-patterns GET https://markdownregistry.com/api/v1/blob/621c67cf4f907ebc61e277e0bd79feb1390908681c46e34b65922762f6aa18a8
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.