Agent workflows and optional Cursor rules for MCU firmware in C/C++. Aimed at bare-metal and RTOS work. Most focus was given to C, C++ coverage is currently lacking and will be expanded in the future.
Install them into a firmware repo so the agent there follows the same review, rethink, grilling, implementation, simplification, and memory procedures.
Any agent that the skills CLI supports:
npx skills add iharhl/embedded-agent-skillsPick which skills to take, and which agents to install them on. That copies each skill folder into the path that agent reads (.claude/skills/, .agents/skills/, .opencode/skills/, and so on).
Claude Code (skills only)
/plugin marketplace add iharhl/embedded-agent-skills
/plugin install embedded-agent-skills@embedded-agent-skills
Codex (skills only)
codex plugin marketplace add iharhl/embedded-agent-skills
codex plugin add embedded-agent-skills@embedded-agent-skillsCursor
Clone or fetch this repo, then copy. Do not paste skill bodies into rules.
git clone https://github.com/iharhl/embedded-agent-skills.git
mkdir -p your-firmware/.cursor/skills <your-firmware>/.cursor/rules
cp -R embedded-agent-skills/skills/. <your-firmware>/.cursor/skills/
cp embedded-agent-skills/.cursor/rules/commenting.mdc your-firmware/.cursor/rules/Take commenting. The c-conventions should be tailored per-project.
cp embedded-agent-skills/.cursor/rules/c-conventions.mdc <your-firmware>/.cursor/rules/OpenCode (skills only)
Copy skills into .opencode/skills/ (project) or ~/.config/opencode/skills/ (global).
git clone https://github.com/iharhl/embedded-agent-skills.git
mkdir -p your-firmware/.opencode/skills
cp -R embedded-agent-skills/skills/. <your-firmware>/.opencode/skills/Claude, Codex, and OpenCode ignore .cursor/rules/. Paste rule bodies into that project's AGENTS.md if you want the same constraints there.
Skills are slash-only. Each skill sets disable-model-invocation: true. Codex also has agents/openai.yaml with allow_implicit_invocation: false.
| Host | Example |
|---|---|
| Cursor | /review-embedded |
| Codex | $review-embedded |
| Claude Code | /embedded-agent-skills:review-embedded |
Before judging firmware, the skills read CLAUDE.md, AGENTS.md, and .cursor/rules/ if those exist.
In Cursor, the .mdc rules apply when matching *.c / *.h files are in context. This library's own AGENTS.md is for maintaining the library, not firmware style.
skills/ # source of truth (all agents)
review-embedded/
rethink-embedded/
grilling-embedded/
implement-embedded/
code-simplification-embedded/
memory-optimization-embedded/
.cursor/rules/ # Cursor rules (.mdc); optional
.claude-plugin/ # Claude Code plugin + marketplace
.codex-plugin/ # Codex plugin
.agents/plugins/ # Codex marketplace
Rules
- commenting. Portable default.
/* */on non-trivial logic. Why, not restating the next line, not leftover fix narrative.*.c/*.h. - c-conventions. Opinionated house style. Quote includes vs compiler headers, host-test stub include order,
FILENAME_Hguards,ptr == 0, unsignedU.
Skills
- review-embedded. Read-only review of a firmware diff. Sanity, defects, ISR/main races, qualitative resource signals, duplication, peripheral edge cases, docs. Silicon-facing changes need the datasheet or reference manual.
/review-embeddedor$review-embedded. - rethink-embedded. Step back before building. Recovers the core idea behind the code a request touches, checks whether the request makes sense, fits, and whether the existing logic is sound, weighs simpler options including not doing it, then gives one verdict. Read-only.
/rethink-embeddedor$rethink-embedded. - grilling-embedded. Architecture interview before code, scoped to a named feature unless you ask for the whole product. Rounds of frontier questions with a recommended answer on each, then a decision log.
/grilling-embeddedor$grilling-embedded. - implement-embedded. Implement a settled firmware plan, then a subagent (your agent's default model, or the one you name) reviews and simplifies the diff against the plan, and the agent applies the findings worth keeping.
/implement-embeddedor$implement-embedded. - code-simplification-embedded. Clarify working C firmware without changing behavior, including timing, footprint, register order, and errata workarounds.
/code-simplification-embeddedor$code-simplification-embedded. - memory-optimization-embedded. Profile the image with size/map/disassembly, apply safe RAM and Flash cuts on the requested feature, and propose neighboring or whole-image wins.
/memory-optimization-embeddedor$memory-optimization-embedded.
These are firmware-specific. For general agent workflow (how/why a subsystem works, review, verification), pstack is a good companion in Cursor (/add-plugin pstack).
- Create
skills/my-skill/SKILL.mdwithnameanddescriptionfrontmatter.namemust match the folder. - Keep the body short. Put long tables in
references/. - For slash-only skills, set
disable-model-invocation: truein the frontmatter and addagents/openai.yamlwithallow_implicit_invocation: false. - Link it from this README.
Add a rule as .cursor/rules/my-rule.mdc with description and either alwaysApply: true or globs. See AGENTS.md for the split between rules and skills.
grilling-embedded is adapted from Matt Pocock's grill-me / grilling skills.
code-simplification-embedded is adapted from Addy Osmani's code-simplification skill.
MIT, see LICENSE.