embedded-dev

A development guide for embedded systems, which are programs running on chips such as ESP32, STM32, RP2040, and nRF52. It covers firmware, hardware drivers, sensors, displays, and device communication.

In plain words
What is it for?
Building chip firmware, configuring LCDs and sensors, working with SPI, I2C, UART, Wi-Fi, BLE, or MQTT, and debugging builds or devices.
Why use it?
It gives an AI coding agent a focused process for working with hardware code, including compiling and diagnosing problems.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/lhbsaa/embedded-dev-skill/opencode
Any agent
npx skills add lhbsaa/embedded-dev-skill --skill opencode
Clone the repo
git clone --depth 1 https://github.com/lhbsaa/embedded-dev-skill

Made for: Claude Code, Codex.

Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,176 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00131 $0.03176
Opus 5 $0.00066 $0.01588
Sonnet 5 $0.00026 $0.00635
Haiku 4.5 $0.00013 $0.00318

Measured yesterday against content hash b6b6397057c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

embedded-dev 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (mcp-server-embedded.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

adapters/opencode/SKILL.md · 452 lines

How it starts

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

Embedded Development Skill (OpenCode Edition)

Current Version: v3.2.0 (2026-04-13)

AI辅助嵌入式系统开发的专项技能,支持驱动开发、UI设计、硬件调试、问题诊断。采用渐进式加载架构,核心指令保持在SKILL.md,详细规范存放在references目录。

OpenCode 版本说明: 本 Skill 已适配 OpenCode,使用 OpenCode 内置工具和 MCP 扩展系统。


OpenCode Tools Used

Built-in Tools (OpenCode 内置工具)

OpenCode Tool Function
read 读取源代码和数据手册
write 生成源代码和配置文件
edit 修改现有代码
bash 编译、烧录、串口监控
glob 查找项目文件
grep 搜索代码内容
todowrite 任务跟踪管理 (内置)

MCP Extension Tools (扩展工具)

MCP Tool Function Install
embedded_build 统一编译命令包装 mcp-server-embedded.py
embedded_diagnose 编译错误诊断 mcp-server-embedded.py

: 如果未配置 MCP Server,可使用 bash 工具直接执行编译命令。


Quick Start for OpenCode

# 1. 安装 Skill
mkdir -p ~/.opencode/skills/embedded-dev
cp SKILL.md ~/.opencode/skills/embedded-dev/
cp -r references ~/.opencode/skills/embedded-dev/

# 2. (可选) 配置 MCP Server
# 参考 MCP-GUIDE.md

# 3. 开始嵌入式开发
"帮我配置 ESP32-S3 的 ST7789 LCD 驱动"

Workflow (OpenCode Edition)

Phase 1: Context Loading

Use OpenCode's read tool to load AGENTS.md:

read AGENTS.md
  • If AGENTS.md missing → Use write to create template with project info
  • Store key config in OpenCode session

Phase 2: Task Planning

Use todowrite tool for task tracking:

todowrite todos=[{"content": "Configure SPI driver", "status": "pending", "priority": "high"}]
  • Simple task → Execute directly
  • Complex task → Decompose into subtasks

Phase 3: Code Generation

Use OpenCode tools for code operations:

read src/driver.c          # 读取现有代码
write src/driver_new.c     # 创建新文件
edit src/driver.c          # 修改代码
  • Check references/ for detailed specs
  • Apply modular architecture patterns

Phase 4: Verification

Use OpenCode's bash tool for build-flash-monitor loop:

bash: idf.py build
bash: idf.py -p COM3 flash monitor
  • On Error → Analyze output → Fix → Retry
  • Use MCP embedded_diagnose for error analysis (if configured)

Read the full file on GitHub · 452 lines

Files

What ships with it

2 files 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. yesterday First seen · 452 lines · 131 tokens per session scan A b6b6397057c4

Subscribe to this mod's changes

embedded-dev is a skill published in the GitHub repository lhbsaa/embedded-dev-skill (9 stars, last pushed 1mo ago), licensed MIT. It adds 131 tokens to every session and 3,176 once invoked, about $0.0007 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-08-31.

Related

Other skills, from other repositories

agent-registry

Use this skill whenever the user wants to interact with Google Cloud's Agent Registry using gcloud commands. Triggers on any mention of "agent registry", "agent-registry", "mcp-servers", "gcloud agents", "register an agent", "list agents", "create a service", "agent service", or any request to manage agents, MCP…

mfmezger/ai_agent_dotfiles · 110 tokens

html-reporting

Produce single-file, self-contained HTML artifacts instead of Markdown for any output a human will actually read. Use whenever the user asks for a "report", "research summary", "write-up", "spec", "plan", "PR explainer", "code review", "design mockup", "prototype", "dashboard", "deck", or anything that benefits from…

mfmezger/ai_agent_dotfiles · 189 tokens

building-pydantic-ai-agents

Build AI agents with Pydantic AI — tools, capabilities, structured output, streaming, testing, and multi-agent patterns. Use when the user mentions Pydantic AI, imports pydanticai, or asks to build an AI agent, add tools/capabilities, stream output, define agents from YAML, or test agent behavior.

mfmezger/ai_agent_dotfiles · 76 tokens

confluence-datacenter

This skill should be used when the user asks to "get Confluence page", "create Confluence page", "search Confluence", "update wiki page", or needs to interact with Confluence Data Center/Server instances.

mfmezger/ai_agent_dotfiles · 51 tokens

github-pr-feedback

Use this skill whenever the user asks to look at GitHub PR feedback, PR review comments, review bot output, Gemini/Claude review feedback, or pasted reviewer suggestions and wants a markdown table that separates what should be fixed from what does not need to be fixed. This skill should trigger for PR feedback triage…

mfmezger/ai_agent_dotfiles · 88 tokens

jira-datacenter

This skill should be used when the user asks to "get Jira issue", "create Jira ticket", "search Jira", "update issue status", or needs to interact with Jira Data Center/Server instances.

mfmezger/ai_agent_dotfiles · 46 tokens