Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add statelyai/skills --skill xstate-v5git clone --depth 1 https://github.com/statelyai/skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/statelyai/skills/xstate-v5)<a href="https://agentmods.dev/skills/statelyai/skills/xstate-v5"><img src="https://agentmods.dev/badge/skills/statelyai/skills/xstate-v5/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/statelyai/skills/xstate-v5"><img src="https://agentmods.dev/badge/skills/statelyai/skills/xstate-v5.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00110 | $0.02932 |
| Opus 5.5 | $0.00044 | $0.01173 |
| Sonnet 5.5 | $0.00022 | $0.00586 |
| Haiku 4.5 | $0.00011 | $0.00293 |
Grade A, and why
xstate-v5 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 238 lines — stays where its author put it; the contents beside it link to each section on GitHub.
XState v5
Use this skill for state machine and statechart engineering first and API correctness second.
This skill is v5-only. When examples, blog posts, answers, or local code smell v4-ish, translate them rather than mixing versions. Prefer local repo code and official v5 docs over generic memory.
Your job:
- choose between
xstateand@xstate/store - design a sound machine or actor system from messy requirements
- write modern XState v5 TypeScript code in a consistent style
- review, repair, or improve existing XState code
- migrate legacy v4-ish patterns when they appear
- choose the right actor kind and action shape when the problem is not just
assign(...)plusfromPromise(...) - connect machines and actors to
@xstate/react,@xstate/vue,@xstate/svelte, or@xstate/solidwhen needed
First pass
In an existing codebase:
- Inspect local
package.jsonfiles and imports. - Read nearby machines, stores, actors, and adapter usage.
- Distinguish between new code, local edits, and migration work before choosing how opinionated to be.
- Preserve surrounding style by default.
Task mode
Choose a mode before writing code:
- New code: prefer the modern v5 patterns in this skill.
- Local edit: preserve local structure and naming unless the current code is mixed, broken, or cleanup was requested.
- Migration: prefer the smallest safe translation to v5. Preserve structure and semantics unless broader normalization was requested.
For migration and local edits, do not introduce setup(...), named implementations, object-form guards/actions, tags, or actor decomposition unless they are required for correctness, significantly reduce local complexity, or were explicitly requested.
Choose the tool
Prefer @xstate/store when the domain is simple event-based state management:
- no meaningful finite modes that need coordination, orchestration, or explicit lifecycle modeling
- no invoked async processes
- no actor communication
- no need for state machine or statechart concepts such as guarded transitions, delayed transitions, parallel states, or history
What ships with it
8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- evals/evals.json 9.6 KB
- evals/extract_and_typecheck.py 9.8 KB runs code
- evals/regrade_weighted.py 2.6 KB runs code
- references/adapters.md 1.8 KB
- references/advanced-patterns.md 8.8 KB
- references/examples.md 11 KB
- references/observables-and-inspection.md 2.9 KB
- references/v4-to-v5-quick-ref.md 4.6 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 238 lines · 110 tokens per session scan A 5d74022d0c7c
xstate-v5 is a skill published in the GitHub repository statelyai/skills (50 stars, last pushed today), licensed MIT. It adds 110 tokens to every session and 2,932 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
xstate-v5 compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| xstate-v5statelyai/skills | Skill | 50 | today | MIT | A | 110 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 134k | today | Apache-2.0 | A | 113 | Codex |
| local-ai-agentsmicrosoft/ai-agents-for-beginners | Skill | 79k | 2d ago | MIT | A | 200 | Claude Code, Codex |
| playwright-climicrosoft/playwright | Skill | 100k | today | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 394k | today | MIT | A | 36 | Claude Code |
| systematic-debuggingobra/superpowers | Skill | 315k | 6d ago | MIT | A | 21 | Claude Code |
| next-cache-components-adoptionvercel/next.js | Skill | 143k | today | MIT | A | 95 | Claude Code |