xstate
Design, implement, and review XState v5 state machines and @xstate/react integrations in TypeScript. Use when modeling finite workflows, async actors…
от wordbricks★ 16 звёзд на GitHub
Установить xstate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
XState
Use XState when the domain has meaningful modes, transitions, async lifecycle, cancellation, guards, delays, or actor boundaries. The goal is not "state management"; the goal is to make the process explicit, typed, inspectable, and hard to misuse.
Core Standard
- Prefer
setup({ types, actors, actions, guards, delays }).createMachine(...)for typed machines with named implementations. - Put finite modes in states.
- Put durable facts in context.
- Put side effects behind actors, actions, guards, and delays.
- Put request data in
invoke.input. - Put UI decisions on snapshots:
matches,hasTag,can, and selected context. - Initialize each actor instance with
input. - Define default implementations in
setup(...); replace runtime implementations with.provide(...). - Model later external changes as keyed remounts, domain events, or subscription actors.
Reading Guide
Read only the references needed for the task:
- Modeling: states, state types, context, events, guards, tags, delays.
- Transitions: guarded, eventless, delayed, and pure transitions.
- Actors: async work, actor choice, invocation, outputs, cancellation.
- Promises:
fromPromise, request input, output, errors, abort signals. - Callbacks: subscriptions, imperative APIs,
sendBack,receive, cleanup. - Observables: observable snapshots and observable event streams.
- Child Actors:
invoke,spawn,spawnChild, child ownership, inspection. - React:
@xstate/react,.provide(...), actor input, selectors. - Testing: actor tests,
waitFor, provided implementations, timing.
Working Loop
- Name the process and its legal modes.
- Define the domain events.
- Decide what data survives transitions.
- Move effects into actors or named implementations.
- Connect UI through actor hooks and snapshot reads.
- Test behavior at the actor boundary.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/actors.md
- references/callbacks.md
- references/child-actors.md
- references/modeling.md
- references/observables.md
- references/promises.md
- references/react.md
- references/testing.md
- references/transitions.md
FAQ
Что делает скилл xstate?
Design, implement, and review XState v5 state machines and @xstate/react integrations in TypeScript. Use when modeling finite workflows, async actors, statecharts, guarded transitions, delayed transitions, actor systems, or machine-driven React behavior.
Как установить скилл xstate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл xstate запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…