Embedded C/C++ rules for MCU, STM32, HAL, interrupts, DMA, memory constraints, a

Embedded C/C++ rules for MCU, STM32, HAL, interrupts, DMA, memory constraints, a is a skill for Claude Code, Codex from AmariahAK/atlarix-skills. It costs 21 tokens per session (600 once invoked), scanned A, original, Apache-2.0.

Coding rules for embedded C and C++ systems, especially STM32 microcontrollers and their hardware-abstraction library. These systems run software directly on small hardware devices with limited memory and timing constraints.

In plain words
What is it for?
Use them when building STM32 firmware involving peripherals, DMA, interrupts, memory limits, board support, and hardware-focused tests.
Why use it?
The rules help separate hardware code from application logic, handle interrupts and errors safely, and keep time-sensitive code predictable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use them when building STM32 firmware involving peripherals, DMA, interrupts, memory limits, board support, and hardware-focused tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/amariahak/atlarix-skills/acr-embedded-stm32-hal
Install

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.

Any agent
npx skills add AmariahAK/atlarix-skills --skill acr-embedded-stm32-hal
Clone the repo
git clone --depth 1 https://github.com/AmariahAK/atlarix-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for Embedded C/C++ rules for MCU, STM32, HAL, interrupts, DMA, memory constraints, a

README.md
[![agentmods](https://agentmods.dev/badge/skills/amariahak/atlarix-skills/acr-embedded-stm32-hal/github.svg)](https://agentmods.dev/skills/amariahak/atlarix-skills/acr-embedded-stm32-hal)
Your own site
<a href="https://agentmods.dev/skills/amariahak/atlarix-skills/acr-embedded-stm32-hal"><img src="https://agentmods.dev/badge/skills/amariahak/atlarix-skills/acr-embedded-stm32-hal/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.

agentmods 80×15 button for Embedded C/C++ rules for MCU, STM32, HAL, interrupts, DMA, memory constraints, a

Your own site · 80×15
<a href="https://agentmods.dev/skills/amariahak/atlarix-skills/acr-embedded-stm32-hal"><img src="https://agentmods.dev/badge/skills/amariahak/atlarix-skills/acr-embedded-stm32-hal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 600 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.00600
Opus 5 $0.00010 $0.00300
Sonnet 5 $0.00004 $0.00120
Haiku 4.5 $0.00002 $0.00060

Measured 11d ago against content hash 780c416c332e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

Embedded C/C++ rules for MCU, STM32, HAL, interrupts, DMA, memory constraints, a 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 11d 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.

skills/acr-embedded-stm32-hal/SKILL.md · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Embedded C/C++ rules for MCU, STM32, HAL, interrupts, DMA, memory constraints, a

When to use this skill

Embedded C/C++ rules for MCU, STM32, HAL, interrupts, DMA, memory constraints, and hardware-focused testing

Source

Synced from https://github.com/PatrickJS/awesome-cursorrules/tree/main/rules/embedded-stm32-hal.mdc.

Embedded MCU, STM32, and HAL Rules

Project Structure

  • Keep board support, drivers, middleware, application logic, and tests separate.
  • Isolate generated CubeMX or vendor code from hand-written application code.
  • Put hardware abstraction behind narrow interfaces so logic can be tested without hardware.
  • Document clock tree, pin mappings, peripheral ownership, and interrupt priorities.

STM32 HAL and Peripherals

  • Initialize peripherals in one place and avoid hidden reconfiguration.
  • Check return values from HAL calls and handle timeout/error cases.
  • Keep blocking HAL calls out of time-critical paths.
  • Use DMA for high-throughput UART, SPI, I2C, ADC, or timer capture paths when appropriate.
  • Document buffer ownership and lifetime for DMA operations.
  • Use volatile only for memory shared with ISRs or hardware registers.

Interrupts and Concurrency

  • Keep ISRs short and deterministic.
  • Defer heavy work from interrupts to the main loop, RTOS task, or event queue.
  • Protect shared data with critical sections, atomics, queues, or RTOS primitives.
  • Avoid dynamic allocation in interrupts.
  • Make interrupt priority decisions explicit.

Memory and Timing

  • Avoid heap allocation in firmware unless the project explicitly allows it.
  • Check stack usage for ISRs and RTOS tasks.
  • Keep lookup tables const so they can live in flash.
  • Use fixed-width integer types for hardware-facing code.
  • Add timeouts for hardware waits.
  • Treat watchdog configuration as part of application design, not a late add-on.

Testing and Debugging

  • Unit test pure logic on host builds.
  • Use hardware-in-the-loop tests for peripheral behavior.
  • Add assertions for impossible hardware states in debug builds.
  • Use SWD/JTAG, logic analyzers, and serial logs with rate limits.
  • Keep fault handlers useful: capture reset reason, fault registers, and build version when possible.

Read the full file on GitHub · 67 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 11d ago First seen · 67 lines · 21 tokens per session scan A 780c416c332e

Subscribe to this mod's changes

Embedded C/C++ rules for MCU, STM32, HAL, interrupts, DMA, memory constraints, a is a skill published in the GitHub repository AmariahAK/atlarix-skills (2 stars, last pushed 5d ago), licensed Apache-2.0. It adds 21 tokens to every session and 600 once invoked, about $0.0001 per session on Opus 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-31.

Related

Other skills, from other repositories

optimize-global-memory-access

Guide the agent through diagnosing and restructuring CUDA global memory access patterns to maximize effective memory bandwidth, covering coalescing requirements, vectorized loads, AoS vs SoA layouts, shared memory staging for non-coalesced patterns, and L2 cache behavior.

tensormux/kernel-skills · 0 tokens

c-pro

Write efficient C code with proper memory management, pointer arithmetic, and system calls. Handles embedded systems, kernel modules, and performance-critical code. Use PROACTIVELY for C optimization, memory issues, or system programming.

Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI · 47 tokens

github-trending

A research and reporting skill for finding popular open-source projects on GitHub and analyzing technology trends. GitHub Trending is a list of repositories receiving notable recent attention.

majiayu000/spellbook · 81 tokens

opengis-skills

Use when AI coding assistant needs GIS/CAD/C#/AI/IoT/3D domain expertise for 75 open-source projects. One-stop skill index with tag-based search and on-demand loading for GDAL, GeoServer, QGIS, PostGIS, JTS, CesiumJS, FreeCAD, OpenSCAD, OCCT, NPOI, SqlSugar, Furion, Dify, SuperSplat, Go and more.

znlgis/opengis-skills · 96 tokens

hip-kernel-optimization

This skill should be used when writing or tuning HIP kernels on AMD/NVIDIA GPUs, covering memory coalescing, shared-memory tiling, bank conflict avoidance, warp primitives, occupancy, vectorization, async ops, loop unrolling, and profiling.

AMD-AGI/Apex · 56 tokens

cpp-debugging

Use when a C++ failure involves memory lifetime, undefined behavior, native crashes, or debugger-only state — debug with symbols, sanitizers, and platform-native debuggers before patching symptoms.

drvoss/everything-copilot-cli · 42 tokens