embedded-rust

embedded-rust is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 107 tokens per session (1,822 once invoked), scanned C, original, MIT.

A guide for writing Rust programs that run directly on microcontrollers without a full operating system. It covers firmware setup, device flashing and debugging, logging, concurrency, startup code, and handling panics.

In plain words
What is it for?
Use it when developing bare-metal Rust with probe-rs or cargo-embed, defmt logging, the RTIC concurrency framework, cortex-m-rt startup, no_std and no_main, or panic handlers.
Why use it?
Microcontroller programs have limited resources and need different tools and runtime choices from ordinary desktop applications. The guide helps choose and configure the pieces needed to build and inspect that firmware.

Skill for Claude CodeCodex

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

Good fit Use it when developing bare-metal Rust with probe-rs or cargo-embed, defmt logging, the RTIC concurrency framework, cortex-m-rt startup, no_std and no_main, or panic handlers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/embedded-rust
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 mohitmishra786/low-level-dev-skills --skill embedded-rust
Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/embedded-rust.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/embedded-rust)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/embedded-rust"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/embedded-rust.svg" alt="Measured on agentmods" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,822 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 4 Mar 2026
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.00107 $0.01822
Opus 5 $0.00053 $0.00911
Sonnet 5 $0.00021 $0.00364
Haiku 4.5 $0.00011 $0.00182

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

Security

Grade C, and why

embedded-rust scanned grade C with 2 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 8d 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh
skills/embedded/embedded-rust/SKILL.md · 225 lines

How it starts

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

Embedded Rust

Purpose

Guide agents through embedded Rust development: flashing and debugging with probe-rs/cargo-embed, structured logging with defmt, the RTIC concurrency framework, cortex-m-rt startup, no_std configuration, and panic handler selection.

Triggers

  • "How do I flash my Rust firmware to an MCU?"
  • "How do I debug my embedded Rust program?"
  • "How do I use defmt for logging in embedded Rust?"
  • "How do I use RTIC for interrupt-driven concurrency?"
  • "What does #![no_std] #![no_main] mean for embedded Rust?"
  • "How do I handle panics in no_std embedded Rust?"

Workflow

1. Project setup

# Cargo.toml
[package]
name = "my-firmware"
version = "0.1.0"
edition = "2021"

[dependencies]
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
cortex-m-rt = "0.7"
defmt = "0.3"
defmt-rtt = "0.4"
panic-probe = { version = "0.3", features = ["print-defmt"] }

# Embassy (async embedded) — alternative to RTIC
# embassy-executor = { version = "0.5", features = ["arch-cortex-m"] }

[profile.release]
opt-level = "s"       # size optimization for embedded
lto = true
codegen-units = 1
debug = true          # keep debug info for defmt/probe-rs

# .cargo/config.toml
[build]
target = "thumbv7em-none-eabihf"    # Cortex-M4F / M7

[target.thumbv7em-none-eabihf]
runner = "probe-rs run --chip STM32F411CEUx"    # auto-run after build
rustflags = ["-C", "link-arg=-Tlink.x"]         # cortex-m-rt linker script

2. Minimal bare-metal program

// src/main.rs
#![no_std]
#![no_main]

use cortex_m_rt::entry;
use defmt::info;
use defmt_rtt as _;      // RTT transport for defmt
use panic_probe as _;    // panic handler that prints via defmt

#[entry]
fn main() -> ! {
    info!("Booting up!");

    // Access peripherals via PAC or HAL
    let _core = cortex_m::Peripherals::take().unwrap();
    // let dp = stm32f4xx_hal::pac::Peripherals::take().unwrap();

    loop {
        info!("Running...");
        cortex_m::asm::delay(8_000_000);  // rough delay
    }
}

Read the full file on GitHub · 225 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. 8d ago First seen · 225 lines · 107 tokens per session scan C 613da69cc1c8

Subscribe to this mod's changes

embedded-rust is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (196 stars, last pushed 2mo ago), licensed MIT. It adds 107 tokens to every session and 1,822 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

wasm

WebAssembly (WASM) integration, WASI, component model, Rust/Go to WASM compilation. Use when implementing WASM modules, browser/edge compute, or polyglot runtime.

TheBeardedBearSAS/claude-craft · 43 tokens

domain-embedded

A guide for developing Rust software that runs directly on microcontrollers or other hardware without a standard operating system. This includes firmware, hardware interfaces, and peripherals.

actionbook/rust-skills · 91 tokens

analyzing-rust-malware-internals

Analyzes Rust-compiled malware by detecting the Rust toolchain signature, demangling Rust v0/legacy symbol names, and identifying crate dependencies from embedded paths. Activates for requests to analyze Rust malware, demangle Rust symbols, or identify a Rust binary build and its crates.

meltedinhex/analyst-ai-pack · 67 tokens

raspberry-pi-rust-embedded

Production-grade embedded Rust guidelines for Raspberry Pi (bare-metal nostd and Linux embedded std/rppal/embedded-hal). Use when developing low-latency hardware control apps, embedded Rust drivers, Linux GPIO/SPI/I2C/UART software, real-time interrupt handlers, and memory-safe hardware abstractions.

hamzabellouch/agent-skills · 72 tokens

woml

Create, explain, validate, and repair WOML workflow automation files. Use when a task involves .woml files, WOML triggers, steps, embedded JavaScript, context references, control flow, approvals, lifecycle hooks, services, providers, secrets, local modules, or WOML CLI operations.

dali-benothmen/woml · 66 tokens

codesys

Comprehensive operational skill specification for Anthropic Claude to automate, script, troubleshoot, and optimize CODESYS V3.5, IEC 61131-3 Structured Text (ST), ScriptEngine Python automation, EtherCAT/PROFINET, and OPC UA.

alivirgo/Major-AI-Skills · 56 tokens