domain-embedded — Claude Code skill: setup and use
Guides embedded and no_std Rust work around memory, interrupts, and peripheral access. Use it when building firmware for microcontrollers.
npx skills add actionbook/rust-skills --skill domain-embedded -a claude-codeWhat domain-embedded 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.
What it helps with
- 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 for the agent
- Review this
Cargo.tomlfor embedded no_std Rust constraints. - Replace this
Vecbuffer with a fixedheaplesscollection. - Check GPIO access shared by an interrupt handler and the main loop.
How to install domain-embedded
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-embedded -a claude-code2Manually: put the files in place
~/.claude/skills/domain-embedded/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/domain-embedded/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-embedded -a codex2Manually: put the files in place
.agents/skills/domain-embedded/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-embedded -a cursor2Manually: put the files in place
.cursor/skills/domain-embedded/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install actionbook/rust-skills domain-embedded2Manually: put the files in place
.github/skills/domain-embedded/SKILL.md1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-embedded -a gemini-cli2Platform CLI
gemini skills install https://github.com/actionbook/rust-skills --path skills/domain-embeddedManually: put the files in place
.devin/skills/domain-embedded/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-embedded -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about domain-embedded
How do I install domain-embedded in Claude Code?
Run npx skills add actionbook/rust-skills --skill domain-embedded -a claude-code, then run npx skills add actionbook/rust-skills --skill domain-embedded -a claude-code again. The skill file is placed at ~/.claude/skills/domain-embedded/SKILL.md.
What does domain-embedded do?
It gives an agent rules for embedded and no_std Rust, including static memory, peripheral ownership, and interrupt safety. It also maps those constraints to Rust patterns and crates.
Why should I avoid Vec and blocking work in an ISR?
Vec commonly relies on heap allocation, while the skill points to fixed-capacity heapless collections. Blocking an ISR can delay other interrupts, so work should be deferred to the main loop.