CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

statelyai/xstate-v5

Design, implement, review, and migrate XState v5 state machines and statecharts in TypeScript using modern v5 patterns. Use this whenever the user mentions XState, actors, state machines, statecharts, guards, transitions, workflows, or Stately, or is modeling non-trivial UI/app/process logic in a codebase that uses XState. Prefer a short machine sketch before code when requirements are fuzzy. If the problem is too simple for a state machine, say so and recommend @xstate/store instead.

Quality

91%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

XState v5 skill

The xstate-v5 skill teaches coding agents to design, implement, review, and migrate XState v5 state machines and statecharts in TypeScript. It models the problem first and checks API correctness second, and it recommends @xstate/store when a machine is more than the problem needs.

Install

npx skills add statelyai/skills --skill xstate-v5

The stately plugin also includes this skill. See Install for Claude Code and Codex.

Use

Ask for XState work in a project that depends on xstate 5:

Model the checkout flow as an XState machine.
Review this machine for missing error and cancellation paths.
Migrate this XState v4 machine to v5.

The skill picks a mode before writing code:

ModeBehavior
New codeUses modern v5 patterns: setup(...), named implementations, typed actors.
Local editKeeps the surrounding structure and naming unless the code is broken or mixed.
MigrationMakes the smallest safe translation from v4 patterns to v5.

When requirements are unclear, it sketches the states, events, context, and actors before writing TypeScript.

Contents

PathContents
SKILL.mdWorkflow, modeling questions, and v5 code style
references/advanced-patterns.mdActor kinds, typed actions, emitted events, and persistence
references/adapters.md@xstate/react, @xstate/vue, @xstate/svelte, @xstate/solid
references/examples.mdExample machines, React actors, and @xstate/store
references/observables-and-inspection.mdObservables and the inspection API
references/v4-to-v5-quick-ref.mdv4 to v5 migration table
evals/Evaluation prompts and graders

Related skills

Workspace
statelyai
Visibility
Public
Created
Last updated
Source
CLI
Repository
https://github.com/statelyai/skillsUnverified
Badge
statelyai/xstate-v5 badge