/stately:xstate-v6from Stately
Writes, reviews, tests, and migrates XState v6 machines and actors using the documentation shipped inside the installed xstate package. Use when a project depends on XState v6 or when migrating from v5.
Ships in Stately. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
XState v6 ships its documentation in the package, versioned with the code. Read those docs instead of relying on memory, blog posts, or v5 examples. This skill says where to find them, what to read first, and how to verify the result.
package.json and lockfile. In a monorepo,
each workspace can resolve a different xstate.
xstate 5.x: use the xstate-v5 skill, unless the user asked to migrate
to v6. Then go to Migrate from v5.xstate 6.x: continue.xstate: ask before adding it. v6 is in beta (npm latest is still
5.x); say so when you propose it.node_modules/xstate/docs/index.md from that workspace. Its title is the
exact installed version, and it links every page. npx xstate docs prints the
same location.docs/agents.md in full before writing code. It is the authoring
contract: transition syntax, context patches, effects, serialization, the
JSON CLI, and how to verify.docs/cheatsheet.md
for syntax and docs/api-stability.json before using an export: it marks
public, experimental, and internal exports for that version.When the package is not installed and you may not install it, download the
tarball to a temporary directory and read its docs/ folder there:
dir=$(mktemp -d) && cd "$dir" && npm pack xstate@beta && tar xzf xstate-*.tgz
Say which version you read when it is not the one the project will install.
These cause most v6 mistakes, so check them even after reading the docs:
on: { GO: { target: 'done' } }.
A bare string such as on: { GO: 'done' } and transition arrays are v5
syntax. initial: 'idle' stays a string.xstate/fsm exports createFSM, not createMachine.docs/xstate-v5-to-v6.md lists every difference.agents.md describes.@xstate/store.npx xstate validate, simulate, test (with never and reachable
checks), and replay for a saved counterexample. The input formats are in
agents.md. A passing test covers only the event representatives you
supplied; report it that way.Follow docs/xstate-v5-to-v6.md and the @xstate/codemod loop in
agents.md: baseline, then migrate, fix the reported manualSites, then
verify against the baseline. Do not report a migration as done until
verify exits 0.
To view or check a machine in Stately, use the stately skill.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub statelyai/skills --plugin stately3 skills in this plugin
/statelyGenerate a diagram of a process or flow in Stately, model a flow as an interactive Stately statechart, check a protocol or flow against invariants with a bundled native statechart checker (TLA+ optional), find implicit state machines in application code, make them explicit as checked XState machines, check a fix, and review a diff or pull request for state bugs. Use for /stately, /statechart (check a TLA+ spec and draw it as a statechart), "find all of the implicit state machines in my app", "make these flags explicit", "check my fix", statechart or protocol analysis, safety/liveness/deadlock checks, counterexample replay, hidden-state discovery, state-bug review of a change, app behavior documentation, and visual behavior proposals in any framework./xstate-v5Design, 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.Other plugins' skills for the same job