Borrowing it
Nothing to install: this file belongs to wordbricks/onequery. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/wordbricks/onequery/main/.agents/skills/xstate/SKILL.mdgit clone --depth 1 https://github.com/wordbricks/onequeryWrote 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/wordbricks/onequery/xstate)<a href="https://agentmods.dev/skills/wordbricks/onequery/xstate"><img src="https://agentmods.dev/badge/skills/wordbricks/onequery/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/wordbricks/onequery/xstate"><img src="https://agentmods.dev/badge/skills/wordbricks/onequery/xstate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00052 | $0.00590 |
| Opus 5.5 | $0.00021 | $0.00236 |
| Sonnet 5.5 | $0.00010 | $0.00118 |
| Haiku 4.5 | $0.00005 | $0.00059 |
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 5d 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 — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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.
What ships with it
9 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.
- 5d ago First seen · 57 lines · 52 tokens per session scan A bfd25710f4c7
xstate is a skill published in the GitHub repository wordbricks/onequery (17 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 52 tokens to every session and 590 once invoked, about $0.0002 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-09-25.
Other skills, from other repositories
frontend-conventions
Coding conventions, architecture patterns, and testing rules for the SkillHub React frontend. Ensures agents follow Feature-Sliced Design and use the generated OpenAPI types.
create-custom-widget
Build a Mendix pluggable widget from scratch with React and TypeScript and package it as an .mpk. Use when no marketplace or built-in widget covers what is needed and a custom React component has to be written.
typescript
Skill "typescript" from dhaupin/vant, covering typescript, when to use, what to do, 1. types and 2. generics.
react-component-design
Designs or reviews React component APIs. Handles prop drilling decisions, composition patterns, controlled/uncontrolled contracts, and minimal public API surfaces for React 18+ TypeScript components. Invoked when creating new components, refactoring existing ones, or reviewing component contracts.
effect-ts
Build and change desktop screens with Effect, Atom React and TanStack Query. Proactively use when implementing ViewModels, reactive state, async actions, resource lifetimes or native event streams in the desktop app.
create-modus-wrapper-component
Scaffold a new Modus wrapper component following established patterns with proper TypeScript interfaces, event handling, and cleanup.