xstate · pedronauck — Claude Code skill: what it does, how to install
This skill covers XState v5 machines, actors, stores, and TanStack Query integration. Use it when application logic needs explicit state flows.
no license 247 installs ★ 655 updated 2026-10-20
npx skills add pedronauck/skills --skill xstate -a claude-codeWhat xstate does
The skill guides XState v5 work with state machines and actors. It covers explicit states, events, transitions, and statechart patterns for avoiding invalid combinations. React examples use useMachine() and .provide() to adapt machine actions.
For smaller state models, it covers @xstate/store, event-driven updates, selectors, reactive atoms, and undo/redo. It also describes connecting XState actors with TanStack Query through QueryObserver and fromCallback. The allowed tools are Read, Grep, and Glob, so the skill is focused on inspecting and searching project files.
What it helps with
- model a complex application flow as a state machine
- define typed XState v5 states and events
- manage lightweight client state with
@xstate/store - add undo and redo to a store
- coordinate TanStack Query data through XState actors
Example prompts for the agent
- Design an XState v5 machine for an authentication flow, including its states, events, and transitions.
- Review this React component and show how to connect it with
useMachine()and.provide(). - Explain how to connect a TanStack Query subscription to an XState actor with
QueryObserver.
How to install xstate
1Skills CLI (Vercel)
npx skills add pedronauck/skills --skill xstate -a claude-code2Manually: put the files in place
~/.claude/skills/xstate/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/xstate/
1Skills CLI (Vercel)
npx skills add pedronauck/skills --skill xstate -a codex2Manually: put the files in place
.agents/skills/xstate/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add pedronauck/skills --skill xstate -a cursor2Manually: put the files in place
.cursor/skills/xstate/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install pedronauck/skills skills/curated/xstate2Manually: put the files in place
.github/skills/xstate/SKILL.md1Skills CLI (Vercel)
npx skills add pedronauck/skills --skill xstate -a gemini-cli2Platform CLI
gemini skills install https://github.com/pedronauck/skills --path skills/curated/xstateManually: put the files in place
.devin/skills/xstate/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add pedronauck/skills --skill xstate -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about xstate
How do I install xstate in Claude Code?
Run npx skills add pedronauck/skills --skill xstate -a claude-code, then check ~/.claude/skills/xstate/SKILL.md.
What does the xstate skill do?
It provides guidance for XState v5, @xstate/store, and XState integration with TanStack Query. The material covers machines, actors, React usage, and undo/redo.
Which tools does xstate use?
The skill is allowed to use Read, Grep, and Glob. Its examples also work with React, @xstate/store, and TanStack Query.
Similar skills
All skills for Frontend and UI →xstate by other authors comes first.