Plantuml-Ascii
Plantuml-Ascii是一款design方向的AI技能,核心价值是Generate ASCII art diagrams using PlantUML text mode,可用于解决开发者在design领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。
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
mkdir -p ./skills/plantuml-ascii && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/plantuml-ascii/SKILL.md -o ./skills/plantuml-ascii/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# 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.jarOutput 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?
@enduml2. 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.puml3. 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
@endumlClass 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
@endumlActivity Diagram
@startuml
start
:Initialize;
if (Is Valid?) then (yes)
:Process Data;
:Save Result;
else (no)
:Log Error;
stop
endif
:Complete;
stop
@endumlState Diagram
@startuml
[*] --> Idle
Idle --> Processing : start
Processing --> Success : complete
Processing --> Error : fail
Success --> [*]
Error --> Idle : retry
@endumlComponent 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
@endumlUse 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)
}
@endumlDeployment 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
@endumlCommand-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.pumlAnt 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
1. **Keep it simple**: Complex diagrams don't render well in ASCII
2.
🎯 Best For
- Developers scaffolding new projects
- Prototype builders
- Claude users
- GitHub Copilot users
- Designers
💡 Use Cases
- Bootstrapping React components
- Creating API route handlers
- Design system documentation
- Component specification creation
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply Plantuml-Ascii to Your Work
Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.
- 4
Review and Refine
Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.
❓ Frequently Asked Questions
Can I customize the generated output?
Yes — modify the skill's prompt instructions to match your project conventions and coding style.
Does Plantuml-Ascii generate production-ready design specs?
It generates detailed specifications that developers can use directly. Review and adjust for your specific design system.
How do I install Plantuml-Ascii?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/plantuml-ascii/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Using generated code without understanding
Understand what generated code does before shipping it to production.
Not reading the full skill
Skills contain important context and edge cases beyond the quick start.