- Home
- Skills
- Code Quality & Review
- C and C++ Development for Embedded Targets
More screenshots
Works with the AI Agents you already use
C and C++ Development for Embedded Targets
Write and review C and C++ for 32-bit embedded targets: memory budgets, explicit lifetimes, interrupt discipline, and DMA and hardware rules that keep firmware booted in the field.
$5
C and C++ Development for Embedded Targets
Example session with this skill installed
Review the core of our battery sensor node's firmware before we freeze it. The UART driver allocates its receive buffer at boot, the RX interrupt parses messages, a radio task reads a shared 64-bit timestamp, and a timer interrupt pets the watchdog. Tell us what breaks in the field.
- Read your context and instructions
- Compiled the c and c++
FINDINGS (from the code as described):
-
BLOCKER — The ISR does the parsing. Every received byte runs full message parsing in interrupt context; at 115200 baud a burst starves the sampling task, and parsing can block on a full queue. Fix: the ISR stores bytes in a ring buffer and sets a flag; parsing moves to task context where blocking is legal.
-
BLOCKER — The watchdog is petted from a timer ISR. If the main loop hangs, the timer still fires and the watchdog never bites. It currently watches nothing. Fix: pet only from the main loop, after the sampling and forwarding health checks pass.
-
HIGH — Torn 64-bit read. The radio task reads the shared timestamp unguarded; on this 32-bit core that read is several instructions, and an interrupt mid-read tears the value in half. Fix: copy it under a short critical section, per the skill's tick pattern.
-
HIGH — malloc at boot with no failure path. If the allocation fails, the driver runs on with a null buffer. Fix: make the receive buffer static — it is fixed-size and lives forever anyway — and remove the heap from the boot path entirely.
-
MEDIUM — A status register polled through a plain pointer cast. Works at -O0 today; at -O2 the compiler may hoist the read out of the loop and hang the driver. Fix: the vendor's volatile struct-pointer pattern.
BUDGET CHECK: worksheet from the map file shows both task stacks plus statics at 2.1 KB of 4 KB RAM once parsing leaves the ISR — tight, recorded, and honest.
VERDICT: Do not freeze. Findings 1 and 2 are field failures on a random fuse; all five fixes are small and land in one revision.
Connects securely to your tools. The creator never sees your data.
About this skill
A discipline for C and C++ where the machine is the spec: a few kilobytes of RAM, an interrupt that fires whenever it wants, and a compiler that will optimize your bug into production. The skill covers five habit groups. Own every byte: worst-case stack estimates instead of hope, struct layout designed for the wire instead of the compiler's defaults, and 64-bit types treated as expensive, non-atomic guests on a 32-bit core. Lifetimes are contracts: one owner and one release point per buffer, borrowed pointers that expire on schedule, and loud invalidation so stale handles fail in review instead of in production. The interrupt boundary is sacred: ISRs capture data and get out, shared state gets volatile plus a real access protocol, and nothing blocks in interrupt context — with the canonical ISR-captures/task-processes code pattern included. Hardware access without superstition: volatile memory-mapped registers, read-modify-write hazards, and DMA buffers placed where the controller can actually reach them. And prove it boots: dependency-ordered initialization, a watchdog petted only from a healthy main loop, and a reset reason kept in no-init RAM. Comes with a buffer placement decision table, a memory budget worksheet filled from the linker map file, a complete worked example (a UART receive path for a sensor node, with its two caught bugs), edge cases for cached cores, toolchain upgrades, C++ on small targets, and vendor HAL code, and a review checklist that doubles as the quality gate.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
- It works from the code and budgets you provide; it cannot measure your hardware — stack high-water marks and timing still need on-target confirmation.
- Examples center on 32-bit ARM-class parts; 8-bit and DSP targets share the principles but differ in costs and idioms.
- It is a coding discipline, not a substitute for your toolchain's static analysis or a safety certification process where one is required.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 24 days ago
Permissions
No special permissions declared or detected