Stately

Agent skills

Install the Stately skills for Claude Code, Codex, and other coding agents to find, review, check, and fix state machines in your code.

Stately’s skills teach coding agents to work with state machines: finding the implicit ones in your code, reviewing changes for state bugs, model-checking flows, and writing XState.

Install

Install all of the skills with skills, which works with Claude Code, Codex, Cursor, OpenCode, and many other coding agents:

npx skills add statelyai/skills

To install one skill, name it:

npx skills add statelyai/skills --skill stately

In Claude Code, you can also install the skills as a plugin. The plugin includes the stately, xstate-v5, and xstate-v6 skills and connects the Stately MCP server:

/plugin marketplace add statelyai/skills
/plugin install stately@stately

In Codex, install the same plugin from the command line:

codex plugin marketplace add statelyai/skills
codex plugin add stately@stately

To save and open models in Stately, sign in to the MCP server. In Claude Code, run /mcp and sign in to stately. In Codex, run codex mcp login stately. npx skills add installs the skill files only; to connect another agent, add the MCP server at https://mcp.stately.ai/mcp. See MCP for each agent’s setup.

Skills

Each skill’s documentation lives next to its source, so it stays current with the skill.

SkillUse it toDocs
statelyFind implicit state machines, review changes for state bugs, model-check flows, and make flags explicit.Stately skill
xstate-v5Write, review, and migrate XState v5 machines.SKILL.md
xstate-v6Write, review, test, and migrate XState v6 machines using the installed package’s docs.SKILL.md
state-managementModel and refactor application state.SKILL.md
readmeKeep README files in sync with the code.SKILL.md

To use the Stately skill, mention Stately in a request, such as Use Stately to find all of the implicit state machines in my app. You can also invoke it with /stately:stately in Claude Code or $stately in Codex. Finding, reviewing, and checking need no XState, no Stately account, and no MCP connection.

Self-hosting

Finding, reviewing, and checking need no server. A self-hosted deployment exposes its MCP endpoint at /api/mcp. See Conversion API and MCP for its tools and for bridging stdio-only clients.

On this page