plantuml
PlantUML Diagram Generator
Generate diagrams from text descriptions using PlantUML.
Execution
Use the wrapper script scripts/generate-diagram.sh:
# File-based (creates .png next to .puml, reports output path)
./scripts/generate-diagram.sh diagram.puml
# SVG output
./scripts/generate-diagram.sh --svg diagram.puml
# Pipe mode
echo '@startuml
Alice -> Bob: Hello
@enduml' | ./scripts/generate-diagram.sh --pipe > output.png
The script validates input files exist and reports generated file paths on success. After generating, use the Read tool to display the image to the user.
Diagram Types
UML Diagrams (@startuml/@enduml)
| Type | Key Syntax |
|---|---|
| Sequence | A -> B: msg, A --> B: response (dashed), A ->> B: async |
| Class | class Name { +public() \n -private \n #protected } |
| Activity | :action;, if (cond) then (yes) else (no) endif, start/stop |
| State | [*] --> State1, State1 --> State2 : event |
| Use Case | actor User, usecase (Login), User --> (Login) |
| Component | component [Name], [A] --> [B] |
| Deployment | node Server { artifact App } |
Non-UML Diagrams
| Type | Start/End Tags | Example |
|---|---|---|
| Mind Map | @startmindmap/@endmindmap |
* Root \n ** Branch \n *** Leaf |
| Gantt | @startgantt/@endgantt |
[Task] requires 5 days |
| ER | @startuml |
entity User { *id : int } |
| JSON | @startjson/@endjson |
Direct JSON visualization |
| YAML | @startyaml/@endyaml |
Direct YAML visualization |
C4 Architecture Diagrams
Include the appropriate level:
!include <C4/C4_Context> ' Level 1: System Context
!include <C4/C4_Container> ' Level 2: Containers
!include <C4/C4_Component> ' Level 3: Components
Key macros:
Person(alias, "Label", "Description")System(alias, "Label", "Description")/System_Ext()for externalContainer(alias, "Label", "Tech", "Description")/ContainerDb()for databasesComponent(alias, "Label", "Tech", "Description")System_Boundary(alias, "Label") { ... }/Container_Boundary()Rel(from, to, "Label", "Tech")for relationshipsSHOW_LEGEND()at end for legend
Quick Reference
See references/syntax.md for complete syntax examples of all diagram types.
Output Formats
| Flag | Format |
|---|---|
| (default) | PNG |
--svg |
SVG (scalable) |
--pdf |
|
--txt |
ASCII art |
--utxt |
Unicode ASCII art |
Workflow
- Write
.pumlfile with diagram code - Run
./scripts/generate-diagram.sh file.puml - If error, check stderr for syntax issues (usually line numbers and descriptions)
- Use Read tool to display resulting image to user
Notes
Script Execution: Scripts should be executed from the skill directory or with full paths. They use Nix shebangs so no manual dependency installation is required.
More from markus1189/nixos-config
sourcegraph-search
Search code using Sourcegraph CLI. Use when (re)searching codebases, finding implementation examples, analyzing code patterns
22elfeed
Search the user's Emacs elfeed RSS feed database containing curated feeds from Reddit, blogs, YouTube, GitHub releases, and newsletters. Use when the user asks about articles they've read, mentions RSS feeds or 'something I read', wants to research topics from their curated sources (programming, AI, security, NixOS, Emacs, etc.), or needs to triage unread items.
1telegram
Direct integration with Telegram Bot API for checking inbox messages and sending messages (text, photos, documents) to chats. Triggers when users request 'check Telegram inbox', 'check messages', 'send message to [chat]', or mention Telegram bot interactions. Requires TELEGRAM_BOT_TOKEN environment variable.
1transcribe-audio
Transcribes audio files (mp3, wav, ogg, m4a, flac, webm) using Gemini API via Portkey, saves transcripts as markdown, and supports follow-up analysis. Use when the user asks to transcribe audio, summarize a meeting recording, check a voice note, extract action items from a recording, asks what was discussed in an audio file, or mentions processing audio files in any way.
1humanizing-prose
Guides writing prose that avoids common AI/LLM tells, and reviews existing text for AI tells with concrete reformulation suggestions. Use when the user asks to 'humanize' text, 'de-AI' writing, review text for AI tells, write naturally, avoid sounding like AI, make text sound human, or mentions AI detection concerns.
1agent-browser
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
1