state-machine

state-machine is a skill for Claude Code, Codex from WellApp-ai/Well. It costs 14 tokens per session (919 once invoked), scanned A, original, MIT.

A method for documenting the possible states of an interactive user-interface component and the events that move it from one state to another.

In plain words
What is it for?
Use it before building or refactoring UI components to record current and expected behavior for loading, success, error, empty, selection, focus, and other states.
Why use it?
It exposes missing or inconsistent behavior, such as what should happen while data loads, an error appears, or a control is disabled.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before building or refactoring UI components to record current and expected behavior for loading, success, error, empty, selection, focus, and other states.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wellapp-ai/well/state-machine
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 WellApp-ai/Well --skill state-machine
Clone the repo
git clone --depth 1 https://github.com/WellApp-ai/Well

Made for: Claude Code, Codex.

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/wellapp-ai/well/state-machine/github.svg)](https://agentmods.dev/skills/wellapp-ai/well/state-machine)
Your own site
<a href="https://agentmods.dev/skills/wellapp-ai/well/state-machine"><img src="https://agentmods.dev/badge/skills/wellapp-ai/well/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/wellapp-ai/well/state-machine"><img src="https://agentmods.dev/badge/skills/wellapp-ai/well/state-machine.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 919 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
  • 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.00014 $0.00919
Opus 5.5 $0.00006 $0.00368
Sonnet 5.5 $0.00003 $0.00184
Haiku 4.5 $0.00001 $0.00092

Measured 1mo ago against content hash c88b772ce795, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

cursor-rules/skills/state-machine/SKILL.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.

State Machine Skill

Document the state machine for UI components, comparing current behavior to expected behavior and mapping all state transitions.

When to Use

  • During Ask mode CONVERGE loop for stateful components
  • When refactoring existing components with complex state
  • Before implementing new interactive UI components

Instructions

Phase 1: Identify States

List all possible states for the component:

State Current Behavior Expected Behavior
Initial [What happens now] [What should happen]
Loading [Current loading UX] [Expected loading UX]
Success [Current success display] [Expected success display]
Error [Current error handling] [Expected error handling]
Empty [Current empty state] [Expected empty state]

Common States to Consider:

State Type Examples
Data states Initial, Loading, Success, Error, Empty, Stale
Interaction states Idle, Hover, Focus, Active, Disabled
Visibility states Hidden, Visible, Collapsed, Expanded
Selection states Unselected, Selected, Partially selected
Validation states Valid, Invalid, Pending validation

Phase 2: Map Transitions

Define what triggers each state change:

From To Trigger Side Effects
Initial Loading User action / Mount Start fetch
Loading Success Data received Populate UI
Loading Error Request failed Show error message
Loading Empty Empty response Show empty state
Error Loading Retry clicked Restart fetch
Success Loading Refresh clicked Refetch data

Phase 3: State Diagram

Create a Mermaid state diagram:

stateDiagram-v2
    [*] --> Initial
    Initial --> Loading : fetch
    Loading --> Success : data received
    Loading --> Error : request failed
    Loading --> Empty : no data
    Error --> Loading : retry
    Success --> Loading : refresh
    Empty --> Loading : refresh
    Success --> [*] : unmount

Read the full file on GitHub · 133 lines

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. 1mo ago First seen · 133 lines · 14 tokens per session scan A c88b772ce795

Subscribe to this mod's changes

state-machine is a skill published in the GitHub repository WellApp-ai/Well (345 stars, last pushed 6d ago), licensed MIT. It adds 14 tokens to every session and 919 once invoked, about $0.0001 per session on Opus 5.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-08-30.