| name | embedded-sp |
| description | Use when working on embedded systems, firmware, MCU, sensors, displays, hardware drivers, or IoT applications on ESP32, STM32, RP2040, nRF52 - enforces TDD-first workflow with HAL Mock tests and build-flash-monitor verification before any completion claims |
| license | MIT |
| compatible-with | pi-coding-agent, opencode, claude-code |
| version | 2.8 |
Embedded SP Skill
v2.8 | 2026-04-20 | INDEX.md | VERSION_HISTORY.md
Required Sub-Skills (invoke BEFORE implementation):
embedded-brainstorming → Hardware clarification
embedded-tdd → HAL Mock + Hardware tests
embedded-verification → Build-Flash-Monitor evidence
embedded-memory → Persistent project memory
Process FIRST → Implementation SECOND
The Iron Laws
NO FIRMWARE CODE WITHOUT FAILING HAL MOCK TEST FIRST
NO COMPLETION CLAIM WITHOUT BUILD-FLASH-MONITOR OUTPUT
NO FIX WITHOUT ROOT CAUSE INVESTIGATION
Write code before test? Delete it.
Claim completion without evidence? False.
Workflow
digraph workflow {
"Request" [shape=doublecircle];
"New?" [shape=diamond];
"brainstorming" [shape=box];
"Approved?" [shape=diamond];
"tdd" [shape=box];
"RED?" [shape=diamond];
"STOP: Write test first" [shape=octagon, style=filled, fillcolor=red];
"Implement" [shape=box];
"verification" [shape=box];
"Evidence?" [shape=diamond];
"STOP: Run fresh" [shape=octagon, style=filled, fillcolor=red];
"Done" [shape=doublecircle];
"Request" -> "New?";
"New?" -> "brainstorming" [label=yes];
"New?" -> "tdd" [label=no];
"brainstorming" -> "Approved?";
"Approved?" -> "tdd" [label=yes];
"Approved?" -> "brainstorming" [label=no];
"tdd" -> "RED?";
"RED?" -> "STOP: Write test first" [label=no];
"RED?" -> "Implement" [label=yes];
"Implement" -> "verification";
"verification" -> "Evidence?";
"Evidence?" -> "STOP: Run fresh" [label=no];
"Evidence?" -> "Done" [label=yes];
}
Sub-Skills
| Sub-Skill | Purpose | Output |
|---|
embedded-brainstorming | Hardware clarification | Design doc |
embedded-tdd | HAL Mock + Hardware test | Passing tests |
embedded-verification | Evidence collection | Build-Flash-Monitor |
embedded-memory | Persistent memory | AGENTS.md update |
Knowledge Navigation
See INDEX.md for progressive loading
| Category | Location | Load When |
|---|
| Chips | chips/*.md | Chip keyword |
| Interfaces | interfaces/*.md | Interface keyword |
| Debugging | debugging/*.md | Problem keyword |
Quick Commands
| Platform | Build | Flash | Monitor |
|---|
| ESP32 | idf.py build | idf.py -p COM3 flash | idf.py monitor |
| STM32 | make | st-flash write | st-util + nc localhost 4242 |
| RP2040 | cmake --build | picotool load | USB CDC |
Critical Limits
| Chip | DMA Limit |
|---|
| ESP32-S3 | 4092 bytes |
Installation
mkdir -p ~/.opencode/skills/embedded-sp
cp -r SKILL.md INDEX.md skills chips interfaces debugging protocols examples scripts hooks ~/.opencode/skills/embedded-sp/
bash ~/.opencode/skills/embedded-sp/scripts/verify-memory.sh
Memory System
AGENTS.md stores project memory across sessions:
| Memory Type | Trigger | Section |
|---|
hardware_config | Hardware detected | hardware: |
solution_record | Problem fixed | solutions: |
verification_evidence | B-F-M passed | verifications: |
Invoke embedded-memory skill for automated memory management.
v1.0.0-sp | Based on Superpowers Framework