stm32-code-review

stm32-code-review is a skill for Claude Code, Codex from bahaabdelwahed/embedded-claude-plugin. It costs 70 tokens per session (1,201 once invoked), scanned A, a copy of written-communication, MIT.

A review workflow for STM32 embedded code, with attention to hardware configuration and firmware correctness. STM32 is a family of microcontrollers used in embedded devices.

In plain words
What is it for?
Use it to review STM32 firmware, check clocks and peripheral initialization, inspect GPIO, interrupt, DMA, and HAL code, consult a provided reference manual, and regenerate corrected code.
Why use it?
It helps find configuration mistakes that may cause hardware failures, such as incorrect clocks, peripheral setup, interrupts, or DMA. Issues are grouped by how seriously they affect operation.

Skill for Claude CodeCodex

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

Good fit Use it to review STM32 firmware, check clocks and peripheral initialization, inspect GPIO, interrupt, DMA, and HAL code, consult a provided reference manual, and regenerate corrected code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bahaabdelwahed/embedded-claude-plugin/stm32-code-review
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 bahaabdelwahed/embedded-claude-plugin --skill stm32-code-review
Clone the repo
git clone --depth 1 https://github.com/bahaabdelwahed/embedded-claude-plugin

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 stm32-code-review

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/bahaabdelwahed/embedded-claude-plugin/stm32-code-review"><img src="https://agentmods.dev/badge/skills/bahaabdelwahed/embedded-claude-plugin/stm32-code-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,201 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 86% copy Near-identical to another mod 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.00070 $0.01201
Opus 5 $0.00035 $0.00600
Sonnet 5 $0.00014 $0.00240
Haiku 4.5 $0.00007 $0.00120

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

Security

Grade A, and why

stm32-code-review 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 9d 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.

Origin

This is a copy

86% identical to written-communication — 152 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/stm32-code-review/SKILL.md · 128 lines

How it starts

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

STM32 Code Review

Perform STM32-specific code review focusing on hardware correctness, peripheral configuration, and embedded best practices.

Review Process

  1. Read the code to be reviewed (all relevant source files)
  2. Identify STM32-specific concerns using the checklist categories below
  3. Check against documentation if available (reference manual in docs/reference-manual/)
  4. List issues by severity: Critical (will cause failure), High (likely causes bugs), Medium (bad practice)
  5. Regenerate the code with all fixes applied

Review Checklist Categories

1. Clock Configuration

  • RCC PLL settings produce the intended SYSCLK frequency
  • Flash wait states (FLASH_ACR LATENCY) match the HCLK frequency
  • APB1 prescaler respects maximum APB1 frequency
  • APB2 prescaler respects maximum APB2 frequency
  • Peripheral clocks are enabled BEFORE accessing peripheral registers
  • HSE/HSI startup timeout is checked before proceeding

2. Peripheral Initialization Order

  • GPIO port clock enabled before GPIO configuration
  • Peripheral clock enabled before peripheral register access
  • GPIO configured as alternate function BEFORE peripheral enable
  • NVIC configured AFTER peripheral is set up
  • DMA configured BEFORE peripheral DMA request is enabled
  • Peripheral enable bit set LAST in the initialization sequence

3. Interrupt Configuration

  • NVIC priority group is set once at startup (consistent grouping)
  • Interrupt priorities are within valid range for the MCU's __NVIC_PRIO_BITS
  • FreeRTOS boundary respected: ISR priority >= configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY if calling FreeRTOS APIs
  • All enabled interrupts have corresponding handler implementations
  • Pending flags are cleared BEFORE enabling the interrupt
  • No shared IRQ handler that only handles one source (check all flags)

4. DMA Configuration

  • DMA stream/channel matches the peripheral (verify against RM DMA request mapping)
  • Two peripherals do not share the same DMA stream (conflict)
  • Transfer direction is correct (peripheral-to-memory, memory-to-peripheral, memory-to-memory)
  • Data sizes match (peripheral and memory data width alignment)
  • Circular mode used correctly (buffer overwrite considerations)
  • DMA transfer complete flag is cleared before starting new transfer
  • FIFO threshold is compatible with burst size (if FIFO enabled)
  • DMA buffers are in DMA-accessible SRAM (NOT in CCM/TCM)
  • DMA buffers are properly aligned (__attribute__((aligned(4))))

Read the full file on GitHub · 128 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. 9d ago First seen · 128 lines · 70 tokens per session scan A a1ffa9cd838a

Subscribe to this mod's changes

stm32-code-review is a skill published in the GitHub repository bahaabdelwahed/embedded-claude-plugin (5 stars, last pushed 5mo ago), licensed MIT. It adds 70 tokens to every session and 1,201 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to written-communication, differing in 152 lines, and is treated as a copy.