Skip to main content

branching-modeled-state-with-match

Stars1
Forks0
UpdatedJuly 6, 2026 at 01:32

Use when writing Python that branches on a value carrying a modeled state — a union of dataclass variants, a Literal-tagged kind/status/type field, or any state-machine state — to choose behavior or a return value, or when adding a variant to such a union. Also when reaching for an if/elif or isinstance chain on a tag field, a hand-rolled exhaustiveness helper, or a dict lookup to consume a tagged union.

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