Skip to main content
skill CX Codex

state-machine · owl-listener — Claude Code skill: what it does, how to install

Models UI component behavior as explicit states, events, and transitions. Useful when a component has multiple interacting states that must remain predictable.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Owl-Listener/designer-skills --skill state-machine -a claude-code
Open on GitHub

What state-machine does

This skill structures complex UI components as finite state machines to prevent conflicting states like displaying loading and error indicators at the same time. It deconstructs an interface into five building blocks: distinct states, triggering events, transitions, side-effect actions, and guard conditions.

The workflow starts by mapping all possible states and events, then defines valid transitions and eliminates edge-case conflicts. It mandates starting with the happy path, avoiding dead-end states, and tying every state to a concrete visual presentation. For tactile feedback or single-interaction animations, this skill steps aside — use micro-interaction-spec instead.

What it helps with

  • Eliminate impossible UI states
  • Map transitions and guards for multi-step wizards
  • Define predictable data fetching flows
  • Align component logic between design and engineering

Example prompts for the agent

  • Model a finite state machine for an authentication form with retries
  • Define states, events, and transitions for a checkout wizard
  • Review this data fetching component and eliminate impossible states

How to install state-machine

1Skills CLI (Vercel)

npx skills add Owl-Listener/designer-skills --skill state-machine -a claude-code

2Manually: put the files in place

~/.claude/skills/state-machine/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/state-machine/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about state-machine

How to install state-machine in Claude Code?

Run npx skills add Owl-Listener/designer-skills --skill state-machine -a claude-code in your terminal. You can also add it manually at ~/.claude/skills/state-machine/SKILL.md.

What does state-machine do?

It guides the assistant to model interface behavior as formal finite state machines. This ensures every UI state has clear entry, exit, and transition rules.

When should you use micro-interaction-spec instead?

Use state-machine when component logic requires exhaustive states and transitions. For the feel, tactile feedback, and timing of an isolated interaction, use micro-interaction-spec.

Source text

SKILL.md · MIT
---
name: state-machine
description: 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`.
---
# 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
- Start with the happy path, then add error states
- Every state should have a way out (no dead ends)
- Keep state machines focused (one per concern)
- Document with visual diagrams
- Map each state to a UI representation

© Owl-Listener · MIT · Owl-Listener/designer-skills

Similar skills

Everything for Design →

state-machine by other authors comes first.

state-machine jakubkrehel Builds a throwaway page for every reachable state of one component, using mock data and a switcher. Use it when visual work needs isolated states without changing the component. CX Codex +1 3,800installs godot-state-machine-advanced thedivergentai A Godot skill for hierarchical finite state machines and pushdown automata: ready scripts for sub-states, state stacks and transition validation. CX Codex +1 486installs empty-state aladicf A skill for designing empty states: zero data, no search results, permission walls and load errors. Useful when a screen greets people with nothing but “No items”. CX Codex +1 552installs state-changes dylantarre A skill for animating elements that transform in place: toggles, accordions, checkboxes, button states. Useful when an interface needs smooth transitions without enter or exit. CX Codex +1 489installs bmad-agent-ux-designer bmad-code-org Activates Sally, a dedicated UX designer persona for crafting interaction design and interface specifications. Helps teams map out user journeys and edge cases before coding. CX Codex +1 11,800installs interaction-design aj-geddes A skill for designing interactions: animations, loading and error states, feedback on touch. Useful when the interface works but feels flat. CX Codex +1 505installs rive-animations dylantarre A skill that walks your agent through building Rive animations on Disney's 12 principles: state machines, inputs, timing, React hooks. CX Codex +1 560installs

From the same set109

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor