Skip to content
cccskills
FreePublished on GitHub

xstate

Design, implement, and review XState v5 state machines and @xstate/react integrations in TypeScript. Use when modeling finite workflows, async actors, statecharts, guarded transitions, delayed transitions, actor systems, or machine-driven React behavior.

The English summary is being prepared. Showing the original description.

See how to install

Files included (10)

  • SKILL.md2.6 KB
  • references/actors.md2.5 KB
  • references/callbacks.md978 B
  • references/child-actors.md1.2 KB
  • references/modeling.md2.6 KB
  • references/observables.md905 B
  • references/promises.md2.2 KB
  • references/react.md5.0 KB
  • references/testing.md3.3 KB
  • references/transitions.md3.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

The English summary is being prepared. Showing the original description.

wordbricks/onequery17Updated Jul 30, 2026

A scoring scale for evaluating how well a CLI is designed for AI agents, based on the "Rewrite Your CLI for AI Agents" principles.

The English summary is being prepared. Showing the original description.

wordbricks/onequery17Updated Jul 30, 2026

Score a repository's agentic legibility from repo-visible evidence only. Use when Codex needs to audit how easy a codebase is for coding agents to discover, bootstrap, validate, and navigate, especially for harness-engineering reviews, developer-experience audits, repo cleanup, or before/after comparisons after improving docs, tooling, or architectural constraints.

The English summary is being prepared. Showing the original description.

wordbricks/onequery17Updated Jul 30, 2026

astro

Free

Expert in Astro framework with static generation and partial hydration patterns

The English summary is being prepared. Showing the original description.

wordbricks/onequery17Updated Jul 30, 2026

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep watching open PRs so fresh review feedback is surfaced promptly. Use when the user asks Codex to monitor a PR, watch CI, handle review comments, or keep an eye on failures and feedback on an open PR.

The English summary is being prepared. Showing the original description.

wordbricks/onequery17Updated Jul 30, 2026

Adopt better-result in an existing TypeScript codebase. Use when replacing try/catch, Promise rejection handling, null sentinels, or thrown domain exceptions with typed Result workflows.

The English summary is being prepared. Showing the original description.

wordbricks/onequery17Updated Jul 30, 2026

See all skills by wordbricks

Report a problem with this skill