plugins/formal-specification/skills/state-diagram/SKILL.md
Create state machine diagram from behavior description. Use for lifecycle and workflow modeling.
npx skillsauth add melodic-software/claude-code-plugins state-diagramInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create state machine diagrams from behavior descriptions with optional implementation code.
/state-diagram "order lifecycle from creation to delivery"
/state-diagram "user account states" format=mermaid
/state-diagram "payment processing workflow" implementation=csharp
/state-diagram "document approval process" format=xstate implementation=typescript
Parse the description to identify:
Load the state-machine-design skill for:
Extract states from the description:
Map state changes:
Create the state machine diagram in chosen format:
If implementation requested:
Deliver:
@startuml
title Entity State Machine
[*] --> Initial : Create
state Initial {
Initial : entry / initialize
}
Initial --> Active : Activate [isValid]
Active --> Completed : Complete
Completed --> [*]
@enduml
stateDiagram-v2
[*] --> Initial : Create
Initial --> Active : Activate
Active --> Completed : Complete
Completed --> [*]
import { createMachine } from 'xstate';
const machine = createMachine({
id: 'entity',
initial: 'initial',
states: {
initial: {
on: { ACTIVATE: 'active' }
},
active: {
on: { COMPLETE: 'completed' }
},
completed: {
type: 'final'
}
}
});
/state-diagram "e-commerce order from draft to delivered or cancelled" implementation=csharp
Output:
/state-diagram "document approval with review, revision, and approval stages" format=mermaid
Output:
/state-diagram "user account lifecycle including verification and suspension" format=xstate implementation=typescript
Output:
| Type | Description | |------|-------------| | Initial | Starting point (filled circle) | | Normal | Regular state | | Final | End point (circled dot) | | Composite | Contains sub-states | | History | Remembers last sub-state |
| Element | Description |
|---------|-------------|
| Event | Trigger for transition |
| Guard | Condition [isValid] |
| Action | Side effect / notify |
The command integrates with:
development
Search Milan Jovanovic's .NET blog for Clean Architecture, DDD, CQRS, EF Core, and ASP.NET Core patterns. Use for finding applicable patterns, code examples, and architecture guidance. Invoke when working with .NET projects that could benefit from proven architectural patterns.
tools
Install and configure Data API Builder (DAB) for production SQL Server MCP access with RBAC
tools
Manage MssqlMcp servers - status, rebuild, and upstream updates
tools
Developer environment setup guides for Windows, macOS, Linux, and WSL. Use when setting up development machines, installing tools, configuring environments, or following platform-specific setup guides. Covers package management, shell/terminal, code editors, AI tooling, containerization, databases, and more.