umple-diagram-generator
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Generate diagrams (state machines, class diagrams) from natural language requirements using Umple. Use when user requests: (1) State machine diagrams (2) UML class diagrams (3) Diagram generation from text descriptions, (4) Any mention of Umple diagram generation, (5) Visual representation of states, transitions, events, classes, or relationships. Outputs SVG diagrams with organized folder structure.
2installs
Sourceumple/umple-skills
Added on
NPX Install
npx skill4agent add umple/umple-skills umple-diagram-generatorTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Umple Diagram Generator Skill
Overview
Generate an Umple model from requirements and render it to SVG (Umple + Graphviz).
.umpSupported diagram types
| Type | Umple generator | Read before writing Umple |
|---|---|---|
| | |
| | |
Script
Entry point: (run with Bun via ).
scripts/main.tsnpx -y bunQuick start
bash
# Folder mode: organized output with all files (.ump, .gv, .svg)
npx -y bun ${SKILL_DIR}/scripts/main.ts --input model.ump --output ./diagrams --name "light-controller"
# Exact path mode: save SVG to specific file path
npx -y bun ${SKILL_DIR}/scripts/main.ts --input model.ump --output ./my-diagram.svg
# Class diagram with custom name
npx -y bun ${SKILL_DIR}/scripts/main.ts --input model.ump --output ./diagrams --name "user-system" --type class-diagramReplace with the absolute path to this skill directory.
${SKILL_DIR}Script options
| Option | Description |
|---|---|
| Input |
| Output path: directory for folder mode, or |
| Diagram name for folder mode (optional, triggers folder mode) |
| Diagram type: |
| GvStateDiagram suboption (repeatable) |
| JSON output with details |
| Show help |
Output modes
Folder Mode (when is specified or is a directory):
--name--output- Creates organized folder with timestamped name
- Includes all files: (source),
.ump(graphviz),.gv(diagram).svg
Folder naming:
- With :
--name<sanitized-name>_<timestamp>/ - Without :
--name<diagram-type>_<timestamp>/
Example:
diagrams/
└── light-controller_20260121_183045/
├── model.ump
├── model.gv
└── model.svgExact Path Mode (when ends with ):
--output.svg- Saves only the SVG file to the exact specified path
- Useful when user specifies a specific output location
Example:
bash
npx -y bun ${SKILL_DIR}/scripts/main.ts --input model.ump --output /path/to/my-diagram.svg
# Result: /path/to/my-diagram.svg (only SVG, no folder created)Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Missing dependencies (umple or dot) |
| 2 | Umple validation/compilation failed |
| 3 | SVG generation failed or unsupported diagram type |
Workflow
- Pre-flight: verify deps
command -v umple- If missing, stop and ask the user to install them.
command -v dot
- Clarify only what you must
- State machine: initial state, events, finals, guards/actions
- Class diagram: entities, attributes, relationships, multiplicities
- Write Umple
- Read the relevant guidance file (table above) before writing.
- Render
- Prefer folder mode unless the user explicitly provides an output path.
.svg
- Prefer folder mode unless the user explicitly provides an
- Validate
- On failure: fix Umple and retry up to 3 times.
Repair loop
If rendering fails: read script output, apply a focused fix, re-run the same command.
Output contract
- Diagram type
- Generated Umple (single block)
umple - Exact command run
- Output paths (folder + SVG, or exact SVG path)
Guardrails
- Prefer a smaller valid Umple model over guessing syntax.
- Use exact path mode only when the user provides an path.
.svg - Do not install system dependencies.
- Keep actions/guards minimal (no secrets, no I/O).