use-state-machine

use-state-machine is a skill for Codex from tetracoralla/state-machine. It costs 71 tokens per session (395 once invoked), scanned A, original, Apache-2.0.

A skill for working with finite-state machines: models that move between defined states when events occur. It can apply one event, simulate a sequence, find a route, validate a machine, inspect its structure, or compare two valid machines.

In plain words
What is it for?
Use it to test event sequences without side effects, find routes to states, check machine definitions, inspect their structure, or compare their meaning.
Why use it?
It makes state changes deterministic, so events can be accepted or rejected using explicit rules rather than guessed behavior.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to test event sequences without side effects, find routes to states, check machine definitions, inspect their structure, or compare their meaning.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tetracoralla/state-machine/use-state-machine
Install

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.

Any agent
npx skills add tetracoralla/state-machine --skill use-state-machine
Clone the repo
git clone --depth 1 https://github.com/tetracoralla/state-machine

Made for: 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 use-state-machine

README.md
[![agentmods](https://agentmods.dev/badge/skills/tetracoralla/state-machine/use-state-machine/github.svg)](https://agentmods.dev/skills/tetracoralla/state-machine/use-state-machine)
Your own site
<a href="https://agentmods.dev/skills/tetracoralla/state-machine/use-state-machine"><img src="https://agentmods.dev/badge/skills/tetracoralla/state-machine/use-state-machine/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 use-state-machine

Your own site · 80×15
<a href="https://agentmods.dev/skills/tetracoralla/state-machine/use-state-machine"><img src="https://agentmods.dev/badge/skills/tetracoralla/state-machine/use-state-machine.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 395 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.00071 $0.00395
Opus 5.5 $0.00028 $0.00158
Sonnet 5.5 $0.00014 $0.00079
Haiku 4.5 $0.00007 $0.00040

Measured 2mo ago against content hash c01530abf998, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

use-state-machine 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.

plugins/state-machine/skills/use-state-machine/SKILL.md · 36 lines

What it actually says

Use Step Switch

When a construction task involves interacting states, first reuse its existing machine or derive a small concrete spec from the accepted behavior. Keep the source requirements and unresolved choices alongside it; a guessed transition is not a requirement. Use the result to choose or repair the implementation, then inspect the real interaction and recovery. A valid spec or successful simulation proves only the modeled behavior, not the completeness, visual quality, persistence, or actual effects of the product. Do not shrink the task to what this finite-state model supports. Skip modeling when it would add more work than it removes.

Call the operation that answers the user's task directly:

  • machine.step for one event against the current snapshot;
  • machine.simulate for an ordered event sequence;
  • machine.find_path for a shortest structural route to a target state;
  • machine.validate after a Machine Spec is created or changed;
  • machine.inspect for a compact topology inventory;
  • machine.diff to compare two valid specs.

Use one tool call for an ordinary supported request. Do not list or inspect the machine first when the requested operation already has the required input.

Treat named guards as unresolved until their boolean outcomes come from explicit facts, an owning rules tool, or the user. Do not infer a favorable guard result. Returned effects are symbolic intents only; never claim this plugin executed an external action. Present rejected transitions with their stable reason and the structurally enabled events. Do not retry invalid input by guessing changed semantics.

Files

What ships with it

1 file 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. 2mo ago Changed · +10 lines · +2 tokens per session c01530abf998
  2. 3mo ago First seen · 26 lines · 69 tokens per session scan A 003968975c33

Subscribe to this mod's changes

use-state-machine is a skill published in the GitHub repository tetracoralla/state-machine (0 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 71 tokens to every session and 395 once invoked, about $0.0003 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-31.

Related

use-state-machine compared with skills from other repositories

use-state-machine next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
use-state-machinetetracoralla/state-machineSkill01mo agoApache-2.0A71Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill101ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill395ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill330k2d agoMITA21Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill14kyesterdayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code