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 mintuz/skills --skill xstategit clone --depth 1 https://github.com/mintuz/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/mintuz/skills/xstate)<a href="https://agentmods.dev/skills/mintuz/skills/xstate"><img src="https://agentmods.dev/badge/skills/mintuz/skills/xstate/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/mintuz/skills/xstate"><img src="https://agentmods.dev/badge/skills/mintuz/skills/xstate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector 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.00118 | $0.01456 |
| Opus 5.5 | $0.00047 | $0.00582 |
| Sonnet 5.5 | $0.00024 | $0.00291 |
| Haiku 4.5 | $0.00012 | $0.00146 |
Grade A, and why
xstate 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 1mo 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 — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
XState
Treat a statechart as an executable ownership model for time, concurrency, and resource lifetimes.
Recognise a hand-rolled statechart
Each of these is a lifecycle already modelled by hand:
- a
useStateflag for work in flight:isSubmitting,isLoading,pending; - a
.then,.catch, orawaitblock that sets two or more pieces of state in sequence; - a re-entry guard such as
if (submitting) return; - a line that clears an error or a stale result before a retry;
- a
useEffectthat starts asynchronous work and needs an ignore flag in its cleanup; - two booleans that must never both be true, such as
isLoadingwitherror; - a
setTimeoutorsetIntervalfor retry, debounce, or polling that something must clear; - a
pointerdown,dragstart, or gesture handler that binds listeners to the document and must unbind them; - handling for a response that arrives after cancel, replacement, or unmount.
Any one of them leads to step 1, however small the request and whether or not the file imports xstate. When the code already exists, name each defect it has today and the wrong behaviour a user would see before proposing the machine that removes it (principle-capture-the-baseline).
For a visualisation-only request, inspect the current machine source and go to step 6 instead.
1. Establish the temporal boundary
Inventory the mounted journey, external authority, live resources, concurrent concerns, retry and cancellation policy, and every source of stale or duplicate work. Inspect existing actors and runtime integrations, and confirm the installed XState major version; the XState 4 and 5 APIs differ.
Use XState only where ordering, concurrency, retries, cancellation, stale results, or resource lifetimes make the behaviour temporal. Classify with two tests, by what they show, not by what the state renders:
- An external answer (a network response, a timer, another actor, the platform) makes state temporal whatever it looks like on screen. A disabled button or a spinner presents temporal state; it is not presentation state.
- Direct user input creates a lifecycle whenever the interaction has an interruptible middle: a drag holds pointer capture, cancels on Escape, and must release on unmount; a panel that animates shut has a closing phase.
What ships with it
6 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.
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.
- 1mo ago Changed · +1 lines bd953d828e06
- 2mo ago Changed d736796308d0
- 3mo ago First seen · 79 lines · 118 tokens per session scan A 3c485a2ceb3e
xstate is a skill published in the GitHub repository mintuz/skills (38 stars, last pushed 7d ago), licensed MIT. It adds 118 tokens to every session and 1,456 once invoked, about $0.0005 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 compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| xstatemintuz/skills | Skill | 38 | 7d ago | MIT | A | 118 | Claude Code, Codex |
| build-ghost-appTryGhost/Ghost | Skill | 56k | today | MIT | A | 44 | Claude Code, Codex |
| r3f-best-practiceszebbern/claude-code-guide | Skill | 4.7k | today | MIT | A | 74 | Claude Code, Codex |
| implementation-readinessHoangNguyen0403/agent-skills-standard | Skill | 598 | yesterday | MIT | A | 27 | Codex |
| devtools-event-clientTanStack/devtools | Skill | 519 | today | MIT | A | 79 | Claude Code, Codex |
| test-loopHoangNguyen0403/agent-skills-standard | Skill | 598 | yesterday | MIT | A | 25 | Codex |
| building-product-empty-statesPostHog/posthog | Skill | 41k | today | none | A | 133 | Claude Code, Codex |