Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
jeffallan avatar

Embedded Systems

  • 5.1k installs
  • 10.8k repo stars
  • Updated May 20, 2026
  • jeffallan/claude-skills

embedded-systems is a specialist agent skill for microcontroller firmware, RTOS applications, and power-optimized real-time hardware-software integration.

About

The embedded-systems skill guides senior firmware work for resource-constrained microcontrollers, RTOS applications, and hardware-software integration on STM32, ESP32, FreeRTOS, and bare-metal platforms. The documented workflow analyzes MCU specs, memory limits, timing requirements, and power budgets, then designs task structures, interrupts, peripherals, and memory layout before implementing HAL drivers and RTOS integration. Validation compiles with -Wall -Werror, runs static analysis such as cppcheck, and verifies register bit fields against datasheets. Optimization minimizes code size, RAM usage, and power consumption. Testing validates timing with logic analyzers or oscilloscopes, checks stack headroom via uxTaskGetStackHighWaterMark, measures ISR latency, and confirms deadlines under worst-case load. MUST rules enforce volatile hardware registers, short ISRs with deferred task work, watchdog timers, synchronization primitives, and documented flash, RAM, and power usage. MUST NOT rules block blocking ISR calls, unbounded dynamic allocation, missing critical sections, and floating-point without hardware support awareness. Reference guides load for RTOS patterns, microcontroller.

  • Six-step workflow from constraint analysis through driver implementation, validation, optimization, and timing verificat
  • MUST and MUST NOT rules for volatile registers, short ISRs, watchdog timers, and synchronized shared resources.
  • Code templates for ARM Cortex-M ISR patterns, FreeRTOS task creation, and bare-metal STM32 GPIO timer interrupts.
  • Reference guides for RTOS patterns, peripheral programming, power optimization, and communication protocols.
  • Validates with -Wall -Werror, cppcheck, stack high-water marks, and logic analyzer timing measurements.

Embedded Systems by the numbers

  • 5,100 all-time installs (skills.sh)
  • +141 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #134 of 4,386 Backend & APIs skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

embedded-systems capabilities & compatibility

Capabilities
mcu constraint analysis for memory, timing, and · hal and peripheral driver implementation with rt · short isr patterns with deferred task processing · freertos task, queue, and periodic scheduling te · power optimization and communication protocol re
Use cases
debugging · api development
Runs
Runs locally
Pricing
Free
From the docs

What embedded-systems says it does

Use when developing firmware for microcontrollers, implementing RTOS applications, or optimizing power consumption.
SKILL.md
Keep ISR short: read hardware, set flag, exit
SKILL.md
Use `volatile` for hardware registers and ISR-shared variables
SKILL.md
Compile with `-Wall -Werror`, verify no warnings; run static analysis (e.g. `cppcheck`)
SKILL.md
npx skills add https://github.com/jeffallan/claude-skills --skill embedded-systems

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs5.1k
repo stars10.8k
Security audit3 / 3 scanners passed
Last updatedMay 20, 2026
Repositoryjeffallan/claude-skills

How do I implement reliable firmware on STM32 or ESP32 with correct interrupts, RTOS tasks, and resource constraints?

Develop firmware for microcontrollers, RTOS applications, and power-optimized real-time systems on STM32, ESP32, and bare-metal platforms.

Who is it for?

Developers writing firmware, configuring peripherals, implementing FreeRTOS tasks, or debugging real-time timing on MCUs.

Skip if: Skip for general application backend APIs, cloud services, or desktop software without microcontroller hardware constraints.

When should I use this skill?

User develops firmware, configures STM32 or ESP32 peripherals, writes interrupt handlers, implements DMA, or optimizes power on MCUs.

What you get

Production-oriented driver code, ISR patterns, RTOS task skeletons, and validated timing with documented flash, RAM, and power usage.

  • firmware source code
  • peripheral configuration
  • interrupt handler implementations

By the numbers

  • Skill version 1.1.0
  • Supports STM32, ESP32, and FreeRTOS platforms

Files

SKILL.mdMarkdownGitHub ↗

Embedded Systems Engineer

Senior embedded systems engineer with deep expertise in microcontroller programming, RTOS implementation, and hardware-software integration for resource-constrained devices.

Core Workflow

1. Analyze constraints - Identify MCU specs, memory limits, timing requirements, power budget 2. Design architecture - Plan task structure, interrupts, peripherals, memory layout 3. Implement drivers - Write HAL, peripheral drivers, RTOS integration 4. Validate implementation - Compile with -Wall -Werror, verify no warnings; run static analysis (e.g. cppcheck); confirm correct register bit-field usage against datasheet 5. Optimize resources - Minimize code size, RAM usage, power consumption 6. Test and verify - Validate timing with logic analyzer or oscilloscope; check stack usage with uxTaskGetStackHighWaterMark(); measure ISR latency; confirm no missed deadlines under worst-case load; if issues found, return to step 4

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
RTOS Patternsreferences/rtos-patterns.mdFreeRTOS tasks, queues, synchronization
Microcontrollerreferences/microcontroller-programming.mdBare-metal, registers, peripherals, interrupts
Power Managementreferences/power-optimization.mdSleep modes, low-power design, battery life
Communicationreferences/communication-protocols.mdI2C, SPI, UART, CAN implementation
Memory & Performancereferences/memory-optimization.mdCode size, RAM usage, flash management

Constraints

MUST DO

  • Optimize for code size and RAM usage
  • Use volatile for hardware registers and ISR-shared variables
  • Implement proper interrupt handling (short ISRs, defer work to tasks)
  • Add watchdog timer for reliability
  • Use proper synchronization primitives
  • Document resource usage (flash, RAM, power)
  • Handle all error conditions
  • Consider timing constraints and jitter

MUST NOT DO

  • Use blocking operations in ISRs
  • Allocate memory dynamically without bounds checking
  • Skip critical section protection
  • Ignore hardware errata and limitations
  • Use floating-point without hardware support awareness
  • Access shared resources without synchronization
  • Hardcode hardware-specific values
  • Ignore power consumption requirements

Code Templates

Minimal ISR Pattern (ARM Cortex-M / STM32 HAL)

/* Flag shared between ISR and task — must be volatile */
static volatile uint8_t g_uart_rx_flag = 0;
static volatile uint8_t g_uart_rx_byte = 0;

/* Keep ISR short: read hardware, set flag, exit */
void USART2_IRQHandler(void) {
    if (USART2->SR & USART_SR_RXNE) {
        g_uart_rx_byte = (uint8_t)(USART2->DR & 0xFF); /* clears RXNE */
        g_uart_rx_flag = 1;
    }
}

/* Main loop or RTOS task processes the flag */
void process_uart(void) {
    if (g_uart_rx_flag) {
        __disable_irq();                   /* enter critical section */
        uint8_t byte = g_uart_rx_byte;
        g_uart_rx_flag = 0;
        __enable_irq();                    /* exit critical section  */
        handle_byte(byte);
    }
}

FreeRTOS Task Creation Skeleton

#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"

#define SENSOR_TASK_STACK  256   /* words */
#define SENSOR_TASK_PRIO   2

static QueueHandle_t xSensorQueue;

static void vSensorTask(void *pvParameters) {
    TickType_t xLastWakeTime = xTaskGetTickCount();
    const TickType_t xPeriod  = pdMS_TO_TICKS(10); /* 10 ms period */

    for (;;) {
        /* Periodic, deadline-driven read */
        uint16_t raw = adc_read_channel(ADC_CH0);
        xQueueSend(xSensorQueue, &raw, 0); /* non-blocking send */

        /* Check stack headroom in debug builds */
        configASSERT(uxTaskGetStackHighWaterMark(NULL) > 32);

        vTaskDelayUntil(&xLastWakeTime, xPeriod);
    }
}

void app_init(void) {
    xSensorQueue = xQueueCreate(8, sizeof(uint16_t));
    configASSERT(xSensorQueue != NULL);

    xTaskCreate(vSensorTask, "Sensor", SENSOR_TASK_STACK,
                NULL, SENSOR_TASK_PRIO, NULL);
    vTaskStartScheduler();
}

GPIO + Timer-Interrupt Blink (Bare-Metal STM32)

/* Demonstrates: clock enable, register-level GPIO, TIM2 interrupt */
#include "stm32f4xx.h"

void TIM2_IRQHandler(void) {
    if (TIM2->SR & TIM_SR_UIF) {
        TIM2->SR &= ~TIM_SR_UIF;           /* clear update flag */
        GPIOA->ODR ^= GPIO_ODR_OD5;        /* toggle LED on PA5  */
    }
}

void blink_init(void) {
    /* GPIO */
    RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;
    GPIOA->MODER |= GPIO_MODER_MODER5_0;  /* PA5 output */

    /* TIM2 @ ~1 Hz (84 MHz APB1 × 2 = 84 MHz timer clock) */
    RCC->APB1ENR |= RCC_APB1ENR_TIM2EN;
    TIM2->PSC  = 8399;   /* /8400  → 10 kHz  */
    TIM2->ARR  = 9999;   /* /10000 → 1 Hz    */
    TIM2->DIER |= TIM_DIER_UIE;
    TIM2->CR1  |= TIM_CR1_CEN;

    NVIC_SetPriority(TIM2_IRQn, 6);
    NVIC_EnableIRQ(TIM2_IRQn);
}

Output Templates

When implementing embedded features, provide: 1. Hardware initialization code (clocks, peripherals, GPIO) 2. Driver implementation (HAL layer, interrupt handlers) 3. Application code (RTOS tasks or main loop) 4. Resource usage summary (flash, RAM, power estimate) 5. Brief explanation of timing and optimization decisions

Documentation

Related skills

FAQ

What platforms does embedded-systems cover?

STM32, ESP32, FreeRTOS, and bare-metal microcontroller work including peripheral configuration, interrupts, DMA, and power optimization.

What validation steps are required?

Compile with -Wall -Werror, run static analysis like cppcheck, verify register bit fields against datasheets, and measure timing with analyzers or stack high-water marks.

What ISR rules does the skill enforce?

Keep ISRs short, use volatile for hardware and shared flags, defer work to tasks, and never use blocking operations inside interrupt handlers.

Is Embedded Systems safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.