class-to-statemachine-v1

Generate UML state machine diagrams from domain models with status attributes.

Updated Feb 19, 2026
One-click install
npx skills add https://github.com/atanaka/uml-workflow-v3 --skill class-to-statemachine-v1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: class-to-statemachine-v1
Source: https://github.com/atanaka/uml-workflow-v3/tree/main/skills/class-to-statemachine-v1
Command: npx skills add https://github.com/atanaka/uml-workflow-v3 --skill class-to-statemachine-v1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill generates explicit UML state machine diagrams for domain entities that expose status/state attributes, enabling clear lifecycles, validation, and governance of transitions.

Core Features & Use Cases

  • Identifies stateful entities by status-like attributes and corresponding enumerations.
  • Generates PlantUML (.puml) state machine diagrams and structured JSON metadata.
  • Supports multilingual state labels by inheriting language from domain models (Japanese/English/Bilingual).

Quick Start

Provide a domain-model.json and run the skill to generate the state machine diagrams.

Frequently Asked Questions about class-to-statemachine-v1

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate UML state machine diagrams from domain models?

To generate UML state machine diagrams, provide a domain-model JSON file containing status attributes and enumerations. The skill processes this input to derive initial and final states, extract transitions from business methods, and output PlantUML diagrams with JSON metadata.

What is a stateful entity in business domain modeling?

A stateful entity is a domain object that exposes a status or state attribute, typically backed by an enumeration. State machine modeling tracks the lifecycle of these entities by validating transitions and enforcing business rule guards between state changes.

Can I create bilingual PlantUML state machines from existing domain models?

Yes, you can create multilingual state machines by inheriting language settings from your domain models. The skill supports Japanese, English, and bilingual state labels directly in the generated PlantUML diagrams.

How are transition guards and validation rules extracted from business logic?

Transition guards are augmented from existing business rules within domain methods. The skill analyzes business logic to extract state transitions, applies guard enforcement conditions, and outputs optional validation code alongside the PlantUML diagrams.

Does this state machine generator work without external dependencies?

Yes, the state machine generator operates without external dependencies. It processes domain models autonomously to identify enumerations, extract transitions from methods, and produce PlantUML diagrams, JSON metadata, and validation code.

What is the best way to visualize lifecycle validation for stateful domain entities?

The best way to visualize lifecycle validation is generating PlantUML state machine diagrams that map status enumerations to initial and final states. This approach extracts transitions from business methods and enforces guards for code-generation readiness.