# domain-embedded

Guides embedded and no_std Rust work around memory, interrupts, and peripheral access. Use it when building firmware for microcontrollers.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2900 installs · ★ 1545
- Author: actionbook
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/actionbook/rust-skills/tree/HEAD/skills/domain-embedded/SKILL.md
- Updated: 2026-08-23
- HTML: https://affpapa.org/en/nevibecode/skills/domain-embedded

## What it does

This skill adds embedded Rust constraints to the agent context: no heap, static buffers, peripheral ownership, and interrupt-safe shared state. It steers code away from `Vec` towards `heapless::Vec<T, N>`, and points to critical sections with `Mutex<RefCell<T>>` where state is shared.

It watches `Cargo.toml` and `.cargo/config.toml`, including the target configuration. The guidance covers PAC and HAL layers, `embedded-hal`, RTIC, Embassy, plus patterns based on `#![no_std]`, `#![no_main]`, `#[entry]`, and static state.

Blocking code does not belong in an ISR because it can delay other interrupts. That is a reason to inspect interrupt handlers before adding I/O work.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill domain-embedded -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/domain-embedded/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/domain-embedded/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill domain-embedded -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/domain-embedded/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill domain-embedded -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/domain-embedded/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install actionbook/rust-skills domain-embedded
```

2. **Manually: put the files in place**
- File: `.github/skills/domain-embedded/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill domain-embedded -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/actionbook/rust-skills --path skills/domain-embedded
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/domain-embedded/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add actionbook/rust-skills --skill domain-embedded -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/actionbook/rust-skills/tree/HEAD/skills/domain-embedded/SKILL.md

## When to use it
- replace heap-backed collections in no_std code
- protect shared state from ISR races
- assign clear ownership to GPIO and peripherals
- choose RTIC, Embassy, or bare metal execution patterns

## Example prompts
- Review this `Cargo.toml` for embedded no_std Rust constraints.
- Replace this `Vec` buffer with a fixed `heapless` collection.
- Check GPIO access shared by an interrupt handler and the main loop.

## Similar
- [embedded-systems](https://affpapa.org/en/nevibecode/agents/embedded-systems.md) — subagent · 279 installs
- [rust-no-std](https://affpapa.org/en/nevibecode/skills/rust-no-std.md) — skill · 474 installs
- [mspm0-ccs](https://affpapa.org/en/nevibecode/skills/mspm0-ccs.md) — skill · 500 installs
- [stm32-baremetal](https://affpapa.org/en/nevibecode/skills/stm32-baremetal.md) — skill · 360 installs
- [expert-embedded-c-engineer](https://affpapa.org/en/nevibecode/agents/expert-embedded-c-engineer.md) — subagent · ★ 40418
- [arm-cortex-expert](https://affpapa.org/en/nevibecode/agents/arm-cortex-expert.md) — subagent · ★ 41729

From the same set: [actionbook/rust-skills](https://affpapa.org/en/nevibecode/by/actionbook/rust-skills.md) — 33 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
