raspberry-pi-rust-embedded

raspberry-pi-rust-embedded is a skill for Claude Code, Codex from hamzabellouch/agent-skills. It costs 72 tokens per session (2,180 once invoked), scanned A, original, MIT.

A guide to writing Rust software for Raspberry Pi hardware, both with Linux and directly on the device without an operating system. It covers GPIO, SPI, I2C, UART, interrupts, and reusable hardware drivers.

In plain words
What is it for?
Use it when building Raspberry Pi drivers, sensor and actuator programs, embedded Linux tools, or bare-metal Rust firmware.
Why use it?
It helps developers control hardware with predictable timing while keeping low-level code safer and reusable across supported environments.

Skill for Claude CodeCodex

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

Good fit Use it when building Raspberry Pi drivers, sensor and actuator programs, embedded Linux tools, or bare-metal Rust firmware.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/raspberry-pi-rust-embedded/github.svg)](https://agentmods.dev/skills/hamzabellouch/agent-skills/raspberry-pi-rust-embedded)
Your own site
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/raspberry-pi-rust-embedded"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/raspberry-pi-rust-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 raspberry-pi-rust-embedded

Your own site · 80×15
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/raspberry-pi-rust-embedded"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/raspberry-pi-rust-embedded.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,180 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.00072 $0.02180
Opus 5 $0.00036 $0.01090
Sonnet 5 $0.00014 $0.00436
Haiku 4.5 $0.00007 $0.00218

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

Security

Grade A, and why

raspberry-pi-rust-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 5d 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.

Embedded Systems and IoT/raspberry-pi-rust-embedded/SKILL.md · 239 lines

How it starts

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

Raspberry Pi Embedded Rust Production Guidelines

This skill provides software engineering standards, memory management rules, hardware interrupt safety guidelines, and production code architectures for Raspberry Pi embedded applications using Rust (both Embedded Linux std with rppal/embedded-hal and bare-metal no_std).


1. Architecture & Driver Abstraction

1.1 Execution Environments: Embedded Linux vs. Bare-Metal

Aspect Embedded Linux (std) Bare-Metal (no_std)
OS / Kernel Linux (Raspberry Pi OS / Yocto / Buildroot) Direct hardware execution (no OS)
Hardware Access /dev/gpiomem, /dev/spidev, /dev/i2c-*, sysfs Memory-Mapped I/O (MMIO) Registers
Real-Time Determinism Soft Real-Time (PREEMPT_RT kernel optional) Hard Real-Time
Ecosystem Libraries rppal, tokio, embedded-hal, nix cortex-a, bare-metal, heapless

1.2 The embedded-hal Paradigm

Always write reusable hardware drivers against the generic embedded-hal traits rather than hardcoding platform-specific APIs:

+-------------------------------------------------------------+
|                Generic Hardware Driver                      |
| (e.g., BME280 Sensor Driver using embedded_hal::i2c::I2c)   |
+-------------------------------------------------------------+
                              |
                              v
+-------------------------------------------------------------+
|              Platform HAL Abstraction Layer                 |
|    Linux: rppal::i2c::I2c  |  Microcontroller: esp32c3_hal |
+-------------------------------------------------------------+

2. Real-Time Memory Management & Safety

2.1 Memory Guarantees in no_std & Embedded Rust

  • No Implicit Allocation: In no_std environments, heap allocations (alloc::vec::Vec, alloc::string::String) are disabled by default.
  • Static Lock-Free Queues: Use heapless::spsc::Queue for deterministic Single-Producer Single-Consumer communication between hardware interrupt handlers and processing loops.
  • Stack Budget Guardrails: Large arrays must not be created on the stack inside recursive functions or deep call chains to prevent kernel stack overflow. Use static buffers wrapped in static_cell::StaticCell or Option<T> statics.

Read the full file on GitHub · 239 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. 5d ago First seen · 239 lines · 72 tokens per session scan A 476059d48187

Subscribe to this mod's changes

raspberry-pi-rust-embedded is a skill published in the GitHub repository hamzabellouch/agent-skills (4 stars, last pushed 1mo ago), licensed MIT. It adds 72 tokens to every session and 2,180 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-09-03.