Skip to main content
Run any Skill in Manus
with one click

state-machines

Stars2
Forks0
UpdatedJune 29, 2026 at 09:50

Replace boolean-flag soup (`isLoading`, `isError`, `hasData`, `isComplete` …) with an explicit state machine — a named state enum plus a transition table that rejects illegal moves. Use when an entity carries 3+ correlated booleans, when impossible combinations are reachable in production (`isLoading && isError`), when transitions are scattered across the codebase, when bug reports describe "stuck in X" or "shouldn't be possible to be in Y while Z", or when a workflow has steps that must happen in order. Skip for entities with one boolean or genuinely independent flags.

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

SKILL.md
readonly