State Machine Design
Automatically generates robust state machine diagrams and code from natural language descriptions of system behavior.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add state-machine-design npx -- -y @trustedskills/state-machine-design
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"state-machine-design": {
"command": "npx",
"args": [
"-y",
"@trustedskills/state-machine-design"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill automatically generates state machine diagrams and code based on natural language descriptions of system behavior. It allows users to design finite state machines and statecharts for modeling entity lifecycles, workflows, and overall system behavior. The tool leverages established patterns and standards, emphasizing a documentation-first approach and adherence to Harel statechart semantics.
When to use it
- When working on state machine or statechart modeling tasks for lifecycle and behavior specification.
- During planning or design phases when needing guidance on state machine approaches.
- To ensure adherence to established patterns and standards in state machine design.
Key capabilities
- Generates state machine diagrams based on natural language descriptions.
- Supports various state types including Initial, Normal, Final, Composite, Parallel, History, and Choice.
- Utilizes PlantUML syntax for diagram representation.
- Incorporates core elements such as States, Transitions, Events, Guards, Actions, Entry Actions, and Exit Actions.
- Requires the
docs-managementskill to access state machine patterns.
Example prompts
- "Design a state machine for an order processing system with states Draft, Submitted, and Paid."
- "Create a statechart that models a user authentication flow including Login, Verification, and Access Granted states."
- "Show me the best practices for designing a state machine in PlantUML."
Tips & gotchas
- Documentation-First: Always invoke the
docs-managementskill first to access relevant state machine patterns before using this skill. - MCP Dependency: The skill relies on MCP servers (like context7 for XState) to verify implementation patterns. Ensure these are accessible.
- Harel Semantics: The generated designs will be based on Harel statechart semantics, so familiarity with those concepts is beneficial.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.