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/bootloader-patternsnpx skills add HermeticOrmus/LibreEmbed-Claude-Code --skill bootloader-patternsgit 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.01700 |
| Opus 5 | $0.00000 | $0.00850 |
| Sonnet 5 | $0.00000 | $0.00340 |
| Haiku 4.5 | $0.00000 | $0.00170 |
Grade A, and why
bootloader-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 2d 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 — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
bootloader-patterns
Knowledge Base
Production bootloader patterns for STM32, nRF52, and SAM MCUs.
Pattern 1: Boot Decision Tree
Power-on Reset
│
▼
Read boot flag (RTC backup register or dedicated NVM byte)
│
├── FLAG_UPDATE_PENDING ──► Receive new image via UART/CAN/USB
│ │
│ ▼
│ Write to inactive bank
│ │
│ Verify CRC + signature
│ │
│ Set FLAG_BOOT_NEW, reset
│
├── FLAG_BOOT_NEW ──► Validate image at new bank
│ │
│ ├── OK ─► Clear flag, increment boot counter,
│ │ jump to new image
│ │
│ └── FAIL ─► Increment failure counter
│ │
│ └── > 3 fails ─► Revert to golden
│
└── FLAG_NONE ──► Validate active bank image
│
├── OK ─► Jump to application
│
└── FAIL ─► Fall back to recovery UART mode
Pattern 2: RTC Backup Register for Boot Flags
STM32 RTC backup registers survive reset (not power-off). Ideal for bootloader flags.
#define BKP_REG_BOOT_FLAG RTC->BKP0R
#define BOOT_FLAG_NONE 0x00000000UL
#define BOOT_FLAG_UPDATE 0xA5A5A5A5UL
#define BOOT_FLAG_BOOT_NEW 0x5A5A5A5AUL
void bootflag_set(uint32_t flag)
{
/* Enable backup domain access */
RCC->APB1ENR |= RCC_APB1ENR_PWREN;
PWR->CR |= PWR_CR_DBP;
BKP_REG_BOOT_FLAG = flag;
PWR->CR &= ~PWR_CR_DBP;
}
uint32_t bootflag_get(void)
{
RCC->APB1ENR |= RCC_APB1ENR_PWREN;
PWR->CR |= PWR_CR_DBP;
return BKP_REG_BOOT_FLAG;
}
Pattern 3: Dual-Bank Flash Layout (STM32F407, 1MB)
0x08000000 ┌─────────────────────────┐ Sector 0 (16KB)
│ Primary Bootloader │ Write-protected
│ (golden copy) │
0x08004000 ├─────────────────────────┤ Sector 1 (16KB)
│ Bootloader config │
│ (version NVM, keys) │
0x08008000 ├─────────────────────────┤ Sectors 2-3 (32KB)
│ Application Bank A │ Active
│ (img_header + app) │
0x08040000 ├─────────────────────────┤ Sector 6 (128KB)
│ Application Bank B │ OTA target
│ (img_header + app) │
0x080C0000 ├─────────────────────────┤ Sector 10 (128KB)
│ Application Data │
│ (settings, logs) │
0x08100000 └─────────────────────────┘
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.
- 2d ago First seen · 195 lines · 0 tokens per session scan A 064f54ad27ac
bootloader-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,700 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.