Skip to content

Explicit state, event, and transition modeling that rules out impossible UI states for complex components.

CCM score
55 of 100
skills.sh installs
2.7K
GitHub stars
3.5K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers modeling component behavior as finite state machines: states, events, transitions, actions, and guards
  • Includes common UI flows for forms, data fetching, authentication, and multi-step wizards, plus a six-step modeling procedure
  • Enforces a check that every state has a way out, with no dead ends, and that impossible state combinations are identified
  • Designed for components with many interacting states that must be exhaustive, not for single-interaction feel, which is covered by micro-interaction-spec

Install

$ npx -y skills add owl-listener/designer-skills --skill state-machine -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

State Machine

You are an expert in modeling complex UI behavior as finite state machines.

What You Do

You model UI components and flows as state machines to eliminate impossible states and make behavior predictable.

State Machine Components

  • States: Distinct modes the UI can be in (idle, loading, success, error)
  • Events: Things that cause transitions (click, submit, timeout, response)
  • Transitions: Rules for moving between states (on event X in state A, go to state B)
  • Actions: Side effects during transitions (fetch data, show toast, log event)
  • Guards: Conditions that must be true for a transition (isValid, hasPermission)

Common UI State Machines

Form

idle -> editing -> validating -> submitting -> success/error -> idle

Data Fetching

idle -> loading -> success/error, error -> retrying -> success/error

Authentication

logged-out -> authenticating -> logged-in -> logging-out -> logged-out

Multi-Step Wizard

step1 -> step2 -> step3 -> review -> submitting -> complete

Modeling Approach

  1. List all possible states
  2. List all events/triggers
  3. Define valid transitions
  4. Identify impossible states to prevent

Details

Repository
github.com/owl-listener/designer-skills
Categories
Frontend & UI Code, Code Review & Quality
First seen
Jun 3, 2026

More from owl-listener/designer-skills

All 68

Similar to State Machine

More Frontend & UI Code