c-embedded

c-embedded is a skill for Claude Code, Codex from JakubMikolajek/codex-skills-collection. It costs 77 tokens per session (4,656 once invoked), scanned A, original, MIT.

Patterns for writing C programs that run on embedded devices such as microcontrollers, which are small computers built into hardware products.

In plain words
What is it for?
It helps manage memory, use fixed-size numbers, access hardware registers, handle interrupts safely, and write reliable firmware for resource-constrained devices.
Why use it?
Embedded devices often have very little memory and no operating-system safety net, so mistakes can corrupt data, stop hardware, or drain batteries.

Skill for Claude CodeCodex

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

Good fit It helps manage memory, use fixed-size numbers, access hardware registers, handle interrupts safely, and write reliable firmware for resource-constrained devices.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jakubmikolajek/codex-skills-collection/c-embedded
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 JakubMikolajek/codex-skills-collection --skill c-embedded
Clone the repo
git clone --depth 1 https://github.com/JakubMikolajek/codex-skills-collection

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 c-embedded

README.md
[![agentmods](https://agentmods.dev/badge/skills/jakubmikolajek/codex-skills-collection/c-embedded/github.svg)](https://agentmods.dev/skills/jakubmikolajek/codex-skills-collection/c-embedded)
Your own site
<a href="https://agentmods.dev/skills/jakubmikolajek/codex-skills-collection/c-embedded"><img src="https://agentmods.dev/badge/skills/jakubmikolajek/codex-skills-collection/c-embedded/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 c-embedded

Your own site · 80×15
<a href="https://agentmods.dev/skills/jakubmikolajek/codex-skills-collection/c-embedded"><img src="https://agentmods.dev/badge/skills/jakubmikolajek/codex-skills-collection/c-embedded.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,656 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 480
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00077 $0.04656
Opus 5 $0.00039 $0.02328
Sonnet 5 $0.00015 $0.00931
Haiku 4.5 $0.00008 $0.00466

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

Security

Grade A, and why

c-embedded 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/c-embedded/SKILL.md · 497 lines

How it starts

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

C for Embedded Systems

Embedded C is not desktop C. The constraints are different: no OS memory safety net, limited RAM measured in kilobytes, peripherals mapped to memory addresses, and bugs that brick hardware or cause silent data corruption. This skill covers the patterns that separate reliable firmware from firmware that works until it doesn't.

When to Use

  • Writing C code for any microcontroller (ESP32, STM32, AVR, RP2040, or similar)
  • Reviewing firmware for correctness, safety, and resource usage
  • Any task involving hardware registers, interrupts, or peripheral drivers
  • Porting or refactoring embedded C code

When NOT to Use

  • ESP32-specific SDK patterns (FreeRTOS tasks, NVS, WiFi) — use esp32-idf
  • High-level Arduino sketches with no direct hardware access — the patterns here apply but are not primary
  • Rust embedded (no_std) — different ownership model, different skill

Core Principle

In embedded, undefined behavior kills hardware. Integer overflow, uninitialized memory, and race conditions are not academic concerns — they corrupt sensor readings, lock up peripherals, or drain batteries. Every pattern here exists to prevent a specific class of hardware failure.

Delivery Workflow

Embedded C progress:
- [ ] Step 1: Establish memory budget and stack/heap constraints
- [ ] Step 2: Define types and data structures with explicit widths
- [ ] Step 3: Implement peripheral access with correct volatile/const usage
- [ ] Step 4: Handle interrupts safely
- [ ] Step 5: Verify error handling and defensive coding
- [ ] Step 6: Review for undefined behavior and resource leaks

Types and Fixed-Width Integers

Never use int, long, or unsigned in embedded code. Their sizes are platform-defined and change between architectures.

#include <stdint.h>
#include <stdbool.h>

// Always use fixed-width types
uint8_t  byte_val;      // 0–255, GPIO state, single register byte
uint16_t adc_raw;       // 0–65535, 12-bit ADC fits here
uint32_t timestamp_ms;  // millisecond uptime counter
int16_t  temperature;   // signed sensor value in 0.1°C units
int32_t  error_code;    // signed for negative error values

// Size-explicit struct for protocol frames
typedef struct __attribute__((packed)) {
    uint8_t  start_byte;   // 0xAA
    uint16_t device_id;
    uint8_t  cmd;
    uint16_t payload_len;
    uint8_t  checksum;
} uart_frame_t;
// __attribute__((packed)) prevents padding — critical for wire protocols

// Never do this in embedded:
int count;          // 16-bit on AVR, 32-bit on ARM — unpredictable
long timeout;       // 32-bit on some, 64-bit on others

Read the full file on GitHub · 497 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. 11d ago First seen · 497 lines · 77 tokens per session scan A 0fba155005b9

Subscribe to this mod's changes

c-embedded is a skill published in the GitHub repository JakubMikolajek/codex-skills-collection (5 stars, last pushed 5d ago), licensed MIT. It adds 77 tokens to every session and 4,656 once invoked, about $0.0004 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

gke-compute-classes

Configures, optimizes, and troubleshoots GKE ComputeClasses. Use when configuring Spot VMs with on-demand fallback, targeting specific accelerators (GPUs/TPUs) or machine families, restricting ComputeClass access, or debugging pending pods related to node pool auto-creation. Do not use for cluster-level Node Auto…

google/skills · 83 tokens

jetson-diagnostic

Read-only Jetson health snapshot for identity, memory, GPU, thermal, power, storage, services, and top processes.

NVIDIA/skills · 30 tokens

doca-socket-relay

Use this skill when the operator is driving the DOCA Socket Relay to bridge a socket-oriented host application onto a BlueField DPU peer without rewriting it — picking the deployment shape (in-process, sidecar, or BlueField service container), configuring the host-side socket and the DPU-side forwarding endpoint…

NVIDIA/skills · 236 tokens

offensive-z-wave

Z-Wave attack methodology — sniffing with Z-Force / EZ-Wave / RTL-SDR + ZniffMobile, S0 (legacy) network-key derivation flaw and key reuse, S2 (modern) ECDH commissioning analysis, replay/injection on unauthenticated nodes, default-key brute-force on test deployments, and home-automation hub pivots. Use when targeting…

SnailSploit/Claude-Red · 113 tokens

hsb-flash

Flash the FPGA on an HSB board connected to an NVIDIA devkit. Supports HSB Lattice boards (FPGA versions 2407, 2412, 2507, 2510) and Leopard Imaging VB1940 "all-in-one" cameras (FPGA versions 2507, 2510). Uses release-specific YAML manifests and board-type-specific program commands. Lattice and VB1940 commands must…

NVIDIA/skills · 94 tokens

jetson-validate-image

Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.

NVIDIA/skills · 50 tokens