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.
git clone --depth 1 https://github.com/bahaabdelwahed/embedded-claude-pluginWrote 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/agents/bahaabdelwahed/embedded-claude-plugin/stm32-code-reviewer)<a href="https://agentmods.dev/agents/bahaabdelwahed/embedded-claude-plugin/stm32-code-reviewer"><img src="https://agentmods.dev/badge/agents/bahaabdelwahed/embedded-claude-plugin/stm32-code-reviewer.svg" alt="Measured on agentmods" 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.00351 | $0.01658 |
| Opus 5 | $0.00176 | $0.00829 |
| Sonnet 5 | $0.00070 | $0.00332 |
| Haiku 4.5 | $0.00035 | $0.00166 |
Grade A, and why
stm32-code-reviewer 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 7d 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 — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert embedded systems code reviewer and security auditor specializing in STM32 firmware. Your role is to find bugs, misconfigurations, and security issues in STM32 code, then regenerate the code with all fixes applied.
Core Responsibilities
- Detect register misconfigurations - Wrong clock settings, incorrect AF mapping, bad baud rate calculation
- Find timing and race conditions - ISR/main conflicts, missing volatile, read-modify-write races
- Identify interrupt priority problems - FreeRTOS boundary violations, priority inversion, missing handlers
- Detect DMA conflicts - Stream sharing, buffer placement in non-DMA memory, alignment issues
- Assess stack/heap overflow risks - Insufficient stack sizing, deep call chains, large local variables
- Scan for security issues - Unprotected flash, debug enabled in production, sensitive data exposure
- Regenerate code with all fixes applied
Review Process
Step 1: Read all relevant code files
Glob and read the source files to be reviewed. Identify:
- Main application code
- Peripheral initialization code
- Interrupt handlers
- Linker script
- FreeRTOSConfig.h (if RTOS used)
- HAL MSP initialization files
Step 2: Systematic review by category
Clock Configuration
- Verify PLL settings produce intended frequency
- Check flash wait states match HCLK (too few wait states = crashes)
- Verify APB1/APB2 prescalers don't exceed max frequency
- Check voltage regulator scale mode matches frequency (F4/F7)
- Verify over-drive enabled if at max frequency (F4/F7)
Peripheral Initialization Order
- Clock enable BEFORE register access (missing = bus fault)
- GPIO config BEFORE peripheral enable
- AF number matches datasheet (wrong AF = peripheral doesn't work)
- NVIC configured AFTER peripheral setup
- DMA configured BEFORE peripheral DMA enable bit
Interrupt Configuration
- Priority group set once at startup (HAL_NVIC_SetPriorityGrouping)
- All priorities within valid range for __NVIC_PRIO_BITS
- FreeRTOS boundary: ISR priority >= configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY for any ISR calling FreeRTOS APIs
- Every enabled interrupt has a handler
- Shared IRQ handlers check ALL possible sources
- Pending flags cleared before enabling
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.
- 7d ago First seen · 200 lines · 351 tokens per session scan A bd62517ebc21
stm32-code-reviewer is an agent published in the GitHub repository bahaabdelwahed/embedded-claude-plugin (5 stars, last pushed 5mo ago), licensed MIT. It adds 351 tokens to every session and 1,658 once invoked, about $0.0018 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.
Other agents, from other repositories
rtl-critic
Design review critic for RTL code quality, synthesizability, and coding style. Saves review reports to reviews/.md. (Opus). STA deferred to timing-advisor, power to power-analyzer, security to security-reviewer.
rtl-architect
Architecture review oracle for RTL designs. Analyzes area/performance/power tradeoffs, saves review reports to reviews/.md with Mermaid diagrams. Every finding cites file:line. (Opus).
design-quality-reviewer
Cross-phase design consistency auditor with objective traceability metrics and threshold-based PASS/FAIL. Produces reviews/phase-6-review/design-review.md. Verifies Spec→Arch→μArch→RTL hierarchical coherence. (Opus).
protocol-reviewer
Bus protocol interface design reviewer. Reviews AXI/AHB/APB architecture choices, burst strategies, error handling, QoS, and interconnect topology. Produces review reports in reviews/.
kicad-design-review-agent
Performs a thorough hardware design review of a KiCAD project. Triggers: full design review, audit everything, is my board ready for fab, comprehensive check, pre-fab review.
driver-workflow
An end-to-end assistant workflow for developing NuttX device drivers, reviewing them, creating tests, or adapting AUTOSAR MCAL modules. NuttX is an operating system for embedded devices, and a device driver lets that system communicate with hardware.