state-machine

state-machine is a skill for Claude Code from Owl-Listener/designer-skills. It costs 45 tokens per session (420 once invoked), scanned A, original, MIT.

A way to describe a component using explicit states, events, and rules for moving between states.

In plain words
What is it for?
Use it for forms, data loading, authentication, multi-step wizards, and other components with many possible conditions.
Why use it?
It makes complex behaviour predictable and helps prevent impossible or missing states.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the interaction-design plugin — 22 skills, 5 commands shipped together

not rated 2.6krepo +84 4d ago A scan Socket: passSnyk: passSkillSpector: pass 45 tokens original MIT

Good fit Use it for forms, data loading, authentication, multi-step wizards, and other components with many possible conditions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/owl-listener/designer-skills/state-machine
About the project

Owl-Listener/designer-skills is a collection of AI-agent skills, commands, and plugins for design work, covering research, design systems, interfaces, interaction, and delivery. Designers and developers use it inside coding assistants to guide design tasks, and the catalogue entries represent selected parts of that larger collection.

Owl-Listener/designer-skills · 2,593 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Owl-Listener/designer-skills --skill state-machine
Clone the repo
git clone --depth 1 https://github.com/Owl-Listener/designer-skills

Made for: Claude Code.

Or install interaction-design, the plugin that ships this one along with the rest of its 22 skills, 5 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for state-machine

README.md
[![agentmods](https://agentmods.dev/badge/skills/owl-listener/designer-skills/state-machine/github.svg)](https://agentmods.dev/skills/owl-listener/designer-skills/state-machine)
Your own site
<a href="https://agentmods.dev/skills/owl-listener/designer-skills/state-machine"><img src="https://agentmods.dev/badge/skills/owl-listener/designer-skills/state-machine/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for state-machine

Your own site · 80×15
<a href="https://agentmods.dev/skills/owl-listener/designer-skills/state-machine"><img src="https://agentmods.dev/badge/skills/owl-listener/designer-skills/state-machine.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 420 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 9 Mar 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.00420
Opus 5 $0.00023 $0.00210
Sonnet 5 $0.00009 $0.00084
Haiku 4.5 $0.00005 $0.00042

Measured 6d ago against content hash b1c4217492e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

state-machine scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

interaction-design/skills/state-machine/SKILL.md · 42 lines

What it actually says

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
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 42 lines · 45 tokens per session scan A b1c4217492e7

Subscribe to this mod's changes

state-machine is a skill published in the GitHub repository Owl-Listener/designer-skills (2,593 stars, last pushed 4d ago), licensed MIT. It adds 45 tokens to every session and 420 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

ui-review

Review UI code for StyleSeed design-system compliance, accessibility, mobile ergonomics, spacing discipline, and implementation quality.

LiHongwei-cn/lihongwei-cn · 26 tokens

design-system

Use this skill BEFORE writing or restyling ANY user-facing interface in WrongStack. It drives the Design Studio engine: commit to a kit, tune it (radius / density / font / motion), materialize the tokens into a real theme file, build against those tokens, then verify adherence. Trigger it whenever the user asks to…

WrongStack/WrongStack · 248 tokens

tailwind-shadcn

Tailwind CSS utility patterns with shadcn/ui component usage, theming via CSS variables, and responsive design. Use when styling components, installing shadcn components, implementing dark mode, or creating consistent design systems.

BlackBeltTechnology/pi-agent-dashboard · 50 tokens

anti-slop-frontend

A mechanical, countable anti-slop checklist for AI-generated frontend. Catches the specific signatures an undirected model defaults to: AI-purple glows, Inter-everywhere, em-dashes, div-based fake screenshots, eyebrow-on-every-section, beige+brass "premium" palettes, generic Jane Doe / Acme data. Advisory layer that…

BlackBeltTechnology/pi-agent-dashboard · 147 tokens

frontend-mockup-loop

Plan, build, and iterate UX-friendly frontend mockups via a ground→contract→mockup→test→fix→learn loop, acting as an expert UX designer who grounds every decision in externally documented public design rules (Nielsen heuristics, Laws of UX, WCAG, GOV.UK/USWDS/Material). Uses the bundled servemockup, scoremockup, and…

BlackBeltTechnology/pi-agent-dashboard · 185 tokens

frontend-mockup-loop-dashboard

Dashboard-specific adapter on the generic frontend-mockup-loop skill: binds the 7-step design loop to pi-agent-dashboard component sources, theme-system tokens, and isolated verification. Use when designing/redesigning any pi-agent-dashboard client surface. Triggers: "design a dashboard screen", "mockup a dashboard…

BlackBeltTechnology/pi-agent-dashboard · 83 tokens