State Machine

Model component behaviour as explicit states, events, and transitions. Use when a component has many interacting states that must be exhaustive. For the feel and feedback of a single interaction, use `micro-interaction-spec`.

3,414 stars 447 forksFrontend & Design Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add Owl-Listener/designer-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add Owl-Listener/designer-skills --skill state-machine
Manual install
git clone --depth 1 https://github.com/Owl-Listener/designer-skills.git /tmp/designer-skills
mkdir -p ~/.claude/skills
cp -r /tmp/designer-skills/interaction-design/skills/state-machine ~/.claude/skills/state-machine

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# 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
5. Add guards for conditional transitions
6. Define entry/exit actions per state
## Benefits
- Eliminates impossible states (no loading + error simultaneously)
- Makes edge cases visible
- Shared language between design and engineering
- Testable behavior specification
## Best Practices
Read the full skill on GitHub

Details

Skill name
state-machine
Path
interaction-design/skills/state-machine/SKILL.md
License
MIT
Repo updated
5 September 2026

FAQ

What does the State Machine skill do?

Model component behaviour as explicit states, events, and transitions. Use when a component has many interacting states that must be exhaustive. For the feel and feedback of a single interaction, use `micro-interaction-spec`.

How do I install the State Machine skill?

Claude Code plugin: /plugin marketplace add Owl-Listener/designer-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is State Machine popular?

It lives in Owl-Listener/designer-skills, which has 3,414 GitHub stars and 447 forks.

Related skills

A B Test Design

3.4k

Owl-Listener/designer-skills

Design an A/B experiment — hypothesis, variants, primary metric, and sample size. Use when a change can be measured quantitatively at scale. For observing behaviour qualitatively, use `test-scenario`.

Testing & QA447

Accessibility Audit

3.4k

Owl-Listener/designer-skills

Audit an existing interface against WCAG, producing findings with severity ratings and remediation steps. Use when you have a design or build to assess now. Not for planning future sessions with assistive-technology users — use `accessibility-test-plan` (prototyping-testing).

Frontend & Design447

Accessibility Test Plan

3.4k

Owl-Listener/designer-skills

Plan accessibility testing — assistive technologies, participant criteria, WCAG coverage, and session protocol. Use when scheduling testing with real AT users. Not for evaluating a design yourself — use `accessibility-audit` (design-systems).

Testing & QA447

Summarize Interview

3.4k

Owl-Listener/designer-skills

Turn one interview transcript into themes, supporting quotes, and action items. Use immediately after a session. For synthesising many sessions at once, use `affinity-diagram`.

Frontend & Design447

Serial Position Effect

3.4k

Owl-Listener/designer-skills

Apply the Serial Position Effect — first and last items in a sequence are recalled best. Use when ordering menus, lists, and steps. For emphasising one item regardless of its position, use `von-restorff-effect` (ui-design).

Frontend & Design447

Theming System

3.4k

Owl-Listener/designer-skills

Design theming architecture — brand variants, dark mode, and high-contrast — mapped through token layers. Use when one system must serve multiple themes. For a single palette use `color-system` (ui-design); for dark mode craft use `dark-mode-design` (ui-design).

Frontend & Design447

Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.