onequery: Skill for Claude Code

.agents/skills/xstate/SKILL.md

xstate is a skill for Claude Code, Codex from wordbricks/onequery. It costs 52 tokens per session (590 once invoked), scanned A, original, Apache-2.0.

A set of TypeScript and React guidelines for modeling processes as XState state machines. A state machine lists defined modes, events, and transitions so application behavior is explicit.

In plain words
What is it for?
Use it to design, implement, or review XState v5 machines and their React integrations.
Why use it?
It reduces unclear state handling for workflows, asynchronous work, cancellation, delays, and complex UI behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is wordbricks/onequery's own configuration. It tells Claude Code and Codex how to work on onequery itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything onequery configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/wordbricks/onequery/main/.agents/skills/xstate/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/wordbricks/onequery

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for xstate

README.md
[![agentmods](https://agentmods.dev/badge/skills/wordbricks/onequery/xstate/github.svg)](https://agentmods.dev/skills/wordbricks/onequery/xstate)
Your own site
<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.

agentmods 80×15 button for xstate

Your own site · 80×15
<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>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 590 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 5d ago against content hash bfd25710f4c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-01, from the pricing page.

Security

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.

.agents/skills/xstate/SKILL.md · 57 lines

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

  1. Name the process and its legal modes.
  2. Define the domain events.
  3. Decide what data survives transitions.
  4. Move effects into actors or named implementations.
  5. Connect UI through actor hooks and snapshot reads.
  6. Test behavior at the actor boundary.

Read the full file on GitHub · 57 lines

Files

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.

Changes

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.

  1. 5d ago First seen · 57 lines · 52 tokens per session scan A bfd25710f4c7

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories