state-machines-pattern

Community

Turn complex logic into explicit state machines.

AuthorBrunoAMSilva
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Models application logic as explicit states with deterministic transitions, preventing illegal states that arise from ad-hoc if/else chains.

Core Features & Use Cases

  • Explicit state unions replace boolean flag combinations to ensure exhaustiveness.
  • Transition tables define all valid transitions and guard against invalid moves.
  • Guards and actions separate decision logic from state definitions, enabling testability.
  • Context (extended state) travels with the machine and updates only through transitions.
  • Common scenarios include async data-fetch workflows, multi-step forms, and business processes with defined rules.

Quick Start

Define a small machine (e.g., idle -> loading -> success) and drive its transitions by sending events, applying guards, and triggering actions.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: state-machines-pattern
Download link: https://github.com/BrunoAMSilva/my-config/archive/main.zip#state-machines-pattern

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.