review-firmware

review-firmware is a command for Claude Code from captainluzik/oh-my-embedded. It costs 19 tokens per session (1,264 once invoked), scanned A, original, MIT.

A structured review of C and C++ firmware for embedded devices such as microcontrollers. It checks code used in memory-limited, real-time, and safety-sensitive systems.

In plain words
What is it for?
Use it to review selected firmware files or directories, or focus the review on interrupt handlers, RTOS issues, or findings above a chosen severity level.
Why use it?
It helps find memory-safety bugs, unsafe C or C++ behavior, interrupt problems, and operating-system concurrency issues before they cause device failures.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to review selected firmware files or directories, or focus the review on interrupt handlers, RTOS issues, or findings above a chosen severity level.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/captainluzik/oh-my-embedded/review-firmware
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.

Clone the repo
git clone --depth 1 https://github.com/captainluzik/oh-my-embedded

Made for: Claude Code.

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 review-firmware

README.md
[![agentmods](https://agentmods.dev/badge/commands/captainluzik/oh-my-embedded/review-firmware/github.svg)](https://agentmods.dev/commands/captainluzik/oh-my-embedded/review-firmware)
Your own site
<a href="https://agentmods.dev/commands/captainluzik/oh-my-embedded/review-firmware"><img src="https://agentmods.dev/badge/commands/captainluzik/oh-my-embedded/review-firmware/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 review-firmware

Your own site · 80×15
<a href="https://agentmods.dev/commands/captainluzik/oh-my-embedded/review-firmware"><img src="https://agentmods.dev/badge/commands/captainluzik/oh-my-embedded/review-firmware.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,264 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.00019 $0.01264
Opus 5 $0.00010 $0.00632
Sonnet 5 $0.00004 $0.00253
Haiku 4.5 $0.00002 $0.00126

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

Security

Grade A, and why

review-firmware 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 10d 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.

commands/review-firmware.md · 112 lines

How it starts

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

Perform a structured embedded firmware code review on the C/C++ source files in this project. Focus on issues that matter in constrained, real-time, and safety-sensitive environments.

Arguments

$ARGUMENTS may contain:

  • A specific file or directory to review (e.g. src/motor.c, components/sensors/).
  • A severity filter: p0, p1, p2, p3 to show only findings at that level or above.
  • The keyword isr to focus exclusively on interrupt service routine issues.
  • The keyword rtos to focus exclusively on RTOS/concurrency issues.

Step 1: Locate source files

If $ARGUMENTS specifies a path, review only that path. Otherwise scan:

  • main/, src/, lib/, components/, Core/Src/ (STM32CubeIDE layout)
  • Include: *.c, *.cpp, *.h, *.hpp
  • Exclude: build/, .pio/, managed_components/, third-party vendor directories.

List the files you will review before starting.

Step 2: Review categories

Work through each category below. For every finding, record:

  • Severity (P0-P3, defined below)
  • File and line number
  • Short title
  • Explanation of why it's a problem in an embedded context
  • Suggested fix with a corrected code snippet where helpful

Severity levels

Level Meaning
P0 Critical. Will cause crashes, data corruption, or undefined behavior at runtime. Fix before shipping.
P1 High. Likely to cause hard-to-reproduce bugs, race conditions, or silent failures under load.
P2 Medium. Bad practice that reduces reliability or portability. Should be fixed.
P3 Low. Style, readability, or minor improvement. Fix when convenient.

Category A: Memory safety

  • Stack overflows: large arrays or structs declared on the stack inside ISRs or deeply nested calls.
  • Heap fragmentation: repeated malloc/free in a loop or ISR without a pool allocator.
  • Buffer overruns: strcpy, sprintf, gets without bounds checking.
  • Use-after-free or double-free patterns.
  • Uninitialized variables used before assignment.
  • Integer overflow in pointer arithmetic or array indexing.

Read the full file on GitHub · 112 lines

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. 10d ago First seen · 112 lines · 19 tokens per session scan A f8b8ba04cffb

Subscribe to this mod's changes

review-firmware is a command published in the GitHub repository captainluzik/oh-my-embedded (24 stars, last pushed 6mo ago), licensed MIT. It adds 19 tokens to every session and 1,264 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-30.