Marketplace

plantuml-syntax

Authoritative reference for PlantUML diagram syntax. Provides UML and non-UML diagram types, syntax patterns, examples, and setup guidance for generating accurate PlantUML diagrams.

allowed_tools: Read, Glob, Grep

$ Installer

git clone https://github.com/melodic-software/claude-code-plugins /tmp/claude-code-plugins && cp -r /tmp/claude-code-plugins/plugins/visualization/skills/plantuml-syntax ~/.claude/skills/claude-code-plugins

// tip: Run this command in your terminal to install the skill


name: plantuml-syntax description: Authoritative reference for PlantUML diagram syntax. Provides UML and non-UML diagram types, syntax patterns, examples, and setup guidance for generating accurate PlantUML diagrams. allowed-tools: Read, Glob, Grep

PlantUML Syntax Reference

Overview

PlantUML is a Java-based tool that creates diagrams from text descriptions. It supports comprehensive UML diagrams and many non-UML diagram types.

Key advantages:

  • Most comprehensive diagram support (15+ types)
  • Mature C4 model integration with icons/sprites
  • Extensive customization options
  • Battle-tested (since 2009)

Requirements:

  • Java Runtime Environment (JRE)
  • GraphViz (for some diagram types)
  • Or use Docker: docker run -p 8080:8080 plantuml/plantuml-server

Diagram Types Quick Reference

UML Diagrams

TypeKeywordsBest For
Sequence@startumlInteractions, API flows, protocols
Use Case@startumlRequirements, user stories
Class@startumlOOP design, domain models
Activity@startumlWorkflows, processes
Component@startumlSystem structure
Deployment@startumlInfrastructure, deployment
State@startumlState machines

Non-UML Diagrams

TypeKeywordsBest For
JSON@startjsonJSON structure visualization
YAML@startyamlYAML structure visualization
Wireframe@startsaltUI mockups
Gantt@startganttProject timelines
MindMap@startmindmapHierarchical ideas
WBS@startwbsWork breakdown
ER@startumlDatabase schemas
C4@startuml with C4 includeSoftware architecture

Basic Syntax

All PlantUML diagrams are wrapped in start/end tags:

@startuml
' Your diagram code here
@enduml

Comments:

  • Single line: ' This is a comment
  • Block: /' This is a block comment '/

Title and captions:

@startuml
title My Diagram Title
caption This is a caption
header Page Header
footer Page Footer

' Diagram content
@enduml

Quick Reference Card

Sequence

@startuml
participant A
participant B
A -> B: Message
A <-- B: Response
@enduml

Class

@startuml
class Name {
    - private
    + public
    + method()
}
A <|-- B : extends
A *-- B : contains
@enduml

Activity

@startuml
start
:Action;
if (condition?) then (yes)
    :True path;
else (no)
    :False path;
endif
stop
@enduml

State

@startuml
[*] --> State1
State1 --> State2 : event
State2 --> [*]
@enduml

Component

@startuml
[Component1] --> [Component2]
database DB
Component2 --> DB
@enduml

References

For detailed syntax and complete examples, see:

ReferenceContentWhen to Load
sequence.mdParticipants, arrows, activation, groups, notesCreating sequence diagrams
class.mdClasses, visibility, relationships, cardinalityCreating class diagrams
activity.mdConditions, swimlanes, fork/joinCreating activity diagrams
state-component.mdState machines, components, deploymentCreating state/component diagrams
c4.mdC4 context, container, component diagramsCreating C4 architecture diagrams
special-diagrams.mdER, JSON, MindMap, GanttCreating non-UML diagrams
styling-setup.mdSkinparams, themes, installationCustomizing diagrams, setting up PlantUML

File Extensions

ExtensionDescription
.pumlStandard PlantUML file
.plantumlAlternative extension
.puShort extension
.iumlInclude file

Test Scenarios

Scenario 1: Creating a sequence diagram

Query: "Create a PlantUML sequence diagram for user authentication"

Expected: Skill activates, provides sequence syntax with participants, arrows, and alt/else blocks

Scenario 2: Creating a class diagram

Query: "Generate a PlantUML class diagram for an e-commerce domain"

Expected: Skill activates, provides class syntax with relationships and cardinality

Scenario 3: Creating a C4 diagram

Query: "Create a C4 container diagram in PlantUML"

Expected: Skill activates, directs to c4.md reference for includes and syntax


Last Updated: 2025-12-28 PlantUML Version: 1.2024.6

Version History

  • v1.1.0 (2025-12-28): Refactored to progressive disclosure - extracted content to references/
  • v1.0.0 (2025-12-26): Initial release

Repository

melodic-software
melodic-software
Author
melodic-software/claude-code-plugins/plugins/visualization/skills/plantuml-syntax
3
Stars
0
Forks
Updated2d ago
Added1w ago