plantuml-ascii
Verifiedby github · Updated Apr 16, 2026
Generate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or mentions plantuml ascii, text diagram, ascii art diagram. Supports: Converting PlantUML diagrams to ASCII art, Creating sequence diagrams, class diagrams, flowcharts in ASCII format, Generating Unicode-enhanced ASCII art with -utxt flag
See It In Action
Let me check for PlantUML and create the diagram.
Java is available but PlantUML isn't installed. Let me download the JAR and generate the diagram.
Java runtime isn't functional. I'll render this directly as ASCII art.
Diagram saved to auth-flow.txt (and the PlantUML source to auth-flow.puml). Here's what it covers:
Login Success Flow
POST /login-- Browser -> API Gateway -> Auth Service- Auth Service queries Postgres for user record, bcrypt-verifies the password
- On success: creates a session in Redis (TTL 7d), signs a JWT (exp 15min)
- Returns
200 OKwithaccess_token+refresh_token
Token Refresh Flow (two branches)
POST /refresh-- Browser -> API Gateway -> Auth Service- Auth Service verifies the refresh token signature, looks up session in Redis
- Session valid: signs a new JWT (15min), resets Redis TTL to 7d, returns
200 OK - Session expired/revoked: Redis returns nil, responds
401 Unauthorized(re-login required)
You can cat auth-flow.txt in any terminal to view it. Best with a monospace font that supports Unicode box-drawing characters.
External Tools
| Tool | Type |
|---|---|
| plantuml | binary |
Permissions
| Scope | Description |
|---|---|
| filesystem:read | |
| filesystem:write | |
| process:spawn |
SKILL.md
PlantUML ASCII Art Diagram Generator
Overview
Create text-based ASCII art diagrams using PlantUML. Perfect for documentation in terminal environments, README files, emails, or any scenario where graphical diagrams aren't suitable.
What is PlantUML ASCII Art?
PlantUML can generate diagrams as plain text (ASCII art) instead of images. This is useful for:
- Terminal-based workflows
- Git commits/PRs without image support
- Documentation that needs to be version-controlled
- Environments where graphical tools aren't available
Installation
# macOS
brew install plantuml
# Linux (varies by distro)
sudo apt-get install plantuml # Ubuntu/Debian
sudo yum install plantuml # RHEL/CentOS
# Or download JAR directly
wget https://github.com/plantuml/plantuml/releases/download/v1.2024.0/plantuml-1.2024.0.jar
Output Formats
| Flag | Format | Description |
|---|---|---|
-txt | ASCII | Pure ASCII characters |
-utxt | Unicode ASCII | Enhanced with box-drawing characters |
Basic Workflow
1. Create PlantUML Diagram File
@startuml
participant Bob
actor Alice
Bob -> Alice : hello
Alice -> Bob : Is it ok?
@enduml
2. Generate ASCII Art
# Standard ASCII output
plantuml -txt diagram.puml
# Unicode-enhanced output (better looking)
plantuml -utxt diagram.puml
# Using JAR directly
java -jar plantuml.jar -txt diagram.puml
java -jar plantuml.jar -utxt diagram.puml
3. View Output
Output is saved as diagram.atxt (ASCII) or diagram.utxt (Unicode).
Diagram Types Supported
Sequence Diagram
@startuml
actor User
participant "Web App" as App
database "Database" as DB
User -> App : Login Request
App -> DB : Validate Credentials
DB --> App : User Data
App --> User : Auth Token
@enduml
Class Diagram
@startuml
class User {
+id: int
+name: string
+email: string
+login(): bool
}
class Order {
+id: int
+total: float
+items: List
+calculateTotal(): float
}
User "1" -- "*" Order : places
@enduml
Activity Diagram
@startuml
start
:Initialize;
if (Is Valid?) then (yes)
:Process Data;
:Save Result;
else (no)
:Log Error;
stop
endif
:Complete;
stop
@enduml
State Diagram
@startuml
[*] --> Idle
Idle --> Processing : start
Processing --> Success : complete
Processing --> Error : fail
Success --> [*]
Error --> Idle : retry
@enduml
Component Diagram
@startuml
[Client] as client
[API Gateway] as gateway
[Service A] as svcA
[Service B] as svcB
[Database] as db
client --> gateway
gateway --> svcA
gateway --> svcB
svcA --> db
svcB --> db
@enduml
Use Case Diagram
@startuml
actor "User" as user
actor "Admin" as admin
rectangle "System" {
user -- (Login)
user -- (View Profile)
user -- (Update Settings)
admin -- (Manage Users)
admin -- (Configure System)
}
@enduml
Deployment Diagram
@startuml
actor "User" as user
node "Load Balancer" as lb
node "Web Server 1" as ws1
node "Web Server 2" as ws2
database "Primary DB" as db1
database "Replica DB" as db2
user --> lb
lb --> ws1
lb --> ws2
ws1 --> db1
ws2 --> db1
db1 --> db2 : replicate
@enduml
Command-Line Options
# Specify output directory
plantuml -txt -o ./output diagram.puml
# Process all files in directory
plantuml -txt ./diagrams/
# Include dot files (hidden files)
plantuml -txt -includeDot diagrams/
# Verbose output
plantuml -txt -v diagram.puml
# Specify charset
plantuml -txt -charset UTF-8 diagram.puml
Ant Task Integration
<target name="generate-ascii">
<plantuml dir="./src" format="txt" />
</target>
<target name="generate-unicode-ascii">
<plantuml dir="./src" format="utxt" />
</target>
Tips for Better ASCII Diagrams
- Keep it simple: Complex diagrams don't render well in ASCII
- Short labels: Long text breaks ASCII alignment
- Use Unicode (
-utxt): Better visual quality with box-drawing chars - Test before sharing: Verify in terminal with fixed-width font
- Consider alternatives: For complex diagrams, use Mermaid.js or graphviz
Example Output Comparison
Standard ASCII (-txt):
,---. ,---.
|Bob| |Alice|
`---' `---'
| hello |
|------------->|
| |
| Is it ok? |
|<-------------|
| |
Unicode ASCII (-utxt):
┌─────┐ ┌─────┐
│ Bob │ │Alice│
└─────┘ └─────┘
│ hello │
│─────────────>│
│ │
│ Is it ok? │
│<─────────────│
│ │
Quick Reference
# Create sequence diagram in ASCII
cat > seq.puml << 'EOF'
@startuml
Alice -> Bob: Request
Bob --> Alice: Response
@enduml
EOF
plantuml -txt seq.puml
cat seq.atxt
# Create with Unicode
plantuml -utxt seq.puml
cat seq.utxt
Troubleshooting
Problem: Garbled Unicode characters
- Solution: Ensure terminal supports UTF-8 and has proper font
Problem: Diagram looks misaligned
- Solution: Use fixed-width font (Courier, Monaco, Consolas)
Problem: Command not found
- Solution: Install PlantUML or use Java JAR directly
Problem: Output file not created
- Solution: Check file permissions, ensure PlantUML has write access
FAQ
What does plantuml-ascii do?
Generate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or mentions plantuml ascii, text diagram, ascii art diagram. Supports: Converting PlantUML diagrams to ASCII art, Creating sequence diagrams, class diagrams, flowcharts in ASCII format, Generating Unicode-enhanced ASCII art with -utxt flag
When should I use plantuml-ascii?
Use it when you need a repeatable workflow that produces downloadable file, text report.
What does plantuml-ascii output?
In the evaluated run it produced downloadable file, text report.
How do I install or invoke plantuml-ascii?
Ask the agent to use this skill when the task matches its documented workflow.
Which agents does plantuml-ascii support?
Agent support is inferred from the source, but not explicitly declared.
What tools, channels, or permissions does plantuml-ascii need?
It uses plantuml; channels commonly include file, text; permissions include filesystem:read, filesystem:write, process:spawn.
Is plantuml-ascii safe to install?
Static analysis marked this skill as medium risk; review side effects and permissions before enabling it.
How is plantuml-ascii different from an MCP or plugin?
A skill packages instructions and workflow conventions; tools, MCP servers, and plugins are dependencies the skill may call during execution.
Does plantuml-ascii outperform not using a skill?
About plantuml-ascii
When to use plantuml-ascii
You need a text-based diagram for a README, terminal, or plain-text document. You want to convert PlantUML definitions into ASCII or Unicode-rendered diagrams. You are working in environments where image-based diagrams are inconvenient.
When plantuml-ascii is not the right choice
You need rich graphical diagram editing or image output as the main result. PlantUML is not installed and cannot be added to the environment.
What it produces
Produces downloadable file and text report.