Skip to content
Development
Skill

/embedded-state-machine-libs

Use when integrating, designing, configuring, or debugging embedded StateMachine libraries, finite state machines, event transitions, or MCU state-driven workflows

From plugin
aix-skills
3876 skills

Claude Code

$ npx -y skills add easyzoom/aix-skills --skill embedded-state-machine-libs --agent claude-code

SKILL.md

embedded-state-machine-libs.SKILL.md
name: embedded-state-machine-libs
description: Use when integrating, designing, configuring, or debugging embedded StateMachine libraries, finite state machines, event transitions, or MCU state-driven workflows

Embedded State Machine Libs

Overview

Use this skill for embedded state machine libraries and hand-written finite state machines. The core is to make states, events, transitions, side effects, and invalid transitions explicit and verifiable.

When To Use

Use this skill when:

  • The user wants to add or debug a StateMachine library or event-driven MCU workflow.
  • The issue involves wrong transitions, stuck states, reentrancy, event loss, timeout handling, or unclear state ownership.
  • Firmware has modes such as idle, init, run, error, recovery, upgrade, sleep, or calibration.

Do not use this skill for RTOS scheduling issues unless the state machine is the primary abstraction.

First Questions

Ask for:

  • State machine library or custom implementation.
  • State list, event list, and current failing transition.
  • Whether transitions run in ISR, task, main loop, or callback context.
  • Whether timeouts, retries, or external interrupts drive events.
  • Expected behavior for invalid events.

Integration Checklist

1. Define states and events. Names should reflect system meaning, not implementation steps.

1. Separate transition from action. Make it clear what changes state and what side effects run because of the transition.

1. Define invalid event behavior. Ignore, log, assert, error transition, or recovery must be explicit.

1. Guard reentrancy. Avoid nested transitions unless the library explicitly supports them.

1. Add observability. Log state transitions, current state, event source, and error transitions.

1. Test transition table. Validate normal path, invalid events, timeout events, and recovery path.

Common Failures

  • Event emitted from ISR directly mutates state unsafely.
  • Timeout event races with success event.
  • State transition has hidden side effects that fail halfway.
  • Invalid events are silently ignored in safety-critical flows.
  • State names mirror functions instead of product behavior.

Verification

Before claiming state-machine behavior works:

  • State the state list, event list, transition rules, and invalid-event policy.
  • Confirm normal, timeout, error, and recovery transitions.
  • Confirm event source and reentrancy strategy.
  • Confirm transition logging or trace output exists for debugging.

Example

User:

设备升级状态机偶尔卡在 downloading。

Agent:

1. Asks for states, events, timeout handling, and transition logs. 1. Checks whether success/error/timeout events race. 1. Verifies recovery transitions and invalid event behavior.

Read more
@easyzoom
Ships withaix-skills

AIX Skills is a public collection of Agent Skills, templates, and references for building repeatable AI workflows.

Stars on GitHub

Momentum

stars in total
38
Star history of easyzoom/aix-skills on GitHub, a chart by star-history.com

Other skills on aix-skills.

8051-mcu-debug

8051-mcu-debug

Use when debugging 8051-compatible microcontrollers, 51 MCU firmware, STC download issues, Keil C51 projects, interrupts, timers,…

@easyzoom@easyzoomInstall Skill
avem-integration

avem-integration

Use when integrating, evaluating, configuring, or debugging Avem embedded C framework modules, event-driven components, drivers,…

@easyzoom@easyzoomInstall Skill
ble-gatt-integration

ble-gatt-integration

Use when integrating, designing, or debugging BLE GATT services, characteristics, descriptors, MTU, notifications, indications,…

@easyzoom@easyzoomInstall Skill
bootloader-debug

bootloader-debug

Use when debugging embedded bootloaders, application jumps, vector table offsets, firmware upgrade flow, OTA state, image…

@easyzoom@easyzoomInstall Skill
canbus-integration

canbus-integration

Use when integrating, porting, configuring, or debugging CAN bus libraries, CANBus-Triple, MCP2515, CAN frames, bit timing,…

@easyzoom@easyzoomInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about embedded-state-machine-libs.

Which coding agents can use embedded-state-machine-libs?
embedded-state-machine-libs installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.