{"id":"1bc2ab65-a9d2-4dd6-92cf-3379a7319fe7","entityType":"agent","slug":"clawhub-samonysh-plantuml-skill","name":"Plantuml","canonicalUrl":"https://www.xpersona.co/agent/clawhub-samonysh-plantuml-skill","canonicalPath":"/agent/clawhub-samonysh-plantuml-skill","generatedAt":"2026-10-10T07:42:14.412Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T04:01:34.738Z","emptyReason":null},"description":"Turn natural language into uml-diagrams.org style PlantUML diagrams (sequence, class, activity, use case, component, state…) and render to SVG/PNG/PDF. Use w... Skill: Plantuml Owner: samonysh Summary: Turn natural language into uml-diagrams.org style PlantUML diagrams (sequence, class, activity, use case, component, state…) and render to SVG/PNG/PDF. Use w... Tags: latest:1.7.2 Version history: v1.7.2 | 2026-07-12T08:55:11.880Z | user Release v1.7.2 v1.7.1 | 2026-07-09T03:37:10.011Z | user Release v1.7.1 v1.7.0 | 2026-07-07T19:01:02.791Z | user Release v1.7.0 v1.6.1 | 2026-","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.7K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s179t2y0de4pmccw2jxzpwwkr18802cc:plantuml-skill","sourceUrl":"https://clawhub.ai/samonysh/plantuml-skill","homepage":"https://clawhub.ai/samonysh/skills/plantuml-skill","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/samonysh/plantuml-skill","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/samonysh/skills/plantuml-skill","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":65,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Turn natural language into uml-diagrams.org style PlantUML diagrams (sequence, class, activity, use case, component, state…) and render to SVG/PNG/PDF. Use w..."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:01:34.738Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:01:34.738Z","emptyReason":null},"stars":null,"forks":null,"downloads":1706,"packageName":null,"latestVersion":"1.7.2","tractionLabel":"1.7K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:01:34.738Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T04:01:34.738Z","lastCrawledAt":"2026-10-10T04:01:34.738Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T04:01:34.738Z","lastVerifiedAt":null,"highlights":[{"version":"1.7.2","createdAt":"2026-07-12T08:55:11.880Z","changelog":"Release v1.7.2","fileCount":4,"zipByteSize":28763},{"version":"1.7.1","createdAt":"2026-07-09T03:37:10.011Z","changelog":"Release v1.7.1","fileCount":5,"zipByteSize":42206},{"version":"1.7.0","createdAt":"2026-07-07T19:01:02.791Z","changelog":"Release v1.7.0","fileCount":6,"zipByteSize":49864},{"version":"1.6.1","createdAt":"2026-07-05T07:25:45.819Z","changelog":"v1.6.1 — SVG style compliance, dark mode fixes, documentation cleanup","fileCount":5,"zipByteSize":39193},{"version":"1.6.0","createdAt":"2026-07-05T02:01:04.102Z","changelog":"Release v1.6.0","fileCount":5,"zipByteSize":37095},{"version":"1.5.0","createdAt":"2026-07-04T12:52:16.564Z","changelog":"## v1.5.0 ### New Features - Aspect ratio band 0.7–1.4 with --min-aspect / --max-aspect overrides - Spacing guards during auto-fix to preserve text legibility - Dark mode (--dark-mode) emits light + dark companion with recolored palette - Direction-injection safety for activity/sequence/state diagrams ### Improvements - Both Bash and PowerShell render scripts updated (full parity) - All 7 example SVGs regenerated (light + dark variants) - SKILL.md and both READMEs updated","fileCount":5,"zipByteSize":37791},{"version":"1.4.1","createdAt":"2026-06-25T01:53:11.585Z","changelog":"v1.4.1 — migrate opt-in public backend from plantuml.com to kroki.io; add PLANTUML_PUBLIC_SERVER for self-hosted Kroki","fileCount":5,"zipByteSize":33011},{"version":"1.4.0","createdAt":"2026-06-25T01:31:18.100Z","changelog":"v1.4.0 — A4 paper fit validation, render script bug fixes, README refresh, regenerated examples","fileCount":5,"zipByteSize":31412}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s179t2y0de4pmccw2jxzpwwkr18802cc:plantuml-skill","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-samonysh-plantuml-skill/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-samonysh-plantuml-skill/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-samonysh-plantuml-skill/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-samonysh-plantuml-skill/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-samonysh-plantuml-skill/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-samonysh-plantuml-skill/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T07:42:14.408Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-samonysh-plantuml-skill/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-samonysh-plantuml-skill/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-samonysh-plantuml-skill/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-samonysh-plantuml-skill/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-10T04:01:34.738Z","emptyReason":null},"readme":"Skill: Plantuml\n\nOwner: samonysh\n\nSummary: Turn natural language into uml-diagrams.org style PlantUML diagrams (sequence, class, activity, use case, component, state…) and render to SVG/PNG/PDF. Use w...\n\nTags: latest:1.7.2\n\nVersion history:\n\nv1.7.2 | 2026-07-12T08:55:11.880Z | user\n\nRelease v1.7.2\n\nv1.7.1 | 2026-07-09T03:37:10.011Z | user\n\nRelease v1.7.1\n\nv1.7.0 | 2026-07-07T19:01:02.791Z | user\n\nRelease v1.7.0\n\nv1.6.1 | 2026-07-05T07:25:45.819Z | user\n\nv1.6.1 — SVG style compliance, dark mode fixes, documentation cleanup\n\nv1.6.0 | 2026-07-05T02:01:04.102Z | user\n\nRelease v1.6.0\n\nv1.5.0 | 2026-07-04T12:52:16.564Z | user\n\n## v1.5.0\n\n### New Features\n- Aspect ratio band 0.7–1.4 with --min-aspect / --max-aspect overrides\n- Spacing guards during auto-fix to preserve text legibility\n- Dark mode (--dark-mode) emits light + dark companion with recolored palette\n- Direction-injection safety for activity/sequence/state diagrams\n\n### Improvements\n- Both Bash and PowerShell render scripts updated (full parity)\n- All 7 example SVGs regenerated (light + dark variants)\n- SKILL.md and both READMEs updated\n\nv1.4.1 | 2026-06-25T01:53:11.585Z | user\n\nv1.4.1 — migrate opt-in public backend from plantuml.com to kroki.io; add PLANTUML_PUBLIC_SERVER for self-hosted Kroki\n\nv1.4.0 | 2026-06-25T01:31:18.100Z | user\n\nv1.4.0 — A4 paper fit validation, render script bug fixes, README refresh, regenerated examples\n\nv1.3.0 | 2026-06-16T11:33:04.222Z | user\n\nv1.3.0 — Privacy-first defaults: public PlantUML server is now opt-in only (--use-public-server / -UsePublicServer). Local rendering (Docker → JAR) is the default. Addresses ClawHub security audit (SDI-1, SDI-2, SQP-2). Full changelog: https://github.com/samonysh/plantuml-skill/releases/tag/v1.3.0\n\nv1.2.0 | 2026-06-13T02:20:23.747Z | auto\n\nplantuml-skill 1.2.0\n\n- Added: New SKILL.md file consolidating documentation.\n- Removed: Deprecated skill-card.md and skill.md documentation files.\n- Updated: Improved Unix shell and PowerShell rendering scripts for PlantUML (generate-plantuml.sh, generate-plantuml.ps1).\n- Documentation and scripting workflow are now clearer and more maintainable.\n\nv1.1.1 | 2026-06-04T11:26:12.536Z | user\n\nplantuml-skill 1.1.1\n\n- Added a skill manifest section with version, emoji, homepage, and backend requirements.\n- Clarified rendering backend requirements: only one of curl, docker, or java is needed.\n- Shortened and streamlined the skill description for clarity and conciseness.\n- No changes to workflow or diagram style requirements.\n- Documentation improvements only; no functional changes.\n\nv1.1.0 | 2026-06-04T11:09:43.315Z | auto\n\nPlantUML Skill v1.1.0\n\n- Added comprehensive SKILL.md documentation describing the PlantUML diagram generation workflow from requirements parsing to output rendering.\n- Strictly enforces uml-diagrams.org reference style (black-and-white, Visio UML 2.x stencil look) for all generated diagrams unless the user requests otherwise.\n- Details mandatory PlantUML code preamble, syntax requirements, and styling do’s and don’ts.\n- Lists supported diagram types and relevant trigger phrases for use.\n- Provides step-by-step workflow and usage instructions for rendering with included conversion scripts across different OS environments.\n\nArchive index:\n\nArchive v1.7.2: 4 files, 28763 bytes\n\nFiles: scripts/generate_plantuml.py (41933b), skill-card.md (2225b), SKILL.md (46401b), _meta.json (133b)\n\nFile v1.7.2:SKILL.md\n\n---\r\nname: plantuml\r\ndescription: Turn natural language into uml-diagrams.org style PlantUML diagrams (sequence, class, activity, use case, component, state…) and render to SVG/PNG/PDF. Use when the user asks to draw a UML diagram.\r\nversion: 1.7.2\r\nemoji: \"📐\"\r\nhomepage: https://github.com/samonysh/plantuml-skill\r\nmetadata:\r\n  openclaw:\r\n    # The render script is local-first: it tries Docker, then a local plantuml.jar.\r\n    # The Kroki public server is OPT-IN ONLY (--use-public-server)\r\n    # because it uploads diagram source to a third-party service (kroki.io by default,\r\n    # overridable to a self-hosted Kroki via PLANTUML_PUBLIC_SERVER).\r\n    requires:\r\n      anyBins:\r\n        - docker\r\n        - java\r\n        - curl\r\n    # This skill reads no environment variables and writes no secrets; nothing to\r\n    # declare under primaryEnv / envVars / requires.env.\r\n---\r\n\r\n# PlantUML Diagram Generator\r\n\r\nGenerate professional PlantUML diagrams from natural language descriptions. This skill handles\r\nthe full pipeline: requirement analysis → PlantUML code generation → image rendering.\r\n\r\n## Trigger Phrases\r\n\r\nUse this skill when the user asks to:\r\n- \"Generate/draw/create a PlantUML diagram for...\"\r\n- \"Create a sequence/class/activity/... diagram showing...\"\r\n- \"Visualize this flow/architecture/process as...\"\r\n- \"Turn this description into a UML diagram\"\r\n- \"Make a flowchart / ERD / Gantt chart from...\"\r\n- Any request involving diagram generation from text descriptions\r\n\r\n## Mandatory Style Requirements\r\n\r\nALL diagrams generated by this skill MUST adhere to the **uml-diagrams.org reference style** —\r\nstrict OMG UML 2.x rendered with Visio UML 2.x stencils (black-and-white, no decoration).\r\nThis is the canonical style used throughout https://www.uml-diagrams.org and serves as the\r\nauthoritative visual reference for every diagram this skill produces.\r\nNo exceptions unless the user explicitly requests otherwise.\r\n\r\n- **Black and white only**: Pure black lines (`#000000`) on a pure white background (`#FFFFFF`). No colors, no grayscale fills, no gradients, no themed accents.\r\n- **Thin uniform line weight**: All borders, arrows and connectors use the default hair-line stroke (≈0.75pt). Never thicken or stylize lines.\r\n- **No circle visibility icons**: Class attributes MUST NOT show colored circle icons (● public / ◐ protected / ○ private). Enforced via `skinparam classAttributeIconSize 0`. Use `+ - # ~` text markers only.\r\n- **No circle stereotype icons**: Class and interface headers MUST NOT show circle-with-letter icons (Ⓒ / Ⓘ / Ⓐ / Ⓔ). Instead of relying on `skinparam style strictuml` (which degrades actors into plain text and use cases into rectangles — see [Common Failure Patterns](#common-failure-patterns)), we suppress the circle adornments purely at the **syntax level**: always declare interfaces / abstract classes / enumerations via a `class <<interface>>` / `class <<abstract>>` / `class <<enumeration>>` text stereotype — never use the `interface` / `abstract class` / `enum` keywords, which are what trigger the circle icons in the first place.\r\n- **Abstract classifiers in italics**: Per UML 2.5 §9 and uml-diagrams.org \"Name of an abstract classifier is shown in italics\" — the `<<abstract>>` text stereotype combined with `{abstract}` method markers renders correctly without needing `strictuml`.\r\n- **No 3D effects**: Drop shadows MUST be disabled (`skinparam shadowing false`).\r\n- **Clean typography**: Sans-serif font (Helvetica, equivalent to the Arial used by Visio stencils on uml-diagrams.org), 12pt default. No colored or bold text except diagram titles. When CJK characters are present, use `--cjk` flag to switch to a CJK-compatible font (see [CJK Font Support](#cjk-chinesejapanesekorean-font-support)).\r\n- **Aspect ratio**: Generated diagrams are automatically validated for an aspect-ratio band. By default the renderer tries to keep width/height between **0.7 and 1.4** (a comfortable page-like shape), re-rendering with layout corrections when the output falls outside that band. Diagrams that cannot be fixed safely after a few attempts are kept with a warning, so unusual diagrams are not destroyed. Use `--no-fix` to disable this behavior (see Step 3).\r\n- **A4 paper fit**: After aspect-ratio validation passes, the diagram is checked against A4 paper (210×297 mm). At the **96 DPI CSS standard**, this works out to **794×1123 px portrait** and **1123×794 px landscape**. The renderer accepts the diagram if it fits in EITHER orientation; otherwise it injects a computed PlantUML `scale N` directive and re-renders up to once. The default body font of 12 px (from the mandatory preamble) shrinks proportionally; if the estimated on-paper font drops below `--min-font-pt` (default **8 pt**), the script prints a legibility warning — at that point no further down-scaling helps and the user must split the diagram or abbreviate labels. A4 fit is **ON by default**; disable with `--no-a4-check`.\r\n- **Standard UML shapes**:\r\n  - Actors are **stick figures** (never Visio icons or images).\r\n  - Classes / components / nodes are plain rectangles; activities are round-cornered rectangles with the activity name in the upper-left.\r\n  - Dependencies and realizations use **dashed** lines; lifelines use **dashed** vertical lines (uml-diagrams.org explicitly: *\"a rectangle forming its head followed by a vertical line (which may be dashed) that represents the lifetime of the participant\"*).\r\n  - Notes are white folded-corner rectangles; no shading.\r\n- **Sequence diagram specifics** (matching uml-diagrams.org figures exactly):\r\n  - **Lifeline** head is a **white rectangle**; the vertical lifeline is a **dashed** black line.\r\n  - **Execution specification / activation bar** is a *\"thin grey or white rectangle on the lifeline\"* — this skill renders it as a thin **white** rectangle with a black border (no yellow PlantUML default).\r\n  - **Destruction occurrence** is shown as an `X` at the bottom of the lifeline (PlantUML `<participant> !` syntax).\r\n  - Synchronous messages use a **filled solid triangle arrowhead** on a solid line.\r\n  - Asynchronous messages use an **open stick arrowhead** on a solid line.\r\n  - Reply / return messages use an **open stick arrowhead** on a **dashed** line.\r\n- **Activity diagram specifics**: round-cornered action rectangles, solid arrows with **open arrowheads** for control flow, diamond decisions/merges, thick horizontal/vertical bar for forks/joins, filled black dot for initial node, bull's-eye for activity final.\r\n- **Use case diagram specifics**: stick-figure actor on the left, ellipses for use cases inside a rectangle **subject boundary**, `«include»` / `«extend»` as dashed open arrows.\r\n- **Class diagram specifics**: associations are plain solid lines, aggregation = hollow diamond, composition = filled diamond, generalization = hollow triangle arrowhead on solid line, realization = hollow triangle arrowhead on dashed line, dependency = open arrow on dashed line.\r\n\r\nEvery `.puml` file MUST include the mandatory uml-diagrams.org-style preamble as its first lines after `@startuml` (see [Style Configuration](#omg-uml-style-configuration-mandatory)).\r\n\r\n---\r\n\r\n## Workflow\r\n\r\n### Step 1: Parse and Confirm Requirements\r\n\r\nExtract from the user's description:\r\n- **Diagram type** — which PlantUML diagram fits best\r\n- **Actors/participants** — who/what is involved\r\n- **Relationships/flows** — how they interact\r\n- **Constraints/rules** — conditions, ordering, cardinality\r\n- **Output format** — svg (default), png, pdf, or txt (ASCII art)\r\n\r\nIf the diagram type is not explicitly stated, infer it from the description:\r\n\r\n| Description signals | Recommended diagram |\r\n|---|---|\r\n| \"A sends X to B\", \"request/response\", \"handshake\" | Sequence |\r\n| \"inherits from\", \"has many\", \"belongs to\", entities & fields | Class |\r\n| \"if/then\", \"approve/reject\", workflow, pipeline | Activity |\r\n| \"user can\", \"admin manages\", roles & permissions | Use Case |\r\n| \"depends on\", \"connects to\", services & interfaces | Component |\r\n| \"deployed on\", \"hosted on\", nodes & servers | Deployment |\r\n| \"transitions from\", \"changes state\", lifecycle | State |\r\n| timeline, milestones, phases, schedule | Gantt |\r\n| hierarchy, brainstorming, tree structure | Mind Map |\r\n\r\n**If ambiguous, ask the user to clarify the diagram type before proceeding.**\r\n\r\n### Step 2: Generate PlantUML Code\r\n\r\nWrite the PlantUML source following these rules:\r\n\r\n1. Start EVERY file with one of the two mandatory uml-diagrams.org-style preambles\r\n   immediately after `@startuml`:\r\n   - **Default**: the `skinparam` preamble — see [OMG-UML / uml-diagrams.org Style Configuration](#omg-uml--uml-diagramsorg-style-configuration-mandatory).\r\n      Maximum backward compatibility, used by every example except #07.\r\n      (Example #07 is a legacy alias of #01_css — same OAuth2 sequence diagram, same CSS preamble.)\r\n   - **Backup option**: the CSS-style `<style>` preamble — see [Alternative — CSS-style Preamble](#alternative--css-style-preamble-modern-backup-option).\r\n     Recommended on PlantUML ≥ 1.2019.9 where `skinparam` is being phased out.\r\n   Pick ONE per file — never mix both inside the same `.puml`.\r\n2. Use `@startuml` / `@enduml` delimiters\r\n3. Include a descriptive `title`\r\n4. Use proper PlantUML syntax for the chosen diagram type (see Reference below)\r\n5. Keep the diagram focused — don't add unnecessary elements\r\n6. NEVER add color, themed backgrounds, or decorative styling — strict black and white\r\n\r\nSave the PlantUML source to a `.puml` file in the working directory.\r\n\r\n### Step 3: Render to Image\r\n\r\nUse the bundled conversion script. It is a single, unified Python 3.8+ script\r\nthat works identically on Linux, macOS, and Windows (native PowerShell, cmd,\r\nGit Bash, WSL — anywhere `python` is on PATH):\r\n\r\n```bash\r\npython skills/plantuml/scripts/generate_plantuml.py <input.puml> <output_dir> --format <svg|png|pdf|txt>\r\n```\r\n\r\nOn Windows PowerShell / cmd the invocation is identical (use backslashes if\r\nyou prefer):\r\n\r\n```powershell\r\npython skills\\plantuml\\scripts\\generate_plantuml.py <input.puml> <output_dir> --format <svg|png|pdf|txt>\r\n```\r\n\r\n> **Historical note** — earlier versions shipped a `generate-plantuml.sh` /\r\n> `generate-plantuml.ps1` pair. Those have been consolidated into this single\r\n> Python script. All flags use the same `--kebab-case` names on every OS; the\r\n> previous PowerShell-style `-CamelCase` flag names are no longer used.\r\n\r\nThe script tries three backends in **strict priority order — local-first**.\r\nDocker and the local JAR are tried first; the Kroki public server is\r\n**OPT-IN ONLY** because it uploads your diagram source to a third-party\r\nservice (kroki.io by default):\r\n\r\n1. **Docker** (`plantuml/plantuml:latest`) — preferred default, fully local\r\n2. **Local `plantuml.jar`** (requires Java) — offline fallback\r\n3. **Kroki public server** (https://kroki.io by default) — **OPT-IN**\r\n   via `--use-public-server`. Override the host with the\r\n   `PLANTUML_PUBLIC_SERVER=<url>` environment variable to point at a\r\n   self-hosted Kroki instance.\r\n\r\n> ⚠ **Privacy notice** — passing `--use-public-server`\r\n> POSTs the entire `.puml` source to `kroki.io` (or your override host).\r\n> **Never** enable this flag for diagrams containing confidential architecture,\r\n> credentials, customer data, or proprietary business logic. When in doubt,\r\n> stay with the default (Docker / local JAR). See the\r\n> [Privacy & Backend Selection](#privacy--backend-selection) section below\r\n> for the full data-flow contract.\r\n\r\n**CJK font support**: When the `.puml` contains Chinese, Japanese, or Korean characters, add the `--cjk` flag:\r\n\r\n```bash\r\npython skills/plantuml/scripts/generate_plantuml.py diagram.puml ./output --format svg --cjk\r\n```\r\n\r\nThe `--cjk` flag:\r\n- Replaces `Helvetica` with `WenQuanYi Micro Hei` (a CJK-compatible font)\r\n- For Docker: mounts host font directories (`/usr/share/fonts`, `/usr/local/share/fonts`) into the container and refreshes the font cache before rendering\r\n- For local JAR: uses system-installed CJK fonts\r\n- If CJK fonts are not installed on the system, characters will not render correctly. Install them via:\r\n  - Debian/Ubuntu: `sudo apt install fonts-wqy-zenhei`\r\n  - Fedora: `sudo dnf install wqy-zenhei-fonts`\r\n  - macOS: CJK fonts are pre-installed (PingFang SC)\r\n\r\n**Aspect ratio validation**: After rendering (SVG or PNG), the script measures width/height and checks whether it sits inside the configured band. The default band is **0.7–1.4** (width/height), i.e. diagrams should be neither extremely tall nor extremely wide. If the output falls outside the band, the script injects layout corrections and re-renders:\r\n\r\n- **Too tall** (width/height < `--min-aspect`): applies `left to right direction` and adds spacing guards so labels do not crowd.\r\n- **Too wide** (width/height > `--max-aspect`): applies `top to bottom direction` and adds spacing guards.\r\n- Sequence, activity, and state diagrams skip the direction directive because it is either unsupported or counter-productive for those diagram types; only spacing guards are applied.\r\n- Up to 3 correction attempts are made. If a diagram still cannot be brought into the band (for example a very narrow use-case or state machine), the script keeps the best output and prints a warning rather than forcing an unusable layout.\r\n\r\nSpacing guards added during auto-fix include `Padding`, `BoxPadding`, `ParticipantPadding`, `MinClassWidth`, `WrapWidth`, `NodeSep`, and `RankSep`. These prevent text from becoming cramped when the layout is re-directed.\r\n\r\nTo disable automatic correction:\r\n```bash\r\npython skills/plantuml/scripts/generate_plantuml.py diagram.puml ./output --no-fix\r\n```\r\n\r\nTo set a custom band:\r\n```bash\r\npython skills/plantuml/scripts/generate_plantuml.py diagram.puml ./output --min-aspect 0.6 --max-aspect 1.5\r\n```\r\n\r\n**Dark mode (opt-in)**: The default output follows the strict uml-diagrams.org black-and-white style. When the user explicitly asks for a dark variant, add `--dark-mode`. This emits **both** the regular light output and a dark companion named `<basename>.dark.<fmt>`:\r\n\r\n```bash\r\npython skills/plantuml/scripts/generate_plantuml.py diagram.puml ./output --format svg --dark-mode\r\n```\r\n\r\nBehaviour:\r\n- Light output is rendered normally with the monochrome preamble.\r\n- The dark companion is produced by injecting a CSS `@media (prefers-color-scheme: dark)` block into the SVG, which automatically adapts to the user's system theme.\r\n- SVG is fully supported. PNG is supported when ImageMagick `convert` is available. PDF/TXT dark companions are not generated because there is no reliable local post-processor.\r\n- The dark palette uses `#1e1e2e` canvas, `#c9d1d9` text/strokes, `#f0f6fc` bold text, and `#6e7681` lifelines.\r\n- Bare-stroke injection: PlantUML's CSS mode may render some elements (use case ellipses, component rects, actor paths) with `fill=\"none\"` and no `stroke` attribute. The script injects CSS rules to add strokes to these elements in both light (`#000000`) and dark (`#c9d1d9`) variants.\r\n- **`skinparam style strictuml` is FORBIDDEN** — despite past documentation claiming it was \"essential\", `strictuml` actively degrades key UML shapes: actors collapse into plain-text labels, use cases collapse from ellipses into rectangles, and classes lose their header separator. The correct fix is a **complete per-element skinparam block** (see [OMG-UML Style Configuration](#omg-uml--uml-diagramsorg-style-configuration-mandatory)) that explicitly sets `BackgroundColor`/`BorderColor`/`FontColor` for every element category. The render script also **defensively strips** any leftover `skinparam style strictuml` line before dispatching to the backend, so even if a diagram source accidentally re-introduces it, the rendering pipeline will remove it.\r\n\r\n**A4 paper fit validation**: After the aspect-ratio check passes, the render script validates the diagram's pixel dimensions against A4 paper. PlantUML writes SVG in CSS pixels at the 96 DPI standard, so A4 (210×297 mm = 8.27×11.69 in) maps to **794×1123 px portrait** or **1123×794 px landscape**. The check is **ON by default** and runs right after the aspect check.\r\n\r\nBehaviour:\r\n- If the rendered image already fits within EITHER A4 box — nothing changes, the diagram is reported as A4-ready.\r\n- If the image exceeds both boxes, the script computes the smallest scale factor that lets it fit either orientation, clamps to `≤1.0` and a hard floor of `0.15`, injects a `scale N` directive into a working copy of the `.puml`, then re-renders once.\r\n- After re-rendering the script estimates the effective on-paper font size: `scale × 12 px × 0.75 ≈ pt` (the 0.75 factor converts px to pt at 96 DPI). If this is below `--min-font-pt` it prints a legibility warning — at that point further down-scaling cannot help; the user must split the diagram, shorten labels, or switch to a smaller font.\r\n\r\nFlags:\r\n\r\n| Flag | Purpose | Default |\r\n|---|---|---|\r\n| `--no-fix` | Disable automatic aspect-ratio correction | off (correction ON) |\r\n| `--min-aspect N` | Lower bound of acceptable width/height band | `0.7` |\r\n| `--max-aspect N` | Upper bound of acceptable width/height band | `1.4` |\r\n| `--no-a4-check` | Disable A4 fit validation entirely | off (check ON) |\r\n| `--min-font-pt N` | Minimum legible on-paper font size in pt | `8.0` |\r\n| `--dark-mode` | Also emit a dark companion (`<basename>.dark.<fmt>`) with CSS `@media` theme | off |\r\n\r\nExamples:\r\n```bash\r\n# Disable A4 fit\r\npython skills/plantuml/scripts/generate_plantuml.py diagram.puml ./output --no-a4-check\r\n\r\n# Tighten legibility threshold (warn if effective font drops below 10 pt)\r\npython skills/plantuml/scripts/generate_plantuml.py diagram.puml ./output --min-font-pt 10\r\n\r\n# Allow narrower diagrams and also emit a dark SVG companion\r\npython skills/plantuml/scripts/generate_plantuml.py diagram.puml ./output --format svg --min-aspect 0.5 --dark-mode\r\n```\r\n\r\nOn Windows the same commands work verbatim in PowerShell / cmd — just swap\r\nforward slashes for backslashes if you prefer native path style. There is no\r\nlonger a separate PowerShell flag namespace.\r\n\r\nA4 fit is skipped automatically for `txt` and `pdf` output (TXT has no image dimensions; PDF is already a print-oriented format the PlantUML renderer pages itself). The check shares the same 3-attempt auto-fix budget as aspect-ratio correction — running both does not double the cap.\r\n\r\n**After rendering, show the user the output.** If SVG is generated, read and display it inline.\r\nIf PNG/PDF is generated, tell the user where the file is saved.\r\n\r\n---\r\n\r\n## Privacy & Backend Selection\r\n\r\nThis skill is **local-first**. By default, all rendering happens on the user's\r\nown machine — diagram source code never leaves the host.\r\n\r\n### Default behaviour (no flags)\r\n\r\n```\r\n.puml ──► Docker (plantuml/plantuml)  ──► output.svg     [LOCAL, preferred]\r\n   └────► local plantuml.jar (Java)   ──► output.svg     [LOCAL, fallback]\r\n```\r\n\r\nNo network calls are made; nothing is uploaded.\r\n\r\n### Opt-in remote rendering\r\n\r\nThe Kroki public server (https://kroki.io) can render diagrams without any\r\nlocal installation, but doing so **POSTs the full `.puml` source to a third\r\nparty**. To use it you must explicitly opt in:\r\n\r\n```bash\r\n# Explicit opt-in required (same flag on every OS)\r\npython skills/plantuml/scripts/generate_plantuml.py diagram.puml ./output --use-public-server\r\n```\r\n\r\nWhen opt-in is active, the script:\r\n\r\n1. Prints a runtime privacy warning identifying the destination URL and operator\r\n2. POSTs the full `.puml` contents to `kroki.io` (or your override host)\r\n3. Saves the returned SVG/PNG/PDF/TXT locally\r\n\r\n### Self-hosted Kroki override\r\n\r\nKroki is open source and self-hostable\r\n([github.com/yuzutech/kroki](https://github.com/yuzutech/kroki)). To route\r\nopt-in traffic to your own instance instead of the public `kroki.io`, set the\r\n`PLANTUML_PUBLIC_SERVER` env var to your base URL:\r\n\r\n```bash\r\n# Linux / macOS / Git Bash / WSL\r\nPLANTUML_PUBLIC_SERVER=https://kroki.internal.example.com \\\r\n  python skills/plantuml/scripts/generate_plantuml.py diagram.puml ./output --use-public-server\r\n```\r\n\r\n```powershell\r\n# Windows PowerShell\r\n$env:PLANTUML_PUBLIC_SERVER = 'https://kroki.internal.example.com'\r\npython skills\\plantuml\\scripts\\generate_plantuml.py diagram.puml .\\output --use-public-server\r\n```\r\n\r\nThe runtime privacy warning surfaces the resolved host name so you can confirm\r\nthe traffic destination before any data leaves the machine. Custom hosts must\r\nexpose the standard Kroki endpoint shape `<base>/plantuml/<format>`.\r\n\r\n### Why Kroki replaced the legacy plantuml.com backend (v1.4.1)\r\n\r\nEarlier versions of this script POSTed to\r\n`https://www.plantuml.com/plantuml/<format>`. That endpoint now sits behind a\r\nCloudflare + Ezoic consent wall: a POST returns `302` redirecting to a\r\nJavaScript-only HTML consent page, making non-browser automation impossible.\r\nKroki replaces it because:\r\n\r\n- It re-runs the official upstream PlantUML JAR server-side, so the output is\r\n  byte-for-byte the same family of SVG/PNG/PDF/TXT.\r\n- It is open source and trivially self-hostable in Docker, restoring the\r\n  \"render off-host but in your trust boundary\" option that the plantuml.com\r\n  default once provided.\r\n- The Yuzu Tech operated public instance is EU-hosted, which moves the\r\n  default jurisdiction closer to GDPR-style baseline expectations than the\r\n  prior US-CDN-fronted plantuml.com path.\r\n\r\n### When NOT to use `--use-public-server`\r\n\r\nNever enable remote rendering for diagrams that contain any of the following:\r\n\r\n- Internal system / service / hostname identifiers\r\n- Credentials, tokens, API keys, connection strings (even as placeholders)\r\n- Customer data, PII, or any regulated content\r\n- Proprietary architecture, design IP, or trade-secret business logic\r\n- Source code excerpts or unreleased features\r\n\r\nIf you are unsure whether the diagram is safe to upload, **don't opt in** —\r\ninstall Docker (one command: `docker pull plantuml/plantuml:latest`) or\r\ndownload `plantuml.jar` and render locally.\r\n\r\n### CJK Docker mode and host font directories\r\n\r\nWhen `--cjk` is combined with the Docker backend, the script mounts\r\nhost font directories **read-only** into the container so PlantUML can\r\ndiscover system-installed CJK fonts. The mounts are:\r\n\r\n- Linux/macOS: `/usr/share/fonts`, `/usr/local/share/fonts`, `/System/Library/Fonts`\r\n- Windows (Git Bash/WSL): `/c/Windows/Fonts` or `/mnt/c/Windows/Fonts`\r\n- Windows (PowerShell): `%WINDIR%\\Fonts`\r\n\r\nThese mounts are read-only (`:ro`), are scoped to font directories only, and\r\nare used only inside the throwaway PlantUML container. No font data is\r\nwritten back to the host. If you do not need CJK rendering, omit the flag\r\nand no host directories are mounted.\r\n\r\n---\r\n\r\n### Step 4: Iterate on Feedback\r\n\r\nIf the user requests changes:\r\n1. Modify the `.puml` file\r\n2. Re-run the conversion script\r\n3. Show the updated result\r\n\r\n---\r\n\r\n## PlantUML Syntax Reference\r\n\r\n> **Note**: All examples below omit the mandatory monochrome preamble for brevity.\r\n> In actual generated code, EVERY file MUST include the [OMG-UML style preamble](#omg-uml-style-configuration-mandatory) immediately after `@startuml`.\r\n> The class diagram example shows the full preamble inline as a reference.\r\n\r\n### Sequence Diagram\r\n\r\n```\r\n@startuml\r\ntitle Authentication Flow\r\n\r\nactor User\r\nparticipant \"Web App\" as App\r\nparticipant \"Auth Service\" as Auth\r\ndatabase \"User DB\" as DB\r\n\r\nUser -> App: Login (email, password)\r\nApp -> Auth: POST /auth/login\r\nAuth -> DB: SELECT user WHERE email\r\nDB --> Auth: user record\r\nAuth -> Auth: Verify password hash\r\nalt Success\r\n    Auth --> App: JWT token\r\n    App --> User: Dashboard\r\nelse Failure\r\n    Auth --> App: 401 Unauthorized\r\n    App --> User: Error message\r\nend\r\n@enduml\r\n```\r\n\r\nKey syntax: `->` sync message, `-->` async/return, `->>` async, `alt/else/end` branching,\r\n`loop/end` loops, `opt/end` optional, `activate/deactivate` lifeline, `note left/right`\r\n\r\n### Class Diagram\r\n\r\n```\r\n@startuml\r\n' OMG-UML Monochrome Style — CSS variant\r\n<style>\r\nroot {\r\n  FontName Helvetica\r\n  FontSize 12\r\n  FontColor #000000\r\n  BackGroundColor #FFFFFF\r\n  LineColor #000000\r\n  LineThickness 0.75\r\n  RoundCorner 0\r\n  Shadowing 0\r\n}\r\ntitle {\r\n  FontSize 14\r\n  FontStyle bold\r\n  FontColor #000000\r\n  BackGroundColor transparent\r\n  LineColor transparent\r\n  LineThickness 0\r\n}\r\nnote {\r\n  BackGroundColor #FFFFFF\r\n  LineColor #000000\r\n  FontColor #000000\r\n}\r\nclassDiagram {\r\n  class { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\r\n  arrow { LineColor #000000; LineThickness 0.75 }\r\n}\r\n</style>\r\nskinparam classAttributeIconSize 0\r\n\r\ntitle Payment System\r\n\r\nclass User {\r\n    +id: UUID\r\n    +email: String\r\n    +name: String\r\n    +register()\r\n}\r\n\r\nclass Order {\r\n    +id: UUID\r\n    +total: Decimal\r\n    +status: OrderStatus\r\n    +calculateTotal()\r\n}\r\n\r\nclass PaymentProcessor <<interface>> {\r\n    +processPayment(amount: Decimal): Boolean\r\n    +refund(transactionId: UUID): Boolean\r\n}\r\n\r\nclass NotificationService <<abstract>> {\r\n    #enabled: Boolean\r\n    +{abstract} send(to: String, body: String)\r\n}\r\n\r\nenum OrderStatus {\r\n    PENDING\r\n    CONFIRMED\r\n    SHIPPED\r\n    DELIVERED\r\n}\r\n\r\nUser \"1\" -- \"*\" Order : places\r\nOrder ..|> PaymentProcessor\r\nNotificationService <|-- EmailNotifier\r\n@enduml\r\n```\r\n\r\nKey syntax: `+` public, `-` private, `#` protected, `{abstract}` abstract method,\r\n`class Foo <<interface>>` (interface via text stereotype — NOT `interface Foo`),\r\n`class Bar <<abstract>>` (abstract class — NOT `abstract class Bar`),\r\n`enum`, relationships: `--` association, `*--` composition, `o--` aggregation,\r\n`<|--` inheritance, `..|>` realization\r\n\r\n### Activity Diagram\r\n\r\n```\r\n@startuml\r\ntitle Order Processing\r\n\r\nstart\r\n:Receive Order;\r\nif (Payment Valid?) then (yes)\r\n    :Reserve Inventory;\r\n    if (Inventory Available?) then (yes)\r\n        :Confirm Order;\r\n        :Ship Order;\r\n        stop\r\n    else (no)\r\n        :Notify Customer;\r\n        :Cancel Order;\r\n        stop\r\n    endif\r\nelse (no)\r\n    :Reject Order;\r\n    stop\r\nendif\r\n@enduml\r\n```\r\n\r\nKey syntax: `start/stop/end`, `if/then/else/endif`, `repeat/repeat while`,\r\n`fork/fork again/end fork` (parallel), `split/split again/end split`,\r\n`partition \"name\" { ... }` (swimlane), `:Text;` action\r\n\r\n### Use Case Diagram\r\n\r\n```\r\n@startuml\r\ntitle E-Commerce System\r\n\r\nleft to right direction\r\n\r\nactor Customer\r\nactor Admin\r\n\r\nrectangle \"E-Commerce\" {\r\n    usecase \"Browse Products\" as UC1\r\n    usecase \"Place Order\" as UC2\r\n    usecase \"Manage Inventory\" as UC3\r\n    usecase \"Process Returns\" as UC4\r\n}\r\n\r\nCustomer --> UC1\r\nCustomer --> UC2\r\nAdmin --> UC3\r\nAdmin --> UC4\r\nUC2 ..> UC1 : <<include>>\r\n@enduml\r\n```\r\n\r\nKey syntax: `actor`, `usecase`, `rectangle/package` for system boundary,\r\n`-->` association, `..>` dependency, `<<include>>` / `<<extend>>` stereotypes\r\n\r\n### Component Diagram\r\n\r\n```\r\n@startuml\r\ntitle Microservice Architecture\r\n\r\npackage \"Frontend\" {\r\n    [Web App]\r\n    [Mobile App]\r\n}\r\n\r\npackage \"API Gateway\" {\r\n    [Gateway]\r\n}\r\n\r\npackage \"Services\" {\r\n    [User Service]\r\n    [Order Service]\r\n    [Payment Service]\r\n}\r\n\r\ndatabase \"PostgreSQL\" as DB\r\ncloud \"Message Queue\" as MQ\r\n\r\n[Web App] --> [Gateway]\r\n[Mobile App] --> [Gateway]\r\n[Gateway] --> [User Service]\r\n[Gateway] --> [Order Service]\r\n[Order Service] --> [Payment Service]\r\n[User Service] --> DB\r\n[Order Service] --> DB\r\n[Order Service] --> MQ\r\n@enduml\r\n```\r\n\r\nKey syntax: `[Component]`, `package \"name\" { }`, `database`, `cloud`, `node`,\r\n`frame`, `interface`, `()--` required interface, `--()` provided interface\r\n\r\n### Deployment Diagram\r\n\r\n```\r\n@startuml\r\ntitle Production Deployment\r\n\r\nnode \"AWS us-east-1\" {\r\n    node \"VPC\" {\r\n        node \"Public Subnet\" {\r\n            [Load Balancer]\r\n            [Bastion Host]\r\n        }\r\n        node \"Private Subnet\" {\r\n            node \"App Server 1\" {\r\n                [Application]\r\n            }\r\n            node \"App Server 2\" {\r\n                [Application]\r\n            }\r\n            database \"RDS Primary\"\r\n        }\r\n    }\r\n    cloud \"CDN\"\r\n}\r\n@enduml\r\n```\r\n\r\nKey syntax: `node \"name\" { }`, nested `node`, `database`, `cloud`, `actor`\r\n\r\n### State Diagram\r\n\r\n```\r\n@startuml\r\ntitle Order Lifecycle\r\n\r\n[*] --> Draft\r\nDraft --> Submitted : submit()\r\nSubmitted --> Paid : processPayment()\r\nSubmitted --> Cancelled : cancel()\r\nPaid --> Shipped : ship()\r\nShipped --> Delivered : confirmDelivery()\r\nDelivered --> [*]\r\nCancelled --> [*]\r\n\r\nstate Paid {\r\n    [*] --> Authorizing\r\n    Authorizing --> Captured : success\r\n    Authorizing --> Failed : decline\r\n    Captured --> [*]\r\n}\r\n@enduml\r\n```\r\n\r\nKey syntax: `[*]` start/end, `-->` transition with optional `: label`,\r\n`state Name { }` composite state, `state \"Name\" as Alias`\r\n\r\n### Gantt Chart\r\n\r\n```\r\n@startuml\r\ntitle Project Roadmap\r\n\r\nproject starts 2025-01-06\r\n\r\n[Design] lasts 10 days\r\n[Development] lasts 20 days\r\n[Development] starts at [Design]'s end\r\n[Testing] lasts 10 days\r\n[Testing] starts at [Development]'s end\r\n[Deployment] lasts 3 days\r\n[Deployment] starts at [Testing]'s end\r\n\r\n[Frontend] lasts 12 days\r\n[Frontend] starts at [Design]'s end\r\n[Backend] lasts 15 days\r\n[Backend] starts at [Design]'s end\r\n@enduml\r\n```\r\n\r\nKey syntax: `project starts YYYY-MM-DD`, `[Task] lasts N days`,\r\n`[Task] starts at [Other]'s end`, `--` separator for dependency,\r\n`printscale weekly/monthly`, `@dailymail`, `@weeklymail`\r\n\r\n### Mind Map\r\n\r\n```\r\n@startmindmap\r\ntitle System Architecture\r\n\r\n* Root Node\r\n** Level 1 A\r\n*** Level 2 A1\r\n*** Level 2 A2\r\n** Level 1 B\r\n*** Level 2 B1\r\n**** Level 3 B1a\r\n**** Level 3 B1b\r\n** Level 1 C\r\n@endmindmap\r\n```\r\n\r\nKey syntax: `*` root, `**` level 1, `***` level 2, etc.\r\nUse `@startmindmap` / `@endmindmap` (not `@startuml`).\r\nAffix `_` to markdown-style side notation, e.g., `***_ Right side node`.\r\nColors: `<style> * { BackgroundColor lightblue } </style>`\r\n\r\n---\r\n\r\n## OMG-UML / uml-diagrams.org Style Configuration (MANDATORY)\r\n\r\nEvery generated `.puml` file MUST include this CSS-style preamble immediately after `@startuml`.\r\nIt locks PlantUML's rendering to the **uml-diagrams.org reference style** (strict OMG UML 2.x,\r\nblack-and-white Visio stencils).\r\n\r\nSince PlantUML `1.2019.9` the project officially recommends the **CSS-like `<style>` block**\r\n([plantuml.com/style-evolution](https://plantuml.com/style-evolution)) as the preferred\r\nstyling mechanism — *\"`skinparam` is being phased out … users should migrate to `style`\"*.\r\n\r\n**Do NOT mix both inside the same `.puml` file.** Pick one preamble per diagram.\r\n\r\n### Primary — CSS `<style>` Preamble (recommended)\r\n\r\n```\r\n@startuml\r\n<style>\r\nroot {\r\n  FontName Helvetica\r\n  FontSize 12\r\n  FontColor #000000\r\n  BackGroundColor #FFFFFF\r\n  LineColor #000000\r\n  LineThickness 0.75\r\n  RoundCorner 0\r\n  Shadowing 0\r\n}\r\n\r\ntitle {\r\n  FontSize 14\r\n  FontStyle bold\r\n  FontColor #000000\r\n  BackGroundColor transparent\r\n  LineColor transparent\r\n  LineThickness 0\r\n}\r\n\r\nnote {\r\n  BackGroundColor #FFFFFF\r\n  LineColor #000000\r\n  FontColor #000000\r\n}\r\n\r\nsequenceDiagram {\r\n  actor       { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\r\n  participant { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\r\n  lifeLine    { BackGroundColor #FFFFFF; LineColor #000000; LineStyle 5-5; LineThickness 0.75 }\r\n  reference   { BackGroundColor #FFFFFF; LineColor #000000 }\r\n  group       { BackGroundColor #FFFFFF; LineColor #000000 }\r\n  arrow       { LineColor #000000; LineThickness 0.75; FontColor #000000 }\r\n}\r\n\r\nclassDiagram {\r\n  class { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\r\n  arrow { LineColor #000000; LineThickness 0.75 }\r\n}\r\n\r\nactivityDiagram {\r\n  activity { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000; RoundCorner 10 }\r\n  arrow    { LineColor #000000; LineThickness 0.75 }\r\n  diamond  { BackGroundColor #FFFFFF; LineColor #000000 }\r\n}\r\n\r\nuseCaseDiagram {\r\n  actor     { BackGroundColor #FFFFFF; LineColor #000000 }\r\n  usecase   { BackGroundColor #FFFFFF; LineColor #000000 }\r\n  rectangle { BackGroundColor #FFFFFF; LineColor #000000 }\r\n}\r\n\r\ncomponentDiagram {\r\n  component { BackGroundColor #FFFFFF; LineColor #000000 }\r\n  package   { BackGroundColor #FFFFFF; LineColor #000000 }\r\n}\r\n\r\nstateDiagram {\r\n  state { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\r\n  arrow { LineColor #000000 }\r\n}\r\n</style>\r\n\r\n' ── Per-element skinparam fallback (mandatory) ─────────────────────────────\r\n' The CSS <style> block above does NOT cover every PlantUML element category.\r\n' Without the following block, some shapes fall back to PlantUML defaults\r\n' (yellow activation bars, coloured actors, grey component fills, etc.).\r\n' NEVER add `skinparam style strictuml` — it degrades actors into plain text\r\n' and use cases into rectangles.\r\nskinparam classAttributeIconSize 0\r\nskinparam shadowing false\r\nskinparam backgroundColor #FFFFFF\r\nskinparam defaultFontColor #000000\r\n\r\nskinparam actor       { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam usecase     { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam rectangle   { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam class       { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam object      { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam component   { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam interface   { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam package     { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam node        { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam database    { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam cloud       { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam state       { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam activity    { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam sequence    { ArrowColor #000000; LifeLineBorderColor #000000; LifeLineBackgroundColor #FFFFFF; ParticipantBackgroundColor #FFFFFF; ParticipantBorderColor #000000; ActorBackgroundColor #FFFFFF; ActorBorderColor #000000; BoxBackgroundColor #FFFFFF; BoxBorderColor #000000 }\r\nskinparam note        { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\n```\r\n\r\n**What each CSS block does (mapped to uml-diagrams.org figures):**\r\n\r\n| CSS Block | Effect / uml-diagrams.org reference |\r\n|---|---|\r\n| `root` | Global defaults: Helvetica 12px black-on-white, 0.75pt lines, no shadows, square corners. Matches Visio UML 2.x stencil look. |\r\n| `root > Shadowing 0` | Disables drop shadows — uml-diagrams.org figures never have shadows. |\r\n| `root > RoundCorner 0` | Square corners on rectangles (matches Visio stencils). `activityDiagram.activity` overrides to `10` for round-cornered actions. |\r\n| `title` | Bold 14px black text, transparent background/border. |\r\n| `note` | White fill, black border, black text — matches uml-diagrams.org note style. |\r\n| `sequenceDiagram.lifeLine` | **Dashed black lines** (`LineStyle 5-5`) — exactly the lifeline notation on uml-diagrams.org/sequence-diagrams.html. |\r\n| `sequenceDiagram.arrow` | Thin black arrows (0.75pt) — matches Visio stencil hair-line strokes. |\r\n| `classDiagram.class` | White fill, black border — no grey fills. |\r\n| `activityDiagram.activity` | White fill with **round corners** (`RoundCorner 10`) — matches uml-diagrams.org activity shape. |\r\n| `activityDiagram.diamond` | White fill, black border for decision/merge diamonds. |\r\n| `useCaseDiagram` | White actors, use cases, and rectangles — no colored fills. |\r\n| `componentDiagram` | White components and packages — no colored fills. |\r\n| `stateDiagram.state` | White fill, black border — no grey fills. |\r\n\r\n**STYLING POLICY — keep the FULL preamble, NEVER use `strictuml`**\r\n\r\nThe CSS `<style>` block above tells PlantUML how to render **CSS-aware** elements\r\n(sequence lifelines, class boxes, activity nodes, notes). It does **NOT** cover\r\nevery PlantUML element category — actor stick-figures, use case ellipses,\r\ncomponent silhouettes, database cylinders and cloud shapes still fall back to\r\nPlantUML's built-in defaults (colored fills, yellow activation bars, missing\r\nborders on white canvas) when only a `<style>` block is present.\r\n\r\nThe **per-element `skinparam` block** immediately after `</style>` is therefore\r\nmandatory — treat CSS and skinparam as **complementary layers**, not\r\nalternatives. Together they guarantee black borders + white fills for actor /\r\nusecase / rectangle / class / component / interface / package / node / database\r\n/ cloud / state / activity / sequence / note across every diagram type and both\r\nlight and dark backgrounds.\r\n\r\nThe **only** allowed `skinparam ... style` value is the default — do NOT add\r\n`skinparam style strictuml`. Even though `strictuml` sounds like a \"make it\r\nmore UML-compliant\" flag, in practice it:\r\n\r\n- collapses `actor Foo` from a stick figure into a plain text label\r\n- collapses `usecase \"X\" as UC` from an ellipse into a plain rectangle\r\n- removes the class-header separator line so name/attribute/method sections merge\r\n\r\nThe render script also **defensively strips** any leftover\r\n`skinparam style strictuml` line before dispatching to the backend, so\r\naccidental re-introductions from user edits or LLM output are neutralized at\r\nthe pipeline level.\r\n\r\n`skinparam classAttributeIconSize 0` is retained separately because it only\r\nremoves the colored visibility dots (●/◐/○) and has no side effects on shapes.\r\n\r\n### Common Failure Patterns\r\n\r\nSymptoms and their root cause — check this list first if a rendered diagram\r\nlooks visually wrong:\r\n\r\n| Symptom | Root cause | Fix |\r\n|---|---|---|\r\n| Actor rendered as bare text, no stick figure | `skinparam style strictuml` in the source | Remove the line; rely on the per-element skinparam fallback (the render script also auto-strips it). |\r\n| Use case rendered as a plain rectangle instead of an ellipse | Same as above (`strictuml`) | Same as above. |\r\n| Class header separator line missing / name+attributes merged | Same as above (`strictuml`) | Same as above. |\r\n| Ellipses / actor paths lose their black border on light background | CSS `<style>` alone is used; the per-element `skinparam actor/usecase` block is missing | Restore the full preamble including the per-element skinparam fallback block. |\r\n| Sequence activation bar rendered yellow instead of white | Missing `skinparam sequence { ActorBackgroundColor #FFFFFF ... }` | Restore the full preamble. |\r\n| Class attributes show `●` / `◐` / `○` visibility icons | Missing `skinparam classAttributeIconSize 0` | Add the line. |\r\n| Header header sub-elements show `Ⓒ`/`Ⓘ`/`Ⓐ`/`Ⓔ` circle icons | Diagram used `interface Foo` / `abstract class Foo` / `enum Foo` keywords | Rewrite as `class Foo <<interface>>` / `class Foo <<abstract>>` / `class Foo <<enumeration>>`. |\r\n| Any decorative color / gradient / drop shadow appears | A `!theme` directive or extra `skinparam ...Color` overrides sneaked in | Remove them; the mandatory preamble is the single source of styling truth. |\r\n\r\n### Backup - `skinparam` Preamble (backward-compatible)\r\n\r\nUse this preamble only when you need maximum backward compatibility with PlantUML < 1.2019.9.\r\nBoth preambles produce the **same uml-diagrams.org reference look**.\r\n\r\n```\r\n' uml-diagrams.org reference style — strict OMG UML 2.x, monochrome\r\nskinparam monochrome true\r\nskinparam backgroundColor #FFFFFF\r\nskinparam defaultFontName Helvetica\r\nskinparam defaultFontSize 12\r\nskinparam shadowing false\r\nskinparam classAttributeIconSize 0\r\nskinparam sequenceMessageAlign center\r\nskinparam roundCorner 0\r\n\r\n' Force every fill to white so monochrome never falls back to grey\r\nskinparam ActorBackgroundColor #FFFFFF\r\nskinparam ParticipantBackgroundColor #FFFFFF\r\nskinparam NoteBackgroundColor #FFFFFF\r\nskinparam SequenceGroupBackgroundColor #FFFFFF\r\nskinparam PackageBackgroundColor #FFFFFF\r\nskinparam ClassBackgroundColor #FFFFFF\r\nskinparam ObjectBackgroundColor #FFFFFF\r\nskinparam StateBackgroundColor #FFFFFF\r\nskinparam UsecaseBackgroundColor #FFFFFF\r\nskinparam ComponentBackgroundColor #FFFFFF\r\nskinparam ActivityBackgroundColor #FFFFFF\r\nskinparam NodeBackgroundColor #FFFFFF\r\nskinparam DatabaseBackgroundColor #FFFFFF\r\nskinparam StereotypeCBackgroundColor #FFFFFF\r\nskinparam StereotypeIBackgroundColor #FFFFFF\r\nskinparam StereotypeABackgroundColor #FFFFFF\r\nskinparam StereotypeEBackgroundColor #FFFFFF\r\n\r\n' Sequence diagrams — match the lifeline / activation look on uml-diagrams.org:\r\n'   * lifeline = dashed black vertical line\r\n'   * activation bar = thin WHITE rectangle with black border (NOT yellow)\r\nskinparam SequenceLifeLineBorderColor #000000\r\nskinparam SequenceLifeLineBackgroundColor #FFFFFF\r\nskinparam SequenceLifeLineBorderThickness 0.75\r\nskinparam SequenceActivationBackgroundColor #FFFFFF\r\nskinparam SequenceActivationBorderColor #000000\r\nskinparam SequenceArrowColor #000000\r\nskinparam SequenceArrowThickness 0.75\r\nskinparam SequenceBoxBackgroundColor #FFFFFF\r\n\r\n' Default arrow / border colour everywhere\r\nskinparam ArrowColor #000000\r\nskinparam ArrowThickness 0.75\r\nskinparam DefaultTextColor #000000\r\n```\r\n\r\n**NEVER** apply colored themes (`!theme blueprint`, `!theme cerulean`, etc.), custom colors,\r\ngradients, shadows, or decorative styling — doing so breaks compliance with the\r\numl-diagrams.org reference style. If a user explicitly and unambiguously requests colour,\r\nadd it on top of this preamble rather than removing the preamble.\r\n\r\n### CJK (Chinese/Japanese/Korean) Font Support\r\n\r\nWhen diagrams contain CJK characters, `Helvetica` cannot render them — characters will appear as empty boxes (□) or tofu (▯).\r\n\r\n**In `.puml` files**: Replace `FontName Helvetica` in the CSS `<style>` block with a CJK-compatible font:\r\n```css\r\nroot {\r\n  FontName \"WenQuanYi Micro Hei\"\r\n}\r\n```\r\n\r\nFor the `skinparam` preamble (backward-compatible):\r\n```\r\nskinparam defaultFontName \"WenQuanYi Micro Hei\"\r\n```\r\n\r\n**When rendering**: Use the `--cjk` flag, which automatically applies the font substitution and configures Docker font mounting if needed:\r\n```bash\r\npython skills/plantuml/scripts/generate_plantuml.py diagram.puml ./output --cjk\r\n```\r\n\r\n**Host prerequisites** for CJK rendering:\r\n- **Docker method**: CJK fonts must exist on the host at `/usr/share/fonts` (or `/usr/local/share/fonts`, `/System/Library/Fonts`). The script mounts these into the container.\r\n- **Local JAR method**: CJK fonts must be installed system-wide (Java uses system fontconfig).\r\n- **Public server method**: The server handles font rendering automatically.\r\n\r\nCommon CJK font packages:\r\n| OS | Package |\r\n|---|---|\r\n| Debian/Ubuntu | `fonts-wqy-zenhei` |\r\n| Fedora/RHEL | `wqy-zenhei-fonts` |\r\n| Arch | `wqy-zenhei` |\r\n| Alpine | `font-wqy-zenhei` |\r\n| macOS | Built-in (PingFang SC / Hiragino Sans) |\r\n\r\n---\r\n\r\n## Error Recovery\r\n\r\nIf the PlantUML server returns an error:\r\n1. Check for syntax errors in the `.puml` file\r\n2. Validate that `@startuml` / `@enduml` are properly paired\r\n3. Ensure diagram-type-specific syntax is correct (e.g., `@startmindmap` for mind maps)\r\n4. Try the Docker fallback: `docker pull plantuml/plantuml:latest && python skills/plantuml/scripts/generate_plantuml.py ...`\r\n5. If all else fails, offer to install Java + plantuml.jar\r\n\r\nIf CJK characters render as empty boxes (□):\r\n1. Ensure the `--cjk` flag was passed when rendering\r\n2. Verify CJK fonts are installed on the host: `fc-list :lang=zh`\r\n3. If using Docker, check that font directories are mounted (the script handles this automatically with `--cjk`)\r\n\r\nIf aspect ratio warnings appear:\r\n1. The script applies up to 3 automatic corrections (direction toggle + scale)\r\n2. If warnings persist, manually adjust the `.puml`:\r\n   - For too-wide diagrams: add `top to bottom direction` and reduce `skinparam BoxPadding`\r\n   - For too-tall diagrams: add `left to right direction` and reduce `skinparam ParticipantPadding`\r\n   - Try `scale 0.75` or `scale 0.5` for extreme cases\r\n3. For sequence diagrams with many participants: consider splitting into multiple diagrams or abbreviating participant names\r\n\r\nIf A4 fit warnings appear (the script prints `📄 A4 fit: ... exceeds A4 ...`):\r\n1. The script has already re-rendered once with a `scale N` directive computed from the smaller required factor. Check the loop output for \"A4 fit ✓\" on the second render — if present, the diagram now fits within A4.\r\n2. If \"Estimated font ≈ Npt on A4\" message shows a value BELOW your `--min-font-pt` threshold (default 8 pt), further down-scaling will not make the diagram readable on print. To fix manually:\r\n   - Split the diagram at a natural boundary (per use case, per subsystem, per actor).\r\n   - Shorten long labels — e.g. replace `client_id, redirect_uri` with shortened param names.\r\n   - For sequence diagrams with many participants: group messages into sub-diagrams, or abbreviate participant display names.\r\n3. If you do not need A4 conformance for the current output, re-run with `--no-a4-check` to keep the larger original.\r\n4. To let the diagram stretch across multiple A4 sheets, set `--min-font-pt 6` (or lower) and accept reduced legibility — the script will warn but still emit the smaller-than-A4 final image.\r\n\r\n---\r\n\r\n## Output Expectations\r\n\r\nAfter successful generation:\r\n1. Show the generated PlantUML source (collapsed if long)\r\n2. Show the rendered output (SVG inline if possible)\r\n3. Report the saved file paths for both `.puml` and the rendered image\r\n4. Note any aspect ratio corrections that were applied (with dimensions before/after)\r\n5. Note whether A4 fit was met natively, applied a re-scale (report the `scale N` factor and the post-fix dimensions), or skipped due to legibility threshold; if the legibility warning fired, surface it and propose splitting the diagram\r\n6. Offer to make adjustments\n\nFile v1.7.2:_meta.json\n\n{\n  \"ownerId\": \"kn77wr1nhm7a4w5nw4kev80d49881www\",\n  \"slug\": \"plantuml-skill\",\n  \"version\": \"1.7.2\",\n  \"publishedAt\": 1783846511880\n}\n\nFile v1.7.2:skill-card.md\n\n## Description:\n\nTurn natural language into uml-diagrams.org style PlantUML diagrams and render them to SVG, PNG, PDF, or ASCII text.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[samonysh](https://clawhub.ai/user/samonysh)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and engineers use this skill to turn text descriptions of systems, workflows, and interactions into PlantUML source and rendered diagrams. It is useful for producing sequence, class, activity, use case, component, deployment, state, Gantt, and mind map diagrams in a consistent UML reference style.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The renderer can execute a local PlantUML JAR from the working directory or use a mutable Docker image.\n\nMitigation: Use a pinned, trusted Docker image or an explicitly verified PlantUML JAR, and avoid running the renderer from untrusted project directories.\n\nRisk: Opt-in public server rendering sends diagram source to a third-party service.\n\nMitigation: Do not use public server rendering for confidential diagrams; review PLANTUML_PUBLIC_SERVER before enabling remote rendering and prefer local or trusted self-hosted backends.\n\n## Reference(s):\n\n- [ClawHub Plantuml Skill](https://clawhub.ai/samonysh/skills/plantuml-skill)\n- [uml-diagrams.org UML Reference Style](https://www.uml-diagrams.org)\n- [Kroki Diagram Rendering](https://kroki.io)\n- [PlantUML Style Evolution](https://plantuml.com/style-evolution)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Code, Shell commands, Files, Markdown]\n\n**Output Format:** [Markdown guidance with PlantUML code blocks and rendered SVG, PNG, PDF, or TXT diagram files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Default rendering is local-first with Docker or a local PlantUML JAR; remote Kroki rendering is opt-in.]\n\n## Skill Version(s):\n\n1.7.2 (source: frontmatter and release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.7.1: 5 files, 42206 bytes\n\nFiles: scripts/generate-plantuml.ps1 (45986b), scripts/generate-plantuml.sh (50583b), skill-card.md (2118b), SKILL.md (46405b), _meta.json (133b)\n\nFile v1.7.1:SKILL.md\n\n---\r\nname: plantuml\r\ndescription: Turn natural language into uml-diagrams.org style PlantUML diagrams (sequence, class, activity, use case, component, state…) and render to SVG/PNG/PDF. Use when the user asks to draw a UML diagram.\r\nversion: 1.7.1\r\nemoji: \"📐\"\r\nhomepage: https://github.com/samonysh/plantuml-skill\r\nmetadata:\r\n  openclaw:\r\n    # The render script is local-first: it tries Docker, then a local plantuml.jar.\r\n    # The Kroki public server is OPT-IN ONLY (--use-public-server / -UsePublicServer)\r\n    # because it uploads diagram source to a third-party service (kroki.io by default,\r\n    # overridable to a self-hosted Kroki via PLANTUML_PUBLIC_SERVER).\r\n    requires:\r\n      anyBins:\r\n        - docker\r\n        - java\r\n        - curl\r\n    # This skill reads no environment variables and writes no secrets; nothing to\r\n    # declare under primaryEnv / envVars / requires.env.\r\n---\r\n\r\n# PlantUML Diagram Generator\r\n\r\nGenerate professional PlantUML diagrams from natural language descriptions. This skill handles\r\nthe full pipeline: requirement analysis → PlantUML code generation → image rendering.\r\n\r\n## Trigger Phrases\r\n\r\nUse this skill when the user asks to:\r\n- \"Generate/draw/create a PlantUML diagram for...\"\r\n- \"Create a sequence/class/activity/... diagram showing...\"\r\n- \"Visualize this flow/architecture/process as...\"\r\n- \"Turn this description into a UML diagram\"\r\n- \"Make a flowchart / ERD / Gantt chart from...\"\r\n- Any request involving diagram generation from text descriptions\r\n\r\n## Mandatory Style Requirements\r\n\r\nALL diagrams generated by this skill MUST adhere to the **uml-diagrams.org reference style** —\r\nstrict OMG UML 2.x rendered with Visio UML 2.x stencils (black-and-white, no decoration).\r\nThis is the canonical style used throughout https://www.uml-diagrams.org and serves as the\r\nauthoritative visual reference for every diagram this skill produces.\r\nNo exceptions unless the user explicitly requests otherwise.\r\n\r\n- **Black and white only**: Pure black lines (`#000000`) on a pure white background (`#FFFFFF`). No colors, no grayscale fills, no gradients, no themed accents.\r\n- **Thin uniform line weight**: All borders, arrows and connectors use the default hair-line stroke (≈0.75pt). Never thicken or stylize lines.\r\n- **No circle visibility icons**: Class attributes MUST NOT show colored circle icons (● public / ◐ protected / ○ private). Enforced via `skinparam classAttributeIconSize 0`. Use `+ - # ~` text markers only.\r\n- **No circle stereotype icons**: Class and interface headers MUST NOT show circle-with-letter icons (Ⓒ / Ⓘ / Ⓐ / Ⓔ). Instead of relying on `skinparam style strictuml` (which degrades actors into plain text and use cases into rectangles — see [Common Failure Patterns](#common-failure-patterns)), we suppress the circle adornments purely at the **syntax level**: always declare interfaces / abstract classes / enumerations via a `class <<interface>>` / `class <<abstract>>` / `class <<enumeration>>` text stereotype — never use the `interface` / `abstract class` / `enum` keywords, which are what trigger the circle icons in the first place.\r\n- **Abstract classifiers in italics**: Per UML 2.5 §9 and uml-diagrams.org \"Name of an abstract classifier is shown in italics\" — the `<<abstract>>` text stereotype combined with `{abstract}` method markers renders correctly without needing `strictuml`.\r\n- **No 3D effects**: Drop shadows MUST be disabled (`skinparam shadowing false`).\r\n- **Clean typography**: Sans-serif font (Helvetica, equivalent to the Arial used by Visio stencils on uml-diagrams.org), 12pt default. No colored or bold text except diagram titles. When CJK characters are present, use `--cjk` flag to switch to a CJK-compatible font (see [CJK Font Support](#cjk-chinesejapanesekorean-font-support)).\r\n- **Aspect ratio**: Generated diagrams are automatically validated for an aspect-ratio band. By default the renderer tries to keep width/height between **0.7 and 1.4** (a comfortable page-like shape), re-rendering with layout corrections when the output falls outside that band. Diagrams that cannot be fixed safely after a few attempts are kept with a warning, so unusual diagrams are not destroyed. Use `--no-fix` to disable this behavior (see Step 3).\r\n- **A4 paper fit**: After aspect-ratio validation passes, the diagram is checked against A4 paper (210×297 mm). At the **96 DPI CSS standard**, this works out to **794×1123 px portrait** and **1123×794 px landscape**. The renderer accepts the diagram if it fits in EITHER orientation; otherwise it injects a computed PlantUML `scale N` directive and re-renders up to once. The default body font of 12 px (from the mandatory preamble) shrinks proportionally; if the estimated on-paper font drops below `--min-font-pt` (default **8 pt**), the script prints a legibility warning — at that point no further down-scaling helps and the user must split the diagram or abbreviate labels. A4 fit is **ON by default**; disable with `--no-a4-check` (`-NoA4Check` on PowerShell).\r\n- **Standard UML shapes**:\r\n  - Actors are **stick figures** (never Visio icons or images).\r\n  - Classes / components / nodes are plain rectangles; activities are round-cornered rectangles with the activity name in the upper-left.\r\n  - Dependencies and realizations use **dashed** lines; lifelines use **dashed** vertical lines (uml-diagrams.org explicitly: *\"a rectangle forming its head followed by a vertical line (which may be dashed) that represents the lifetime of the participant\"*).\r\n  - Notes are white folded-corner rectangles; no shading.\r\n- **Sequence diagram specifics** (matching uml-diagrams.org figures exactly):\r\n  - **Lifeline** head is a **white rectangle**; the vertical lifeline is a **dashed** black line.\r\n  - **Execution specification / activation bar** is a *\"thin grey or white rectangle on the lifeline\"* — this skill renders it as a thin **white** rectangle with a black border (no yellow PlantUML default).\r\n  - **Destruction occurrence** is shown as an `X` at the bottom of the lifeline (PlantUML `<participant> !` syntax).\r\n  - Synchronous messages use a **filled solid triangle arrowhead** on a solid line.\r\n  - Asynchronous messages use an **open stick arrowhead** on a solid line.\r\n  - Reply / return messages use an **open stick arrowhead** on a **dashed** line.\r\n- **Activity diagram specifics**: round-cornered action rectangles, solid arrows with **open arrowheads** for control flow, diamond decisions/merges, thick horizontal/vertical bar for forks/joins, filled black dot for initial node, bull's-eye for activity final.\r\n- **Use case diagram specifics**: stick-figure actor on the left, ellipses for use cases inside a rectangle **subject boundary**, `«include»` / `«extend»` as dashed open arrows.\r\n- **Class diagram specifics**: associations are plain solid lines, aggregation = hollow diamond, composition = filled diamond, generalization = hollow triangle arrowhead on solid line, realization = hollow triangle arrowhead on dashed line, dependency = open arrow on dashed line.\r\n\r\nEvery `.puml` file MUST include the mandatory uml-diagrams.org-style preamble as its first lines after `@startuml` (see [Style Configuration](#omg-uml-style-configuration-mandatory)).\r\n\r\n---\r\n\r\n## Workflow\r\n\r\n### Step 1: Parse and Confirm Requirements\r\n\r\nExtract from the user's description:\r\n- **Diagram type** — which PlantUML diagram fits best\r\n- **Actors/participants** — who/what is involved\r\n- **Relationships/flows** — how they interact\r\n- **Constraints/rules** — conditions, ordering, cardinality\r\n- **Output format** — svg (default), png, pdf, or txt (ASCII art)\r\n\r\nIf the diagram type is not explicitly stated, infer it from the description:\r\n\r\n| Description signals | Recommended diagram |\r\n|---|---|\r\n| \"A sends X to B\", \"request/response\", \"handshake\" | Sequence |\r\n| \"inherits from\", \"has many\", \"belongs to\", entities & fields | Class |\r\n| \"if/then\", \"approve/reject\", workflow, pipeline | Activity |\r\n| \"user can\", \"admin manages\", roles & permissions | Use Case |\r\n| \"depends on\", \"connects to\", services & interfaces | Component |\r\n| \"deployed on\", \"hosted on\", nodes & servers | Deployment |\r\n| \"transitions from\", \"changes state\", lifecycle | State |\r\n| timeline, milestones, phases, schedule | Gantt |\r\n| hierarchy, brainstorming, tree structure | Mind Map |\r\n\r\n**If ambiguous, ask the user to clarify the diagram type before proceeding.**\r\n\r\n### Step 2: Generate PlantUML Code\r\n\r\nWrite the PlantUML source following these rules:\r\n\r\n1. Start EVERY file with one of the two mandatory uml-diagrams.org-style preambles\r\n   immediately after `@startuml`:\r\n   - **Default**: the `skinparam` preamble — see [OMG-UML / uml-diagrams.org Style Configuration](#omg-uml--uml-diagramsorg-style-configuration-mandatory).\r\n      Maximum backward compatibility, used by every example except #07.\r\n      (Example #07 is a legacy alias of #01_css — same OAuth2 sequence diagram, same CSS preamble.)\r\n   - **Backup option**: the CSS-style `<style>` preamble — see [Alternative — CSS-style Preamble](#alternative--css-style-preamble-modern-backup-option).\r\n     Recommended on PlantUML ≥ 1.2019.9 where `skinparam` is being phased out.\r\n   Pick ONE per file — never mix both inside the same `.puml`.\r\n2. Use `@startuml` / `@enduml` delimiters\r\n3. Include a descriptive `title`\r\n4. Use proper PlantUML syntax for the chosen diagram type (see Reference below)\r\n5. Keep the diagram focused — don't add unnecessary elements\r\n6. NEVER add color, themed backgrounds, or decorative styling — strict black and white\r\n\r\nSave the PlantUML source to a `.puml` file in the working directory.\r\n\r\n### Step 3: Render to Image\r\n\r\nUse the bundled conversion script. Pick the variant that matches the current OS / shell:\r\n\r\n**Linux, macOS, or Windows with a POSIX shell (Git Bash, MSYS2, WSL, Cygwin):**\r\n\r\n```bash\r\nbash skills/plantuml/scripts/generate-plantuml.sh <input.puml> <output_dir> --format <svg|png|pdf|txt>\r\n```\r\n\r\n**Windows native PowerShell (no bash required):**\r\n\r\n```powershell\r\npowershell -ExecutionPolicy Bypass -File skills\\plantuml\\scripts\\generate-plantuml.ps1 <input.puml> <output_dir> -Format <svg|png|pdf|txt>\r\n```\r\n\r\nBoth scripts accept the same arguments and try three backends in **strict priority\r\norder — local-first**. Docker and the local JAR are tried first; the Kroki\r\npublic server is **OPT-IN ONLY** because it uploads your diagram source to a\r\nthird-party service (kroki.io by default):\r\n\r\n1. **Docker** (`plantuml/plantuml:latest`) — preferred default, fully local\r\n2. **Local `plantuml.jar`** (requires Java) — offline fallback\r\n3. **Kroki public server** (https://kroki.io by default) — **OPT-IN**\r\n   via `--use-public-server` (Bash) or `-UsePublicServer` (PowerShell).\r\n   Override the host with `PLANTUML_PUBLIC_SERVER=<url>` (Bash) or\r\n   `$env:PLANTUML_PUBLIC_SERVER='<url>'` (PowerShell) to point at a\r\n   self-hosted Kroki instance.\r\n\r\n> ⚠ **Privacy notice** — passing `--use-public-server` / `-UsePublicServer`\r\n> POSTs the entire `.puml` source to `kroki.io` (or your override host).\r\n> **Never** enable this flag for diagrams containing confidential architecture,\r\n> credentials, customer data, or proprietary business logic. When in doubt,\r\n> stay with the default (Docker / local JAR). See the\r\n> [Privacy & Backend Selection](#privacy--backend-selection) section below\r\n> for the full data-flow contract.\r\n\r\n**CJK font support**: When the `.puml` contains Chinese, Japanese, or Korean characters, add the `--cjk` flag:\r\n\r\n```bash\r\nbash generate-plantuml.sh diagram.puml ./output --format svg --cjk\r\n```\r\n\r\nThe `--cjk` flag:\r\n- Replaces `Helvetica` with `WenQuanYi Micro Hei` (a CJK-compatible font)\r\n- For Docker: mounts host font directories (`/usr/share/fonts`, `/usr/local/share/fonts`) into the container and refreshes the font cache before rendering\r\n- For local JAR: uses system-installed CJK fonts\r\n- If CJK fonts are not installed on the system, characters will not render correctly. Install them via:\r\n  - Debian/Ubuntu: `sudo apt install fonts-wqy-zenhei`\r\n  - Fedora: `sudo dnf install wqy-zenhei-fonts`\r\n  - macOS: CJK fonts are pre-installed (PingFang SC)\r\n\r\n**Aspect ratio validation**: After rendering (SVG or PNG), the script measures width/height and checks whether it sits inside the configured band. The default band is **0.7–1.4** (width/height), i.e. diagrams should be neither extremely tall nor extremely wide. If the output falls outside the band, the script injects layout corrections and re-renders:\r\n\r\n- **Too tall** (width/height < `--min-aspect`): applies `left to right direction` and adds spacing guards so labels do not crowd.\r\n- **Too wide** (width/height > `--max-aspect`): applies `top to bottom direction` and adds spacing guards.\r\n- Sequence, activity, and state diagrams skip the direction directive because it is either unsupported or counter-productive for those diagram types; only spacing guards are applied.\r\n- Up to 3 correction attempts are made. If a diagram still cannot be brought into the band (for example a very narrow use-case or state machine), the script keeps the best output and prints a warning rather than forcing an unusable layout.\r\n\r\nSpacing guards added during auto-fix include `Padding`, `BoxPadding`, `ParticipantPadding`, `MinClassWidth`, `WrapWidth`, `NodeSep`, and `RankSep`. These prevent text from becoming cramped when the layout is re-directed.\r\n\r\nTo disable automatic correction:\r\n```bash\r\nbash generate-plantuml.sh diagram.puml ./output --no-fix\r\n```\r\n\r\nTo set a custom band:\r\n```bash\r\nbash generate-plantuml.sh diagram.puml ./output --min-aspect 0.6 --max-aspect 1.5\r\n```\r\n\r\n**Dark mode (opt-in)**: The default output follows the strict uml-diagrams.org black-and-white style. When the user explicitly asks for a dark variant, add `--dark-mode` (Bash) or `-DarkMode` (PowerShell). This emits **both** the regular light output and a dark companion named `<basename>.dark.<fmt>`:\r\n\r\n```bash\r\nbash generate-plantuml.sh diagram.puml ./output --format svg --dark-mode\r\n```\r\n\r\nBehaviour:\r\n- Light output is rendered normally with the monochrome preamble.\r\n- The dark companion is produced by injecting a CSS `@media (prefers-color-scheme: dark)` block into the SVG, which automatically adapts to the user's system theme.\r\n- SVG is fully supported. PNG is supported when ImageMagick `convert` is available. PDF/TXT dark companions are not generated because there is no reliable local post-processor.\r\n- The dark palette uses `#1e1e2e` canvas, `#c9d1d9` text/strokes, `#f0f6fc` bold text, and `#6e7681` lifelines.\r\n- Bare-stroke injection: PlantUML's CSS mode may render some elements (use case ellipses, component rects, actor paths) with `fill=\"none\"` and no `stroke` attribute. The script injects CSS rules to add strokes to these elements in both light (`#000000`) and dark (`#c9d1d9`) variants.\r\n- **`skinparam style strictuml` is FORBIDDEN** — despite past documentation claiming it was \"essential\", `strictuml` actively degrades key UML shapes: actors collapse into plain-text labels, use cases collapse from ellipses into rectangles, and classes lose their header separator. The correct fix is a **complete per-element skinparam block** (see [OMG-UML Style Configuration](#omg-uml--uml-diagramsorg-style-configuration-mandatory)) that explicitly sets `BackgroundColor`/`BorderColor`/`FontColor` for every element category. The render script also **defensively strips** any leftover `skinparam style strictuml` line before dispatching to the backend, so even if a diagram source accidentally re-introduces it, the rendering pipeline will remove it.\r\n\r\n**A4 paper fit validation**: After the aspect-ratio check passes, the render script validates the diagram's pixel dimensions against A4 paper. PlantUML writes SVG in CSS pixels at the 96 DPI standard, so A4 (210×297 mm = 8.27×11.69 in) maps to **794×1123 px portrait** or **1123×794 px landscape**. The check is **ON by default** and runs right after the aspect check.\r\n\r\nBehaviour:\r\n- If the rendered image already fits within EITHER A4 box — nothing changes, the diagram is reported as A4-ready.\r\n- If the image exceeds both boxes, the script computes the smallest scale factor that lets it fit either orientation, clamps to `≤1.0` and a hard floor of `0.15`, injects a `scale N` directive into a working copy of the `.puml`, then re-renders once.\r\n- After re-rendering the script estimates the effective on-paper font size: `scale × 12 px × 0.75 ≈ pt` (the 0.75 factor converts px to pt at 96 DPI). If this is below `--min-font-pt` it prints a legibility warning — at that point further down-scaling cannot help; the user must split the diagram, shorten labels, or switch to a smaller font.\r\n\r\nFlags:\r\n\r\n| Flag (Bash) | Flag (PowerShell) | Purpose | Default |\r\n|---|---|---|---|\r\n| `--no-fix` | `-NoFix` | Disable automatic aspect-ratio correction | off (correction ON) |\r\n| `--min-aspect N` | `-MinAspect N` | Lower bound of acceptable width/height band | `0.7` |\r\n| `--max-aspect N` | `-MaxAspect N` | Upper bound of acceptable width/height band | `1.4` |\r\n| `--no-a4-check` | `-NoA4Check` | Disable A4 fit validation entirely | off (check ON) |\r\n| `--min-font-pt N` | `-MinFontPt N` | Minimum legible on-paper font size in pt | `8.0` |\r\n| `--dark-mode` | `-DarkMode` | Also emit a dark companion (`<basename>.dark.<fmt>`) with CSS `@media` theme | off |\r\n\r\nExamples:\r\n```bash\r\n# Disable A4 fit\r\nbash generate-plantuml.sh diagram.puml ./output --no-a4-check\r\n\r\n# Tighten legibility threshold (warn if effective font drops below 10 pt)\r\nbash generate-plantuml.sh diagram.puml ./output --min-font-pt 10\r\n\r\n# Allow narrower diagrams and also emit a dark SVG companion\r\nbash generate-plantuml.sh diagram.puml ./output --format svg --min-aspect 0.5 --dark-mode\r\n```\r\n\r\n```powershell\r\n# PowerShell equivalents\r\npowershell -ExecutionPolicy Bypass -File generate-plantuml.ps1 diagram.puml .\\out -NoA4Check\r\npowershell -ExecutionPolicy Bypass -File generate-plantuml.ps1 diagram.puml .\\out -MinFontPt 10\r\npowershell -ExecutionPolicy Bypass -File generate-plantuml.ps1 diagram.puml .\\out -Format svg -MinAspect 0.5 -DarkMode\r\n```\r\n\r\nA4 fit is skipped automatically for `txt` and `pdf` output (TXT has no image dimensions; PDF is already a print-oriented format the PlantUML renderer pages itself). The check shares the same 3-attempt auto-fix budget as aspect-ratio correction — running both does not double the cap.\r\n\r\n**After rendering, show the user the output.** If SVG is generated, read and display it inline.\r\nIf PNG/PDF is generated, tell the user where the file is saved.\r\n\r\n---\r\n\r\n## Privacy & Backend Selection\r\n\r\nThis skill is **local-first**. By default, all rendering happens on the user's\r\nown machine — diagram source code never leaves the host.\r\n\r\n### Default behaviour (no flags)\r\n\r\n```\r\n.puml ──► Docker (plantuml/plantuml)  ──► output.svg     [LOCAL, preferred]\r\n   └────► local plantuml.jar (Java)   ──► output.svg     [LOCAL, fallback]\r\n```\r\n\r\nNo network calls are made; nothing is uploaded.\r\n\r\n### Opt-in remote rendering\r\n\r\nThe Kroki public server (https://kroki.io) can render diagrams without any\r\nlocal installation, but doing so **POSTs the full `.puml` source to a third\r\nparty**. To use it you must explicitly opt in:\r\n\r\n```bash\r\n# Bash — explicit opt-in required\r\nbash generate-plantuml.sh diagram.puml ./output --use-public-server\r\n```\r\n\r\n```powershell\r\n# PowerShell — explicit opt-in required\r\npowershell -ExecutionPolicy Bypass -File generate-plantuml.ps1 diagram.puml .\\output -UsePublicServer\r\n```\r\n\r\nWhen opt-in is active, the script:\r\n\r\n1. Prints a runtime privacy warning identifying the destination URL and operator\r\n2. POSTs the full `.puml` contents to `kroki.io` (or your override host)\r\n3. Saves the returned SVG/PNG/PDF/TXT locally\r\n\r\n### Self-hosted Kroki override\r\n\r\nKroki is open source and self-hostable\r\n([github.com/yuzutech/kroki](https://github.com/yuzutech/kroki)). To route\r\nopt-in traffic to your own instance instead of the public `kroki.io`, set the\r\n`PLANTUML_PUBLIC_SERVER` env var to your base URL:\r\n\r\n```bash\r\n# Bash\r\nPLANTUML_PUBLIC_SERVER=https://kroki.internal.example.com \\\r\n  bash generate-plantuml.sh diagram.puml ./output --use-public-server\r\n```\r\n\r\n```powershell\r\n# PowerShell\r\n$env:PLANTUML_PUBLIC_SERVER = 'https://kroki.internal.example.com'\r\npowershell -ExecutionPolicy Bypass -File generate-plantuml.ps1 diagram.puml .\\output -UsePublicServer\r\n```\r\n\r\nThe runtime privacy warning surfaces the resolved host name so you can confirm\r\nthe traffic destination before any data leaves the machine. Custom hosts must\r\nexpose the standard Kroki endpoint shape `<base>/plantuml/<format>`.\r\n\r\n### Why Kroki replaced the legacy plantuml.com backend (v1.4.1)\r\n\r\nEarlier versions of this script POSTed to\r\n`https://www.plantuml.com/plantuml/<format>`. That endpoint now sits behind a\r\nCloudflare + Ezoic consent wall: a POST returns `302` redirecting to a\r\nJavaScript-only HTML consent page, making non-browser automation impossible.\r\nKroki replaces it because:\r\n\r\n- It re-runs the official upstream PlantUML JAR server-side, so the output is\r\n  byte-for-byte the same family of SVG/PNG/PDF/TXT.\r\n- It is open source and trivially self-hostable in Docker, restoring the\r\n  \"render off-host but in your trust boundary\" option that the plantuml.com\r\n  default once provided.\r\n- The Yuzu Tech operated public instance is EU-hosted, which moves the\r\n  default jurisdiction closer to GDPR-style baseline expectations than the\r\n  prior US-CDN-fronted plantuml.com path.\r\n\r\n### When NOT to use `--use-public-server`\r\n\r\nNever enable remote rendering for diagrams that contain any of the following:\r\n\r\n- Internal system / service / hostname identifiers\r\n- Credentials, tokens, API keys, connection strings (even as placeholders)\r\n- Customer data, PII, or any regulated content\r\n- Proprietary architecture, design IP, or trade-secret business logic\r\n- Source code excerpts or unreleased features\r\n\r\nIf you are unsure whether the diagram is safe to upload, **don't opt in** —\r\ninstall Docker (one command: `docker pull plantuml/plantuml:latest`) or\r\ndownload `plantuml.jar` and render locally.\r\n\r\n### CJK Docker mode and host font directories\r\n\r\nWhen `--cjk` / `-Cjk` is combined with the Docker backend, the script mounts\r\nhost font directories **read-only** into the container so PlantUML can\r\ndiscover system-installed CJK fonts. The mounts are:\r\n\r\n- Linux/macOS: `/usr/share/fonts`, `/usr/local/share/fonts`, `/System/Library/Fonts`\r\n- Windows (Git Bash/WSL): `/c/Windows/Fonts` or `/mnt/c/Windows/Fonts`\r\n- Windows (PowerShell): `%WINDIR%\\Fonts`\r\n\r\nThese mounts are read-only (`:ro`), are scoped to font directories only, and\r\nare used only inside the throwaway PlantUML container. No font data is\r\nwritten back to the host. If you do not need CJK rendering, omit the flag\r\nand no host directories are mounted.\r\n\r\n---\r\n\r\n### Step 4: Iterate on Feedback\r\n\r\nIf the user requests changes:\r\n1. Modify the `.puml` file\r\n2. Re-run the conversion script\r\n3. Show the updated result\r\n\r\n---\r\n\r\n## PlantUML Syntax Reference\r\n\r\n> **Note**: All examples below omit the mandatory monochrome preamble for brevity.\r\n> In actual generated code, EVERY file MUST include the [OMG-UML style preamble](#omg-uml-style-configuration-mandatory) immediately after `@startuml`.\r\n> The class diagram example shows the full preamble inline as a reference.\r\n\r\n### Sequence Diagram\r\n\r\n```\r\n@startuml\r\ntitle Authentication Flow\r\n\r\nactor User\r\nparticipant \"Web App\" as App\r\nparticipant \"Auth Service\" as Auth\r\ndatabase \"User DB\" as DB\r\n\r\nUser -> App: Login (email, password)\r\nApp -> Auth: POST /auth/login\r\nAuth -> DB: SELECT user WHERE email\r\nDB --> Auth: user record\r\nAuth -> Auth: Verify password hash\r\nalt Success\r\n    Auth --> App: JWT token\r\n    App --> User: Dashboard\r\nelse Failure\r\n    Auth --> App: 401 Unauthorized\r\n    App --> User: Error message\r\nend\r\n@enduml\r\n```\r\n\r\nKey syntax: `->` sync message, `-->` async/return, `->>` async, `alt/else/end` branching,\r\n`loop/end` loops, `opt/end` optional, `activate/deactivate` lifeline, `note left/right`\r\n\r\n### Class Diagram\r\n\r\n```\r\n@startuml\r\n' OMG-UML Monochrome Style — CSS variant\r\n<style>\r\nroot {\r\n  FontName Helvetica\r\n  FontSize 12\r\n  FontColor #000000\r\n  BackGroundColor #FFFFFF\r\n  LineColor #000000\r\n  LineThickness 0.75\r\n  RoundCorner 0\r\n  Shadowing 0\r\n}\r\ntitle {\r\n  FontSize 14\r\n  FontStyle bold\r\n  FontColor #000000\r\n  BackGroundColor transparent\r\n  LineColor transparent\r\n  LineThickness 0\r\n}\r\nnote {\r\n  BackGroundColor #FFFFFF\r\n  LineColor #000000\r\n  FontColor #000000\r\n}\r\nclassDiagram {\r\n  class { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\r\n  arrow { LineColor #000000; LineThickness 0.75 }\r\n}\r\n</style>\r\nskinparam classAttributeIconSize 0\r\n\r\ntitle Payment System\r\n\r\nclass User {\r\n    +id: UUID\r\n    +email: String\r\n    +name: String\r\n    +register()\r\n}\r\n\r\nclass Order {\r\n    +id: UUID\r\n    +total: Decimal\r\n    +status: OrderStatus\r\n    +calculateTotal()\r\n}\r\n\r\nclass PaymentProcessor <<interface>> {\r\n    +processPayment(amount: Decimal): Boolean\r\n    +refund(transactionId: UUID): Boolean\r\n}\r\n\r\nclass NotificationService <<abstract>> {\r\n    #enabled: Boolean\r\n    +{abstract} send(to: String, body: String)\r\n}\r\n\r\nenum OrderStatus {\r\n    PENDING\r\n    CONFIRMED\r\n    SHIPPED\r\n    DELIVERED\r\n}\r\n\r\nUser \"1\" -- \"*\" Order : places\r\nOrder ..|> PaymentProcessor\r\nNotificationService <|-- EmailNotifier\r\n@enduml\r\n```\r\n\r\nKey syntax: `+` public, `-` private, `#` protected, `{abstract}` abstract method,\r\n`class Foo <<interface>>` (interface via text stereotype — NOT `interface Foo`),\r\n`class Bar <<abstract>>` (abstract class — NOT `abstract class Bar`),\r\n`enum`, relationships: `--` association, `*--` composition, `o--` aggregation,\r\n`<|--` inheritance, `..|>` realization\r\n\r\n### Activity Diagram\r\n\r\n```\r\n@startuml\r\ntitle Order Processing\r\n\r\nstart\r\n:Receive Order;\r\nif (Payment Valid?) then (yes)\r\n    :Reserve Inventory;\r\n    if (Inventory Available?) then (yes)\r\n        :Confirm Order;\r\n        :Ship Order;\r\n        stop\r\n    else (no)\r\n        :Notify Customer;\r\n        :Cancel Order;\r\n        stop\r\n    endif\r\nelse (no)\r\n    :Reject Order;\r\n    stop\r\nendif\r\n@enduml\r\n```\r\n\r\nKey syntax: `start/stop/end`, `if/then/else/endif`, `repeat/repeat while`,\r\n`fork/fork again/end fork` (parallel), `split/split again/end split`,\r\n`partition \"name\" { ... }` (swimlane), `:Text;` action\r\n\r\n### Use Case Diagram\r\n\r\n```\r\n@startuml\r\ntitle E-Commerce System\r\n\r\nleft to right direction\r\n\r\nactor Customer\r\nactor Admin\r\n\r\nrectangle \"E-Commerce\" {\r\n    usecase \"Browse Products\" as UC1\r\n    usecase \"Place Order\" as UC2\r\n    usecase \"Manage Inventory\" as UC3\r\n    usecase \"Process Returns\" as UC4\r\n}\r\n\r\nCustomer --> UC1\r\nCustomer --> UC2\r\nAdmin --> UC3\r\nAdmin --> UC4\r\nUC2 ..> UC1 : <<include>>\r\n@enduml\r\n```\r\n\r\nKey syntax: `actor`, `usecase`, `rectangle/package` for system boundary,\r\n`-->` association, `..>` dependency, `<<include>>` / `<<extend>>` stereotypes\r\n\r\n### Component Diagram\r\n\r\n```\r\n@startuml\r\ntitle Microservice Architecture\r\n\r\npackage \"Frontend\" {\r\n    [Web App]\r\n    [Mobile App]\r\n}\r\n\r\npackage \"API Gateway\" {\r\n    [Gateway]\r\n}\r\n\r\npackage \"Services\" {\r\n    [User Service]\r\n    [Order Service]\r\n    [Payment Service]\r\n}\r\n\r\ndatabase \"PostgreSQL\" as DB\r\ncloud \"Message Queue\" as MQ\r\n\r\n[Web App] --> [Gateway]\r\n[Mobile App] --> [Gateway]\r\n[Gateway] --> [User Service]\r\n[Gateway] --> [Order Service]\r\n[Order Service] --> [Payment Service]\r\n[User Service] --> DB\r\n[Order Service] --> DB\r\n[Order Service] --> MQ\r\n@enduml\r\n```\r\n\r\nKey syntax: `[Component]`, `package \"name\" { }`, `database`, `cloud`, `node`,\r\n`frame`, `interface`, `()--` required interface, `--()` provided interface\r\n\r\n### Deployment Diagram\r\n\r\n```\r\n@startuml\r\ntitle Production Deployment\r\n\r\nnode \"AWS us-east-1\" {\r\n    node \"VPC\" {\r\n        node \"Public Subnet\" {\r\n            [Load Balancer]\r\n            [Bastion Host]\r\n        }\r\n        node \"Private Subnet\" {\r\n            node \"App Server 1\" {\r\n                [Application]\r\n            }\r\n            node \"App Server 2\" {\r\n                [Application]\r\n            }\r\n            database \"RDS Primary\"\r\n        }\r\n    }\r\n    cloud \"CDN\"\r\n}\r\n@enduml\r\n```\r\n\r\nKey syntax: `node \"name\" { }`, nested `node`, `database`, `cloud`, `actor`\r\n\r\n### State Diagram\r\n\r\n```\r\n@startuml\r\ntitle Order Lifecycle\r\n\r\n[*] --> Draft\r\nDraft --> Submitted : submit()\r\nSubmitted --> Paid : processPayment()\r\nSubmitted --> Cancelled : cancel()\r\nPaid --> Shipped : ship()\r\nShipped --> Delivered : confirmDelivery()\r\nDelivered --> [*]\r\nCancelled --> [*]\r\n\r\nstate Paid {\r\n    [*] --> Authorizing\r\n    Authorizing --> Captured : success\r\n    Authorizing --> Failed : decline\r\n    Captured --> [*]\r\n}\r\n@enduml\r\n```\r\n\r\nKey syntax: `[*]` start/end, `-->` transition with optional `: label`,\r\n`state Name { }` composite state, `state \"Name\" as Alias`\r\n\r\n### Gantt Chart\r\n\r\n```\r\n@startuml\r\ntitle Project Roadmap\r\n\r\nproject starts 2025-01-06\r\n\r\n[Design] lasts 10 days\r\n[Development] lasts 20 days\r\n[Development] starts at [Design]'s end\r\n[Testing] lasts 10 days\r\n[Testing] starts at [Development]'s end\r\n[Deployment] lasts 3 days\r\n[Deployment] starts at [Testing]'s end\r\n\r\n[Frontend] lasts 12 days\r\n[Frontend] starts at [Design]'s end\r\n[Backend] lasts 15 days\r\n[Backend] starts at [Design]'s end\r\n@enduml\r\n```\r\n\r\nKey syntax: `project starts YYYY-MM-DD`, `[Task] lasts N days`,\r\n`[Task] starts at [Other]'s end`, `--` separator for dependency,\r\n`printscale weekly/monthly`, `@dailymail`, `@weeklymail`\r\n\r\n### Mind Map\r\n\r\n```\r\n@startmindmap\r\ntitle System Architecture\r\n\r\n* Root Node\r\n** Level 1 A\r\n*** Level 2 A1\r\n*** Level 2 A2\r\n** Level 1 B\r\n*** Level 2 B1\r\n**** Level 3 B1a\r\n**** Level 3 B1b\r\n** Level 1 C\r\n@endmindmap\r\n```\r\n\r\nKey syntax: `*` root, `**` level 1, `***` level 2, etc.\r\nUse `@startmindmap` / `@endmindmap` (not `@startuml`).\r\nAffix `_` to markdown-style side notation, e.g., `***_ Right side node`.\r\nColors: `<style> * { BackgroundColor lightblue } </style>`\r\n\r\n---\r\n\r\n## OMG-UML / uml-diagrams.org Style Configuration (MANDATORY)\r\n\r\nEvery generated `.puml` file MUST include this CSS-style preamble immediately after `@startuml`.\r\nIt locks PlantUML's rendering to the **uml-diagrams.org reference style** (strict OMG UML 2.x,\r\nblack-and-white Visio stencils).\r\n\r\nSince PlantUML `1.2019.9` the project officially recommends the **CSS-like `<style>` block**\r\n([plantuml.com/style-evolution](https://plantuml.com/style-evolution)) as the preferred\r\nstyling mechanism — *\"`skinparam` is being phased out … users should migrate to `style`\"*.\r\n\r\n**Do NOT mix both inside the same `.puml` file.** Pick one preamble per diagram.\r\n\r\n### Primary — CSS `<style>` Preamble (recommended)\r\n\r\n```\r\n@startuml\r\n<style>\r\nroot {\r\n  FontName Helvetica\r\n  FontSize 12\r\n  FontColor #000000\r\n  BackGroundColor #FFFFFF\r\n  LineColor #000000\r\n  LineThickness 0.75\r\n  RoundCorner 0\r\n  Shadowing 0\r\n}\r\n\r\ntitle {\r\n  FontSize 14\r\n  FontStyle bold\r\n  FontColor #000000\r\n  BackGroundColor transparent\r\n  LineColor transparent\r\n  LineThickness 0\r\n}\r\n\r\nnote {\r\n  BackGroundColor #FFFFFF\r\n  LineColor #000000\r\n  FontColor #000000\r\n}\r\n\r\nsequenceDiagram {\r\n  actor       { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\r\n  participant { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\r\n  lifeLine    { BackGroundColor #FFFFFF; LineColor #000000; LineStyle 5-5; LineThickness 0.75 }\r\n  reference   { BackGroundColor #FFFFFF; LineColor #000000 }\r\n  group       { BackGroundColor #FFFFFF; LineColor #000000 }\r\n  arrow       { LineColor #000000; LineThickness 0.75; FontColor #000000 }\r\n}\r\n\r\nclassDiagram {\r\n  class { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\r\n  arrow { LineColor #000000; LineThickness 0.75 }\r\n}\r\n\r\nactivityDiagram {\r\n  activity { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000; RoundCorner 10 }\r\n  arrow    { LineColor #000000; LineThickness 0.75 }\r\n  diamond  { BackGroundColor #FFFFFF; LineColor #000000 }\r\n}\r\n\r\nuseCaseDiagram {\r\n  actor     { BackGroundColor #FFFFFF; LineColor #000000 }\r\n  usecase   { BackGroundColor #FFFFFF; LineColor #000000 }\r\n  rectangle { BackGroundColor #FFFFFF; LineColor #000000 }\r\n}\r\n\r\ncomponentDiagram {\r\n  component { BackGroundColor #FFFFFF; LineColor #000000 }\r\n  package   { BackGroundColor #FFFFFF; LineColor #000000 }\r\n}\r\n\r\nstateDiagram {\r\n  state { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\r\n  arrow { LineColor #000000 }\r\n}\r\n</style>\r\n\r\n' ── Per-element skinparam fallback (mandatory) ─────────────────────────────\r\n' The CSS <style> block above does NOT cover every PlantUML element category.\r\n' Without the following block, some shapes fall back to PlantUML defaults\r\n' (yellow activation bars, coloured actors, grey component fills, etc.).\r\n' NEVER add `skinparam style strictuml` — it degrades actors into plain text\r\n' and use cases into rectangles.\r\nskinparam classAttributeIconSize 0\r\nskinparam shadowing false\r\nskinparam backgroundColor #FFFFFF\r\nskinparam defaultFontColor #000000\r\n\r\nskinparam actor       { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam usecase     { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam rectangle   { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam class       { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam object      { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam component   { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam interface   { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam package     { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam node        { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam database    { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam cloud       { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam state       { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam activity    { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\nskinparam sequence    { ArrowColor #000000; LifeLineBorderColor #000000; LifeLineBackgroundColor #FFFFFF; ParticipantBackgroundColor #FFFFFF; ParticipantBorderColor #000000; ActorBackgroundColor #FFFFFF; ActorBorderColor #000000; BoxBackgroundColor #FFFFFF; BoxBorderColor #000000 }\r\nskinparam note        { BackgroundColor #FFFFFF; BorderColor #000000; FontColor #000000 }\r\n```\r\n\r\n**What each CSS block does (mapped to uml-diagrams.org figures):**\r\n\r\n| CSS Block | Effect / uml-diagrams.org reference |\r\n|---|---|\r\n| `root` | Global defaults: Helvetica 12px black-on-white, 0.75pt lines, no shadows, square corners. Matches Visio UML 2.x stencil look. |\r\n| `root > Shadowing 0` | Disables drop shadows — uml-diagrams.org figures never have shadows. |\r\n| `root > RoundCorner 0` | Square corners on rectangles (matches Visio stencils). `activityDiagram.activity` overrides to `10` for round-cornered actions. |\r\n| `title` | Bold 14px black text, transparent background/border. |\r\n| `note` | White fill, black border, black text — matches uml-diagrams.org note style. |\r\n| `sequenceDiagram.lifeLine` | **Dashed black lines** (`LineStyle 5-5`) — exactly the lifeline notation on uml-diagrams.org/sequence-diagrams.html. |\r\n| `sequenceDiagram.arrow` | Thin black arrows (0.75pt) — matches Visio stencil hair-line strokes. |\r\n| `classDiagram.class` | White fill, black border — no grey fills. |\r\n| `activityDiagram.activity` | White fill with **round corners** (`RoundCorner 10`) — matches uml-diagrams.org activity shape. |\r\n| `activityDiagram.diamond` | White fill, black border for decision/merge diamonds. |\r\n| `useCaseDiagram` | White actors, use cases, and rectangles — no colored fills. |\r\n| `componentDiagram` | White components and packages — no colored fills. |\r\n| `stateDiagram.state` | White fill, black border — no grey fills. |\r\n\r\n**STYLING POLICY — keep the FULL preamble, NEVER use `strictuml`**\r\n\r\nThe CSS `<style>` block above tells PlantUML how to render **CSS-aware** elements\r\n(sequence lifelines, class boxes, activity nodes, notes). It does **NOT** cover\r\nevery PlantUML element category — actor stick-figures, use case ellipses,\r\ncomponent silhouettes, database cylinders and cloud shapes still fall back to\r\nPlantUML's built-in defaults (colored fills, yellow activation bars, missing\r\nborders on white canvas) when only a `<style>` block is present.\r\n\r\nThe **per-element `skinparam` block** immediately after `</style>` is therefore\r\nmandatory — treat CSS and skinparam as **complementary layers**, not\r\nalternatives. Together they guarantee black borders + white fills for actor /\r\nusecase / rectangle / class / component / interface / package / node / database\r\n/ cloud / state / activity / sequence / note across every diagram type and both\r\nlight and dark backgrounds.\r\n\r\nThe **only** allowed `skinparam ... style` value is the default — do NOT add\r\n`skinparam style strictuml`. Even though `strictuml` sounds like a \"make it\r\nmore UML-compliant\" flag, in practice it:\r\n\r\n- collapses `actor Foo` from a stick figure into a plain text label\r\n- collapses `usecase \"X\" as UC` from an ellipse into a plain rectangle\r\n- removes the class-header separator line so name/attribute/method sections merge\r\n\r\nThe render script also **defensively strips** any leftover\r\n`skinparam style strictuml` line before dispatching to the backend, so\r\naccidental re-introductions from user edits or LLM output are neutralized at\r\nthe pipeline level.\r\n\r\n`skinparam classAttributeIconSize 0` is retained separately because it only\r\nremoves the colored visibility dots (●/◐/○) and has no side effects on shapes.\r\n\r\n### Common Failure Patterns\r\n\r\nSymptoms and their root cause — check this list first if a rendered diagram\r\nlooks visually wrong:\r\n\r\n| Symptom | Root cause | Fix |\r\n|---|---|---|\r\n| Actor rendered as bare text, no stick figure | `skinparam style strictuml` in the source | Remove the line; rely on the per-element skinparam fallback (the render script also auto-strips it). |\r\n| Use case rendered as a plain rectangle instead of an ellipse | Same as above (`strictuml`) | Same as above. |\r\n| Class header separator line missing / name+attributes merged | Same as above (`strictuml`) | Same as above. |\r\n| Ellipses / actor paths lose their black border on light background | CSS `<style>` alone is used; the per-element `skinparam actor/usecase` block is missing | Restore the full preamble including the per-element skinparam fallback block. |\r\n| Sequence activation bar rendered yellow instead of white | Missing `skinparam sequence { ActorBackgroundColor #FFFFFF ... }` | Restore the full preamble. |\r\n| Class attributes show `●` / `◐` / `○` visibility icons | Missing `skinparam classAttributeIconSize 0` | Add the line. |\r\n| Header header sub-elements show `Ⓒ`/`Ⓘ`/`Ⓐ`/`Ⓔ` circle icons | Diagram used `interface Foo` / `abstract class Foo` / `enum Foo` keywords | Rewrite as `class Foo <<interface>>` / `class Foo <<abstract>>` / `class Foo <<enumeration>>`. |\r\n| Any decorative color / gradient / drop shadow appears | A `!theme` directive or extra `skinparam ...Color` overrides sneaked in | Remove them; the mandatory preamble is the single source of styling truth. |\r\n\r\n### Backup - `skinparam` Preamble (backward-compatible)\r\n\r\nUse this preamble only when you need maximum backward compatibility with PlantUML < 1.2019.9.\r\nBoth preambles produce the **same uml-diagrams.org reference look**.\r\n\r\n```\r\n' uml-diagrams.org reference style — strict OMG UML 2.x, monochrome\r\nskinparam monochrome true\r\nskinparam backgroundColor #FFFFFF\r\nskinparam defaultFontName Helvetica\r\nskinparam defaultFontSize 12\r\nskinparam shadowing false\r\nskinparam classAttributeIconSize 0\r\nskinparam sequenceMessageAlign center\r\nskinparam roundCorner 0\r\n\r\n' Force every fill to white so monochrome never falls back to grey\r\nskinparam ActorBackgroundColor #FFFFFF\r\nskinparam ParticipantBackgroundColor #FFFFFF\r\nskinparam NoteBackgroundColor #FFFFFF\r\nskinparam SequenceGroupBackgroundColor #FFFFFF\r\nskinparam PackageBackgroundColor #FFFFFF\r\nskinparam ClassBackgroundColor #FFFFFF\r\nskinparam ObjectBackgroundColor #FFFFFF\r\nskinparam StateBackgroundColor #FFFFFF\r\nskinparam UsecaseBackgroundColor #FFFFFF\r\nskinparam ComponentBackgroundColor #FFFFFF\r\nskinparam ActivityBackgroundColor #FFFFFF\r\nskinparam NodeBackgroundColor #FFFFFF\r\nskinparam DatabaseBackgroundColor #FFFFFF\r\nskinparam StereotypeCBackgroundColor #FFFFFF\r\nskinparam StereotypeIBackgroundColor #FFFFFF\r\nskinparam StereotypeABackgroundColor #FFFFFF\r\nskinparam StereotypeEBackgroundColor #FFFFFF\r\n\r\n' Sequence diagrams — match the lifeline / activation look on uml-diagrams.org:\r\n'   * lifeline = dashed black vertical line\r\n'   * activation bar = thin WHITE rectangle with black border (NOT yellow)\r\nskinparam SequenceLifeLineBorderColor #000000\r\nskinparam SequenceLifeLineBackgroundColor #FFFFFF\r\nskinparam SequenceLifeLineBorderThickness 0.75\r\nskinparam SequenceActivationBackgroundColor #FFFFFF\r\nskinparam SequenceActivationBorderColor #000000\r\nskinparam SequenceArrowColor #000000\r\nskinparam SequenceArrowThickness 0.75\r\nskinparam SequenceBoxBackgroundColor #FFFFFF\r\n\r\n' Default arrow / border colour everywhere\r\nskinparam ArrowColor #000000\r\nskinparam ArrowThickness 0.75\r\nskinparam DefaultTextColor #000000\r\n```\r\n\r\n**NEVER** apply colored themes (`!theme blueprint`, `!theme cerulean`, etc.), custom colors,\r\ngradients, shadows, or decorative styling — doing so breaks compliance with the\r\numl-diagrams.org reference style. If a user explicitly and unambiguously requests colour,\r\nadd it on top of this preamble rather than removing the preamble.\r\n\r\n### CJK (Chinese/Japanese/Korean) Font Support\r\n\r\nWhen diagrams contain CJK characters, `Helvetica` cannot render them — characters will appear as empty boxes (□) or tofu (▯).\r\n\r\n**In `.puml` files**: Replace `FontName Helvetica` in the CSS `<style>` block with a CJK-compatible font:\r\n```css\r\nroot {\r\n  FontName \"WenQuanYi Micro Hei\"\r\n}\r\n```\r\n\r\nFor the `skinparam` preamble (backward-compatible):\r\n```\r\nskinparam defaultFontName \"WenQuanYi Micro Hei\"\r\n```\r\n\r\n**When rendering**: Use the `--cjk` flag, which automatically applies the font substitution and configures Docker font mounting if needed:\r\n```bash\r\nbash generate-plantuml.sh diagram.puml ./output --cjk\r\n```\r\n\r\n**Host prerequisites** for CJK rendering:\r\n- **Docker method**: CJK fonts must exist on the host at `/usr/share/fonts` (or `/usr/local/share/fonts`, `/System/Library/Fonts`). The script mounts these into the container.\r\n- **Local JAR method**: CJK fonts must be installed system-wide (Java uses system fontconfig).\r\n- **Public server method**: The server handles font rendering automatically.\r\n\r\nCommon CJK font packages:\r\n| OS | Package |\r\n|---|---|\r\n| Debian/Ubuntu | `fonts-wqy-zenhei` |\r\n| Fedora/RHEL | `wqy-zenhei-fonts` |\r\n| Arch | `wqy-zenhei` |\r\n| Alpine | `font-wqy-zenhei` |\r\n| macOS | Built-in (PingFang SC / Hiragino Sans) |\r\n\r\n---\r\n\r\n## Error Recovery\r\n\r\nIf the PlantUML server returns an error:\r\n1. Check for syntax errors in the `.puml` file\r\n2. Validate that `@startuml` / `@enduml` are properly paired\r\n3. Ensure diagram-type-specific syntax is correct (e.g., `@startmindmap` for mind maps)\r\n4. Try the Docker fallback: `docker pull plantuml/plantuml:latest && bash generate-plantuml.sh ...`\r\n5. If all else fails, offer to install Java + plantuml.jar\r\n\r\nIf CJK characters render as empty boxes (□):\r\n1. Ensure the `--cjk` flag was passed when rendering\r\n2. Verify CJK fonts are installed on the host: `fc-list :lang=zh`\r\n3. If using Docker, check that font directories are mounted (the script handles this automatically with `--cjk`)\r\n\r\nIf aspect ratio warnings appear:\r\n1. The script applies up to 3 automatic corrections (direction toggle + scale)\r\n2. If warnings persist, manually adjust the `.puml`:\r\n   - For too-wide diagrams: add `top to bottom direction` and reduce `skinparam BoxPadding`\r\n   - For too-tall diagrams: add `left to right direction` and reduce `skinparam ParticipantPadding`\r\n   - Try `scale 0.75` or `scale 0.5` for extreme cases\r\n3. For sequence diagrams with many participants: consider splitting into multiple diagrams or abbreviating participant names\r\n\r\nIf A4 fit warnings appear (the script prints `📄 A4 fit: ... exceeds A4 ...`):\r\n1. The script has already re-rendered once with a `scale N` directive computed from the smaller required factor. Check the loop output for \"A4 fit ✓\" on the second render — if present, the diagram now fits within A4.\r\n2. If \"Estimated font ≈ Npt on A4\" message shows a value BELOW your `--min-font-pt` threshold (default 8 pt), further down-scaling will not make the diagram readable on print. To fix manually:\r\n   - Split the diagram at a natural boundary (per use case, per subsystem, per actor).\r\n   - Shorten long labels — e.g. replace `client_id, redirect_uri` with shortened param names.\r\n   - For sequence diagrams with many participants: group messages into sub-diagrams, or abbreviate participant display names.\r\n3. If you do not need A4 conformance for the current output, re-run with `--no-a4-check` (`-NoA4Check`) to keep the larger original.\r\n4. To let the diagram stretch across multiple A4 sheets, set `--min-font-pt 6` (or lower) and accept reduced legibility — the script will warn but still emit the smaller-than-A4 final image.\r\n\r\n---\r\n\r\n## Output Expectations\r\n\r\nAfter successful generation:\r\n1. Show the generated PlantUML source (collapsed if long)\r\n2. Show the rendered output (SVG inline if possible)\r\n3. Report the saved file paths for both `.puml` and the rendered image\r\n4. Note any aspect ratio corrections that were applied (with dimensions before/after)\r\n5. Note whether A4 fit was met natively, applied a re-scale (report the `scale N` factor and the post-fix dimensions), or skipped due to legibility threshold; if the legibility warning fired, surface it and propose splitting the diagram\r\n6. Offer to make adjustments\n\nFile v1.7.1:_meta.json\n\n{\n  \"ownerId\": \"kn77wr1nhm7a4w5nw4kev80d49881www\",\n  \"slug\": \"plantuml-skill\",\n  \"version\": \"1.7.1\",\n  \"publishedAt\": 1783568230011\n}\n\nFile v1.7.1:skill-card.md\n\n## Description: <br>\nTurn natural language into uml-diagrams.org style PlantUML diagrams and render them to SVG, PNG, PDF, or text output. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[samonysh](https://clawhub.ai/user/samonysh) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers, architects, and technical writers use this skill to turn text descriptions of systems, workflows, and relationships into PlantUML source and rendered diagram artifacts. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Opt-in public rendering can upload diagram source to a remote Kroki host, which may expose confidential architecture, credentials, customer data, or proprietary logic. <br>\nMitigation: Use the default local Docker or plantuml.jar rendering for sensitive diagrams; only enable the public-server option when the resolved Kroki host is trusted and the diagram content is appropriate to share. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Plantuml skill page](https://clawhub.ai/samonysh/skills/plantuml-skill) <br>\n- [uml-diagrams.org UML reference style](https://www.uml-diagrams.org) <br>\n- [Kroki rendering service](https://kroki.io) <br>\n- [PlantUML style evolution](https://plantuml.com/style-evolution) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with PlantUML code blocks, shell commands, and generated diagram files] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Requires one of Docker, Java with plantuml.jar, or curl for the explicit public-server path; default rendering is local-first.] <br>\n\n## Skill Version(s): <br>\n1.7.1 (source: release evidence and frontmatter) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.7.0: 6 files, 49864 bytes\n\nFiles: scripts/generate-plantuml.ps1 (44034b), scripts/generate-plantuml.sh (48749b), scripts/gp-orig-test.ps1 (44034b), skill-card.md (2307b), SKILL.md (39704b), _meta.json (133b)\n\nFile v1.7.0:SKILL.md\n\n---\nname: plantuml\ndescription: Turn natural language into uml-diagrams.org style PlantUML diagrams (sequence, class, activity, use case, component, state…) and render to SVG/PNG/PDF. Use when the user asks to draw a UML diagram.\nversion: 1.7.0\nemoji: \"📐\"\nhomepage: https://github.com/samonysh/plantuml-skill\nmetadata:\n  openclaw:\n    # The render script is local-first: it tries Docker, then a local plantuml.jar.\n    # The Kroki public server is OPT-IN ONLY (--use-public-server / -UsePublicServer)\n    # because it uploads diagram source to a third-party service (kroki.io by default,\n    # overridable to a self-hosted Kroki via PLANTUML_PUBLIC_SERVER).\n    requires:\n      anyBins:\n        - docker\n        - java\n        - curl\n    # This skill reads no environment variables and writes no secrets; nothing to\n    # declare under primaryEnv / envVars / requires.env.\n---\n\n# PlantUML Diagram Generator\n\nGenerate professional PlantUML diagrams from natural language descriptions. This skill handles\nthe full pipeline: requirement analysis → PlantUML code generation → image rendering.\n\n## Trigger Phrases\n\nUse this skill when the user asks to:\n- \"Generate/draw/create a PlantUML diagram for...\"\n- \"Create a sequence/class/activity/... diagram showing...\"\n- \"Visualize this flow/architecture/process as...\"\n- \"Turn this description into a UML diagram\"\n- \"Make a flowchart / ERD / Gantt chart from...\"\n- Any request involving diagram generation from text descriptions\n\n## Mandatory Style Requirements\n\nALL diagrams generated by this skill MUST adhere to the **uml-diagrams.org reference style** —\nstrict OMG UML 2.x rendered with Visio UML 2.x stencils (black-and-white, no decoration).\nThis is the canonical style used throughout https://www.uml-diagrams.org and serves as the\nauthoritative visual reference for every diagram this skill produces.\nNo exceptions unless the user explicitly requests otherwise.\n\n- **Black and white only**: Pure black lines (`#000000`) on a pure white background (`#FFFFFF`). No colors, no grayscale fills, no gradients, no themed accents.\n- **Thin uniform line weight**: All borders, arrows and connectors use the default hair-line stroke (≈0.75pt). Never thicken or stylize lines.\n- **No circle visibility icons**: Class attributes MUST NOT show colored circle icons (● public / ◐ protected / ○ private). Enforced via `skinparam classAttributeIconSize 0`. Use `+ - # ~` text markers only.\n- **No circle stereotype icons**: Class and interface headers MUST NOT show circle-with-letter icons (Ⓒ / Ⓘ / Ⓐ / Ⓔ). `skinparam style strictuml` enforces text stereotypes (`«interface»`, `«abstract»`, `«enumeration»`). Always declare interfaces/abstract classes via `class <<interface>>` or `class <<abstract>>` — never use the `interface` or `abstract class` keywords.\n- **Abstract classifiers in italics**: Per UML 2.5 §9 and uml-diagrams.org \"Name of an abstract classifier is shown in italics\" — using the `<<abstract>>` text stereotype with `strictuml` produces the correct italic rendering automatically.\n- **No 3D effects**: Drop shadows MUST be disabled (`skinparam shadowing false`).\n- **Clean typography**: Sans-serif font (Helvetica, equivalent to the Arial used by Visio stencils on uml-diagrams.org), 12pt default. No colored or bold text except diagram titles. When CJK characters are present, use `--cjk` flag to switch to a CJK-compatible font (see [CJK Font Support](#cjk-chinesejapanesekorean-font-support)).\n- **Aspect ratio**: Generated diagrams are automatically validated for an aspect-ratio band. By default the renderer tries to keep width/height between **0.7 and 1.4** (a comfortable page-like shape), re-rendering with layout corrections when the output falls outside that band. Diagrams that cannot be fixed safely after a few attempts are kept with a warning, so unusual diagrams are not destroyed. Use `--no-fix` to disable this behavior (see Step 3).\n- **A4 paper fit**: After aspect-ratio validation passes, the diagram is checked against A4 paper (210×297 mm). At the **96 DPI CSS standard**, this works out to **794×1123 px portrait** and **1123×794 px landscape**. The renderer accepts the diagram if it fits in EITHER orientation; otherwise it injects a computed PlantUML `scale N` directive and re-renders up to once. The default body font of 12 px (from the mandatory preamble) shrinks proportionally; if the estimated on-paper font drops below `--min-font-pt` (default **8 pt**), the script prints a legibility warning — at that point no further down-scaling helps and the user must split the diagram or abbreviate labels. A4 fit is **ON by default**; disable with `--no-a4-check` (`-NoA4Check` on PowerShell).\n- **Standard UML shapes**:\n  - Actors are **stick figures** (never Visio icons or images).\n  - Classes / components / nodes are plain rectangles; activities are round-cornered rectangles with the activity name in the upper-left.\n  - Dependencies and realizations use **dashed** lines; lifelines use **dashed** vertical lines (uml-diagrams.org explicitly: *\"a rectangle forming its head followed by a vertical line (which may be dashed) that represents the lifetime of the participant\"*).\n  - Notes are white folded-corner rectangles; no shading.\n- **Sequence diagram specifics** (matching uml-diagrams.org figures exactly):\n  - **Lifeline** head is a **white rectangle**; the vertical lifeline is a **dashed** black line.\n  - **Execution specification / activation bar** is a *\"thin grey or white rectangle on the lifeline\"* — this skill renders it as a thin **white** rectangle with a black border (no yellow PlantUML default).\n  - **Destruction occurrence** is shown as an `X` at the bottom of the lifeline (PlantUML `<participant> !` syntax).\n  - Synchronous messages use a **filled solid triangle arrowhead** on a solid line.\n  - Asynchronous messages use an **open stick arrowhead** on a solid line.\n  - Reply / return messages use an **open stick arrowhead** on a **dashed** line.\n- **Activity diagram specifics**: round-cornered action rectangles, solid arrows with **open arrowheads** for control flow, diamond decisions/merges, thick horizontal/vertical bar for forks/joins, filled black dot for initial node, bull's-eye for activity final.\n- **Use case diagram specifics**: stick-figure actor on the left, ellipses for use cases inside a rectangle **subject boundary**, `«include»` / `«extend»` as dashed open arrows.\n- **Class diagram specifics**: associations are plain solid lines, aggregation = hollow diamond, composition = filled diamond, generalization = hollow triangle arrowhead on solid line, realization = hollow triangle arrowhead on dashed line, dependency = open arrow on dashed line.\n\nEvery `.puml` file MUST include the mandatory uml-diagrams.org-style preamble as its first lines after `@startuml` (see [Style Configuration](#omg-uml-style-configuration-mandatory)).\n\n---\n\n## Workflow\n\n### Step 1: Parse and Confirm Requirements\n\nExtract from the user's description:\n- **Diagram type** — which PlantUML diagram fits best\n- **Actors/participants** — who/what is involved\n- **Relationships/flows** — how they interact\n- **Constraints/rules** — conditions, ordering, cardinality\n- **Output format** — svg (default), png, pdf, or txt (ASCII art)\n\nIf the diagram type is not explicitly stated, infer it from the description:\n\n| Description signals | Recommended diagram |\n|---|---|\n| \"A sends X to B\", \"request/response\", \"handshake\" | Sequence |\n| \"inherits from\", \"has many\", \"belongs to\", entities & fields | Class |\n| \"if/then\", \"approve/reject\", workflow, pipeline | Activity |\n| \"user can\", \"admin manages\", roles & permissions | Use Case |\n| \"depends on\", \"connects to\", services & interfaces | Component |\n| \"deployed on\", \"hosted on\", nodes & servers | Deployment |\n| \"transitions from\", \"changes state\", lifecycle | State |\n| timeline, milestones, phases, schedule | Gantt |\n| hierarchy, brainstorming, tree structure | Mind Map |\n\n**If ambiguous, ask the user to clarify the diagram type before proceeding.**\n\n### Step 2: Generate PlantUML Code\n\nWrite the PlantUML source following these rules:\n\n1. Start EVERY file with one of the two mandatory uml-diagrams.org-style preambles\n   immediately after `@startuml`:\n   - **Default**: the `skinparam` preamble — see [OMG-UML / uml-diagrams.org Style Configuration](#omg-uml--uml-diagramsorg-style-configuration-mandatory).\n      Maximum backward compatibility, used by every example except #07.\n      (Example #07 is a legacy alias of #01_css — same OAuth2 sequence diagram, same CSS preamble.)\n   - **Backup option**: the CSS-style `<style>` preamble — see [Alternative — CSS-style Preamble](#alternative--css-style-preamble-modern-backup-option).\n     Recommended on PlantUML ≥ 1.2019.9 where `skinparam` is being phased out.\n   Pick ONE per file — never mix both inside the same `.puml`.\n2. Use `@startuml` / `@enduml` delimiters\n3. Include a descriptive `title`\n4. Use proper PlantUML syntax for the chosen diagram type (see Reference below)\n5. Keep the diagram focused — don't add unnecessary elements\n6. NEVER add color, themed backgrounds, or decorative styling — strict black and white\n\nSave the PlantUML source to a `.puml` file in the working directory.\n\n### Step 3: Render to Image\n\nUse the bundled conversion script. Pick the variant that matches the current OS / shell:\n\n**Linux, macOS, or Windows with a POSIX shell (Git Bash, MSYS2, WSL, Cygwin):**\n\n```bash\nbash skills/plantuml/scripts/generate-plantuml.sh <input.puml> <output_dir> --format <svg|png|pdf|txt>\n```\n\n**Windows native PowerShell (no bash required):**\n\n```powershell\npowershell -ExecutionPolicy Bypass -File skills\\plantuml\\scripts\\generate-plantuml.ps1 <input.puml> <output_dir> -Format <svg|png|pdf|txt>\n```\n\nBoth scripts accept the same arguments and try three backends in **strict priority\norder — local-first**. Docker and the local JAR are tried first; the Kroki\npublic server is **OPT-IN ONLY** because it uploads your diagram source to a\nthird-party service (kroki.io by default):\n\n1. **Docker** (`plantuml/plantuml:latest`) — preferred default, fully local\n2. **Local `plantuml.jar`** (requires Java) — offline fallback\n3. **Kroki public server** (https://kroki.io by default) — **OPT-IN**\n   via `--use-public-server` (Bash) or `-UsePublicServer` (PowerShell).\n   Override the host with `PLANTUML_PUBLIC_SERVER=<url>` (Bash) or\n   `$env:PLANTUML_PUBLIC_SERVER='<url>'` (PowerShell) to point at a\n   self-hosted Kroki instance.\n\n> ⚠ **Privacy notice** — passing `--use-public-server` / `-UsePublicServer`\n> POSTs the entire `.puml` source to `kroki.io` (or your override host).\n> **Never** enable this flag for diagrams containing confidential architecture,\n> credentials, customer data, or proprietary business logic. When in doubt,\n> stay with the default (Docker / local JAR). See the\n> [Privacy & Backend Selection](#privacy--backend-selection) section below\n> for the full data-flow contract.\n\n**CJK font support**: When the `.puml` contains Chinese, Japanese, or Korean characters, add the `--cjk` flag:\n\n```bash\nbash generate-plantuml.sh diagram.puml ./output --format svg --cjk\n```\n\nThe `--cjk` flag:\n- Replaces `Helvetica` with `WenQuanYi Micro Hei` (a CJK-compatible font)\n- For Docker: mounts host font directories (`/usr/share/fonts`, `/usr/local/share/fonts`) into the container and refreshes the font cache before rendering\n- For local JAR: uses system-installed CJK fonts\n- If CJK fonts are not installed on the system, characters will not render correctly. Install them via:\n  - Debian/Ubuntu: `sudo apt install fonts-wqy-zenhei`\n  - Fedora: `sudo dnf install wqy-zenhei-fonts`\n  - macOS: CJK fonts are pre-installed (PingFang SC)\n\n**Aspect ratio validation**: After rendering (SVG or PNG), the script measures width/height and checks whether it sits inside the configured band. The default band is **0.7–1.4** (width/height), i.e. diagrams should be neither extremely tall nor extremely wide. If the output falls outside the band, the script injects layout corrections and re-renders:\n\n- **Too tall** (width/height < `--min-aspect`): applies `left to right direction` and adds spacing guards so labels do not crowd.\n- **Too wide** (width/height > `--max-aspect`): applies `top to bottom direction` and adds spacing guards.\n- Sequence, activity, and state diagrams skip the direction directive because it is either unsupported or counter-productive for those diagram types; only spacing guards are applied.\n- Up to 3 correction attempts are made. If a diagram still cannot be brought into the band (for example a very narrow use-case or state machine), the script keeps the best output and prints a warning rather than forcing an unusable layout.\n\nSpacing guards added during auto-fix include `Padding`, `BoxPadding`, `ParticipantPadding`, `MinClassWidth`, `WrapWidth`, `NodeSep`, and `RankSep`. These prevent text from becoming cramped when the layout is re-directed.\n\nTo disable automatic correction:\n```bash\nbash generate-plantuml.sh diagram.puml ./output --no-fix\n```\n\nTo set a custom band:\n```bash\nbash generate-plantuml.sh diagram.puml ./output --min-aspect 0.6 --max-aspect 1.5\n```\n\n**Dark mode (opt-in)**: The default output follows the strict uml-diagrams.org black-and-white style. When the user explicitly asks for a dark variant, add `--dark-mode` (Bash) or `-DarkMode` (PowerShell). This emits **both** the regular light output and a dark companion named `<basename>.dark.<fmt>`:\n\n```bash\nbash generate-plantuml.sh diagram.puml ./output --format svg --dark-mode\n```\n\nBehaviour:\n- Light output is rendered normally with the monochrome preamble.\n- The dark companion is produced by injecting a CSS `@media (prefers-color-scheme: dark)` block into the SVG, which automatically adapts to the user's system theme.\n- SVG is fully supported. PNG is supported when ImageMagick `convert` is available. PDF/TXT dark companions are not generated because there is no reliable local post-processor.\n- The dark palette uses `#1e1e2e` canvas, `#c9d1d9` text/strokes, `#f0f6fc` bold text, and `#6e7681` lifelines.\n- Bare-stroke injection: PlantUML's CSS mode may render some elements (use case ellipses, component rects, actor paths) with `fill=\"none\"` and no `stroke` attribute. The script injects CSS rules to add strokes to these elements in both light (`#000000`) and dark (`#c9d1d9`) variants.\n- **`skinparam style strictuml` is essential** for use case and component diagrams — it has no CSS equivalent. Removing it causes missing borders on ellipses, rects, and actor paths.\n\n**A4 paper fit validation**: After the aspect-ratio check passes, the render script validates the diagram's pixel dimensions against A4 paper. PlantUML writes SVG in CSS pixels at the 96 DPI standard, so A4 (210×297 mm = 8.27×11.69 in) maps to **794×1123 px portrait** or **1123×794 px landscape**. The check is **ON by default** and runs right after the aspect check.\n\nBehaviour:\n- If the rendered image already fits within EITHER A4 box — nothing changes, the diagram is reported as A4-ready.\n- If the image exceeds both boxes, the script computes the smallest scale factor that lets it fit either orientation, clamps to `≤1.0` and a hard floor of `0.15`, injects a `scale N` directive into a working copy of the `.puml`, then re-renders once.\n- After re-rendering the script estimates the effective on-paper font size: `scale × 12 px × 0.75 ≈ pt` (the 0.75 factor converts px to pt at 96 DPI). If this is below `--min-font-pt` it prints a legibility warning — at that point further down-scaling cannot help; the user must split the diagram, shorten labels, or switch to a smaller font.\n\nFlags:\n\n| Flag (Bash) | Flag (PowerShell) | Purpose | Default |\n|---|---|---|---|\n| `--no-fix` | `-NoFix` | Disable automatic aspect-ratio correction | off (correction ON) |\n| `--min-aspect N` | `-MinAspect N` | Lower bound of acceptable width/height band | `0.7` |\n| `--max-aspect N` | `-MaxAspect N` | Upper bound of acceptable width/height band | `1.4` |\n| `--no-a4-check` | `-NoA4Check` | Disable A4 fit validation entirely | off (check ON) |\n| `--min-font-pt N` | `-MinFontPt N` | Minimum legible on-paper font size in pt | `8.0` |\n| `--dark-mode` | `-DarkMode` | Also emit a dark companion (`<basename>.dark.<fmt>`) with CSS `@media` theme | off |\n\nExamples:\n```bash\n# Disable A4 fit\nbash generate-plantuml.sh diagram.puml ./output --no-a4-check\n\n# Tighten legibility threshold (warn if effective font drops below 10 pt)\nbash generate-plantuml.sh diagram.puml ./output --min-font-pt 10\n\n# Allow narrower diagrams and also emit a dark SVG companion\nbash generate-plantuml.sh diagram.puml ./output --format svg --min-aspect 0.5 --dark-mode\n```\n\n```powershell\n# PowerShell equivalents\npowershell -ExecutionPolicy Bypass -File generate-plantuml.ps1 diagram.puml .\\out -NoA4Check\npowershell -ExecutionPolicy Bypass -File generate-plantuml.ps1 diagram.puml .\\out -MinFontPt 10\npowershell -ExecutionPolicy Bypass -File generate-plantuml.ps1 diagram.puml .\\out -Format svg -MinAspect 0.5 -DarkMode\n```\n\nA4 fit is skipped automatically for `txt` and `pdf` output (TXT has no image dimensions; PDF is already a print-oriented format the PlantUML renderer pages itself). The check shares the same 3-attempt auto-fix budget as aspect-ratio correction — running both does not double the cap.\n\n**After rendering, show the user the output.** If SVG is generated, read and display it inline.\nIf PNG/PDF is generated, tell the user where the file is saved.\n\n---\n\n## Privacy & Backend Selection\n\nThis skill is **local-first**. By default, all rendering happens on the user's\nown machine — diagram source code never leaves the host.\n\n### Default behaviour (no flags)\n\n```\n.puml ──► Docker (plantuml/plantuml)  ──► output.svg     [LOCAL, preferred]\n   └────► local plantuml.jar (Java)   ──► output.svg     [LOCAL, fallback]\n```\n\nNo network calls are made; nothing is uploaded.\n\n### Opt-in remote rendering\n\nThe Kroki public server (https://kroki.io) can render diagrams without any\nlocal installation, but doing so **POSTs the full `.puml` source to a third\nparty**. To use it you must explicitly opt in:\n\n```bash\n# Bash — explicit opt-in required\nbash generate-plantuml.sh diagram.puml ./output --use-public-server\n```\n\n```powershell\n# PowerShell — explicit opt-in required\npowershell -ExecutionPolicy Bypass -File generate-plantuml.ps1 diagram.puml .\\output -UsePublicServer\n```\n\nWhen opt-in is active, the script:\n\n1. Prints a runtime privacy warning identifying the destination URL and operator\n2. POSTs the full `.puml` contents to `kroki.io` (or your override host)\n3. Saves the returned SVG/PNG/PDF/TXT locally\n\n### Self-hosted Kroki override\n\nKroki is open source and self-hostable\n([github.com/yuzutech/kroki](https://github.com/yuzutech/kroki)). To route\nopt-in traffic to your own instance instead of the public `kroki.io`, set the\n`PLANTUML_PUBLIC_SERVER` env var to your base URL:\n\n```bash\n# Bash\nPLANTUML_PUBLIC_SERVER=https://kroki.internal.example.com \\\n  bash generate-plantuml.sh diagram.puml ./output --use-public-server\n```\n\n```powershell\n# PowerShell\n$env:PLANTUML_PUBLIC_SERVER = 'https://kroki.internal.example.com'\npowershell -ExecutionPolicy Bypass -File generate-plantuml.ps1 diagram.puml .\\output -UsePublicServer\n```\n\nThe runtime privacy warning surfaces the resolved host name so you can confirm\nthe traffic destination before any data leaves the machine. Custom hosts must\nexpose the standard Kroki endpoint shape `<base>/plantuml/<format>`.\n\n### Why Kroki replaced the legacy plantuml.com backend (v1.4.1)\n\nEarlier versions of this script POSTed to\n`https://www.plantuml.com/plantuml/<format>`. That endpoint now sits behind a\nCloudflare + Ezoic consent wall: a POST returns `302` redirecting to a\nJavaScript-only HTML consent page, making non-browser automation impossible.\nKroki replaces it because:\n\n- It re-runs the official upstream PlantUML JAR server-side, so the output is\n  byte-for-byte the same family of SVG/PNG/PDF/TXT.\n- It is open source and trivially self-hostable in Docker, restoring the\n  \"render off-host but in your trust boundary\" option that the plantuml.com\n  default once provided.\n- The Yuzu Tech operated public instance is EU-hosted, which moves the\n  default jurisdiction closer to GDPR-style baseline expectations than the\n  prior US-CDN-fronted plantuml.com path.\n\n### When NOT to use `--use-public-server`\n\nNever enable remote rendering for diagrams that contain any of the following:\n\n- Internal system / service / hostname identifiers\n- Credentials, tokens, API keys, connection strings (even as placeholders)\n- Customer data, PII, or any regulated content\n- Proprietary architecture, design IP, or trade-secret business logic\n- Source code excerpts or unreleased features\n\nIf you are unsure whether the diagram is safe to upload, **don't opt in** —\ninstall Docker (one command: `docker pull plantuml/plantuml:latest`) or\ndownload `plantuml.jar` and render locally.\n\n### CJK Docker mode and host font directories\n\nWhen `--cjk` / `-Cjk` is combined with the Docker backend, the script mounts\nhost font directories **read-only** into the container so PlantUML can\ndiscover system-installed CJK fonts. The mounts are:\n\n- Linux/macOS: `/usr/share/fonts`, `/usr/local/share/fonts`, `/System/Library/Fonts`\n- Windows (Git Bash/WSL): `/c/Windows/Fonts` or `/mnt/c/Windows/Fonts`\n- Windows (PowerShell): `%WINDIR%\\Fonts`\n\nThese mounts are read-only (`:ro`), are scoped to font directories only, and\nare used only inside the throwaway PlantUML container. No font data is\nwritten back to the host. If you do not need CJK rendering, omit the flag\nand no host directories are mounted.\n\n---\n\n### Step 4: Iterate on Feedback\n\nIf the user requests changes:\n1. Modify the `.puml` file\n2. Re-run the conversion script\n3. Show the updated result\n\n---\n\n## PlantUML Syntax Reference\n\n> **Note**: All examples below omit the mandatory monochrome preamble for brevity.\n> In actual generated code, EVERY file MUST include the [OMG-UML style preamble](#omg-uml-style-configuration-mandatory) immediately after `@startuml`.\n> The class diagram example shows the full preamble inline as a reference.\n\n### Sequence Diagram\n\n```\n@startuml\ntitle Authentication Flow\n\nactor User\nparticipant \"Web App\" as App\nparticipant \"Auth Service\" as Auth\ndatabase \"User DB\" as DB\n\nUser -> App: Login (email, password)\nApp -> Auth: POST /auth/login\nAuth -> DB: SELECT user WHERE email\nDB --> Auth: user record\nAuth -> Auth: Verify password hash\nalt Success\n    Auth --> App: JWT token\n    App --> User: Dashboard\nelse Failure\n    Auth --> App: 401 Unauthorized\n    App --> User: Error message\nend\n@enduml\n```\n\nKey syntax: `->` sync message, `-->` async/return, `->>` async, `alt/else/end` branching,\n`loop/end` loops, `opt/end` optional, `activate/deactivate` lifeline, `note left/right`\n\n### Class Diagram\n\n```\n@startuml\n' OMG-UML Monochrome Style — CSS variant\n<style>\nroot {\n  FontName Helvetica\n  FontSize 12\n  FontColor #000000\n  BackGroundColor #FFFFFF\n  LineColor #000000\n  LineThickness 0.75\n  RoundCorner 0\n  Shadowing 0\n}\ntitle {\n  FontSize 14\n  FontStyle bold\n  FontColor #000000\n  BackGroundColor transparent\n  LineColor transparent\n  LineThickness 0\n}\nnote {\n  BackGroundColor #FFFFFF\n  LineColor #000000\n  FontColor #000000\n}\nclassDiagram {\n  class { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\n  arrow { LineColor #000000; LineThickness 0.75 }\n}\n</style>\nskinparam style strictuml\nskinparam classAttributeIconSize 0\n\ntitle Payment System\n\nclass User {\n    +id: UUID\n    +email: String\n    +name: String\n    +register()\n}\n\nclass Order {\n    +id: UUID\n    +total: Decimal\n    +status: OrderStatus\n    +calculateTotal()\n}\n\nclass PaymentProcessor <<interface>> {\n    +processPayment(amount: Decimal): Boolean\n    +refund(transactionId: UUID): Boolean\n}\n\nclass NotificationService <<abstract>> {\n    #enabled: Boolean\n    +{abstract} send(to: String, body: String)\n}\n\nenum OrderStatus {\n    PENDING\n    CONFIRMED\n    SHIPPED\n    DELIVERED\n}\n\nUser \"1\" -- \"*\" Order : places\nOrder ..|> PaymentProcessor\nNotificationService <|-- EmailNotifier\n@enduml\n```\n\nKey syntax: `+` public, `-` private, `#` protected, `{abstract}` abstract method,\n`class Foo <<interface>>` (interface via text stereotype — NOT `interface Foo`),\n`class Bar <<abstract>>` (abstract class — NOT `abstract class Bar`),\n`enum`, relationships: `--` association, `*--` composition, `o--` aggregation,\n`<|--` inheritance, `..|>` realization\n\n### Activity Diagram\n\n```\n@startuml\ntitle Order Processing\n\nstart\n:Receive Order;\nif (Payment Valid?) then (yes)\n    :Reserve Inventory;\n    if (Inventory Available?) then (yes)\n        :Confirm Order;\n        :Ship Order;\n        stop\n    else (no)\n        :Notify Customer;\n        :Cancel Order;\n        stop\n    endif\nelse (no)\n    :Reject Order;\n    stop\nendif\n@enduml\n```\n\nKey syntax: `start/stop/end`, `if/then/else/endif`, `repeat/repeat while`,\n`fork/fork again/end fork` (parallel), `split/split again/end split`,\n`partition \"name\" { ... }` (swimlane), `:Text;` action\n\n### Use Case Diagram\n\n```\n@startuml\ntitle E-Commerce System\n\nleft to right direction\n\nactor Customer\nactor Admin\n\nrectangle \"E-Commerce\" {\n    usecase \"Browse Products\" as UC1\n    usecase \"Place Order\" as UC2\n    usecase \"Manage Inventory\" as UC3\n    usecase \"Process Returns\" as UC4\n}\n\nCustomer --> UC1\nCustomer --> UC2\nAdmin --> UC3\nAdmin --> UC4\nUC2 ..> UC1 : <<include>>\n@enduml\n```\n\nKey syntax: `actor`, `usecase`, `rectangle/package` for system boundary,\n`-->` association, `..>` dependency, `<<include>>` / `<<extend>>` stereotypes\n\n### Component Diagram\n\n```\n@startuml\ntitle Microservice Architecture\n\npackage \"Frontend\" {\n    [Web App]\n    [Mobile App]\n}\n\npackage \"API Gateway\" {\n    [Gateway]\n}\n\npackage \"Services\" {\n    [User Service]\n    [Order Service]\n    [Payment Service]\n}\n\ndatabase \"PostgreSQL\" as DB\ncloud \"Message Queue\" as MQ\n\n[Web App] --> [Gateway]\n[Mobile App] --> [Gateway]\n[Gateway] --> [User Service]\n[Gateway] --> [Order Service]\n[Order Service] --> [Payment Service]\n[User Service] --> DB\n[Order Service] --> DB\n[Order Service] --> MQ\n@enduml\n```\n\nKey syntax: `[Component]`, `package \"name\" { }`, `database`, `cloud`, `node`,\n`frame`, `interface`, `()--` required interface, `--()` provided interface\n\n### Deployment Diagram\n\n```\n@startuml\ntitle Production Deployment\n\nnode \"AWS us-east-1\" {\n    node \"VPC\" {\n        node \"Public Subnet\" {\n            [Load Balancer]\n            [Bastion Host]\n        }\n        node \"Private Subnet\" {\n            node \"App Server 1\" {\n                [Application]\n            }\n            node \"App Server 2\" {\n                [Application]\n            }\n            database \"RDS Primary\"\n        }\n    }\n    cloud \"CDN\"\n}\n@enduml\n```\n\nKey syntax: `node \"name\" { }`, nested `node`, `database`, `cloud`, `actor`\n\n### State Diagram\n\n```\n@startuml\ntitle Order Lifecycle\n\n[*] --> Draft\nDraft --> Submitted : submit()\nSubmitted --> Paid : processPayment()\nSubmitted --> Cancelled : cancel()\nPaid --> Shipped : ship()\nShipped --> Delivered : confirmDelivery()\nDelivered --> [*]\nCancelled --> [*]\n\nstate Paid {\n    [*] --> Authorizing\n    Authorizing --> Captured : success\n    Authorizing --> Failed : decline\n    Captured --> [*]\n}\n@enduml\n```\n\nKey syntax: `[*]` start/end, `-->` transition with optional `: label`,\n`state Name { }` composite state, `state \"Name\" as Alias`\n\n### Gantt Chart\n\n```\n@startuml\ntitle Project Roadmap\n\nproject starts 2025-01-06\n\n[Design] lasts 10 days\n[Development] lasts 20 days\n[Development] starts at [Design]'s end\n[Testing] lasts 10 days\n[Testing] starts at [Development]'s end\n[Deployment] lasts 3 days\n[Deployment] starts at [Testing]'s end\n\n[Frontend] lasts 12 days\n[Frontend] starts at [Design]'s end\n[Backend] lasts 15 days\n[Backend] starts at [Design]'s end\n@enduml\n```\n\nKey syntax: `project starts YYYY-MM-DD`, `[Task] lasts N days`,\n`[Task] starts at [Other]'s end`, `--` separator for dependency,\n`printscale weekly/monthly`, `@dailymail`, `@weeklymail`\n\n### Mind Map\n\n```\n@startmindmap\ntitle System Architecture\n\n* Root Node\n** Level 1 A\n*** Level 2 A1\n*** Level 2 A2\n** Level 1 B\n*** Level 2 B1\n**** Level 3 B1a\n**** Level 3 B1b\n** Level 1 C\n@endmindmap\n```\n\nKey syntax: `*` root, `**` level 1, `***` level 2, etc.\nUse `@startmindmap` / `@endmindmap` (not `@startuml`).\nAffix `_` to markdown-style side notation, e.g., `***_ Right side node`.\nColors: `<style> * { BackgroundColor lightblue } </style>`\n\n---\n\n## OMG-UML / uml-diagrams.org Style Configuration (MANDATORY)\n\nEvery generated `.puml` file MUST include this CSS-style preamble immediately after `@startuml`.\nIt locks PlantUML's rendering to the **uml-diagrams.org reference style** (strict OMG UML 2.x,\nblack-and-white Visio stencils).\n\nSince PlantUML `1.2019.9` the project officially recommends the **CSS-like `<style>` block**\n([plantuml.com/style-evolution](https://plantuml.com/style-evolution)) as the preferred\nstyling mechanism — *\"`skinparam` is being phased out … users should migrate to `style`\"*.\n\n**Do NOT mix both inside the same `.puml` file.** Pick one preamble per diagram.\n\n### Primary — CSS `<style>` Preamble (recommended)\n\n```\n@startuml\n<style>\nroot {\n  FontName Helvetica\n  FontSize 12\n  FontColor #000000\n  BackGroundColor #FFFFFF\n  LineColor #000000\n  LineThickness 0.75\n  RoundCorner 0\n  Shadowing 0\n}\n\ntitle {\n  FontSize 14\n  FontStyle bold\n  FontColor #000000\n  BackGroundColor transparent\n  LineColor transparent\n  LineThickness 0\n}\n\nnote {\n  BackGroundColor #FFFFFF\n  LineColor #000000\n  FontColor #000000\n}\n\nsequenceDiagram {\n  actor       { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\n  participant { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\n  lifeLine    { BackGroundColor #FFFFFF; LineColor #000000; LineStyle 5-5; LineThickness 0.75 }\n  reference   { BackGroundColor #FFFFFF; LineColor #000000 }\n  group       { BackGroundColor #FFFFFF; LineColor #000000 }\n  arrow       { LineColor #000000; LineThickness 0.75; FontColor #000000 }\n}\n\nclassDiagram {\n  class { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\n  arrow { LineColor #000000; LineThickness 0.75 }\n}\n\nactivityDiagram {\n  activity { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000; RoundCorner 10 }\n  arrow    { LineColor #000000; LineThickness 0.75 }\n  diamond  { BackGroundColor #FFFFFF; LineColor #000000 }\n}\n\nuseCaseDiagram {\n  actor     { BackGroundColor #FFFFFF; LineColor #000000 }\n  usecase   { BackGroundColor #FFFFFF; LineColor #000000 }\n  rectangle { BackGroundColor #FFFFFF; LineColor #000000 }\n}\n\ncomponentDiagram {\n  component { BackGroundColor #FFFFFF; LineColor #000000 }\n  package   { BackGroundColor #FFFFFF; LineColor #000000 }\n}\n\nstateDiagram {\n  state { BackGroundColor #FFFFFF; LineColor #000000; FontColor #000000 }\n  arrow { LineColor #000000 }\n}\n</style>\n\n' Two settings still have NO CSS equivalent yet — keep them as skinparams:\nskinparam style strictuml\nskinparam classAttributeIconSize 0\n```\n\n**What each CSS block does (mapped to uml-diagrams.org figures):**\n\n| CSS Block | Effect / uml-diagrams.org reference |\n|---|---|\n| `root` | Global defaults: Helvetica 12px black-on-white, 0.75pt lines, no shadows, square corners. Matches Visio UML 2.x stencil look. |\n| `root > Shadowing 0` | Disables drop shadows — uml-diagrams.org figures never have shadows. |\n| `root > RoundCorner 0` | Square corners on rectangles (matches Visio stencils). `activityDiagram.activity` overrides to `10` for round-cornered actions. |\n| `title` | Bold 14px black text, transparent background/border. |\n| `note` | White fill, black border, black text — matches uml-diagrams.org note style. |\n| `sequenceDiagram.lifeLine` | **Dashed black lines** (`LineStyle 5-5`) — exactly the lifeline notation on uml-diagrams.org/sequence-diagrams.html. |\n| `sequenceDiagram.arrow` | Thin black arrows (0.75pt) — matches Visio stencil hair-line strokes. |\n| `classDiagram.class` | White fill, black border — no grey fills. |\n| `activityDiagram.activity` | White fill with **round corners** (`RoundCorner 10`) — matches uml-diagrams.org activity shape. |\n| `activityDiagram.diamond` | White fill, black border for decision/merge diamonds. |\n| `useCaseDiagram` | White actors, use cases, and rectangles — no colored fills. |\n| `componentDiagram` | White components and packages — no colored fills. |\n| `stateDiagram.state` | White fill, black border — no grey fills. |\n\n**Two skinparam settings have NO CSS equivalent yet** (as of PlantUML 1.2026.x):\n- `skinparam style strictuml` — enforces text stereotypes (`«interface»`, `«abstract»`, `«enumeration»`) and removes circle adornments\n- `skinparam classAttributeIconSize 0` — removes coloured visibility dots (●/◐/○)\n\nThese must remain as `skinparam` lines beside the `<style>` block. This is the only place\nwhere the two systems must coexist.\n\n### Backup — `skinparam` Preamble (backward-compatible)\n\nUse this preamble only when you need maximum backward compatibility with PlantUML < 1.2019.9.\nBoth preambles produce the **same uml-diagrams.org reference look**.\n\n```\n' uml-diagrams.org reference style — strict OMG UML 2.x, monochrome\nskinparam monochrome true\nskinparam backgroundColor #FFFFFF\nskinparam defaultFontName Helvetica\nskinparam defaultFontSize 12\nskinparam shadowing false\nskinparam style strictuml\nskinparam classAttributeIconSize 0\nskinparam sequenceMessageAlign center\nskinparam roundCorner 0\n\n' Force every fill to white so monochrome never falls back to grey\nskinparam ActorBackgroundColor #FFFFFF\nskinparam ParticipantBackgroundColor #FFFFFF\nskinparam NoteBackgroundColor #FFFFFF\nskinparam SequenceGroupBackgroundColor #FFFFFF\nskinparam PackageBackgroundColor #FFFFFF\nskinparam ClassBackgroundColor #FFFFFF\nskinparam ObjectBackgroundColor #FFFFFF\nskinparam StateBackgroundColor #FFFFFF\nskinparam UsecaseBackgroundColor #FFFFFF\nskinparam ComponentBackgroundColor #FFFFFF\nskinparam ActivityBackgroundColor #FFFFFF\nskinparam NodeBackgroundColor #FFFFFF\nskinparam DatabaseBackgroundColor #FFFFFF\nskinparam StereotypeCBackgroundColor #FFFFFF\nskinparam StereotypeIBackgroundColor #FFFFFF\nskinparam StereotypeABackgroundColor #FFFFFF\nskinparam StereotypeEBackgroundColor #FFFFFF\n\n' Sequence diagrams — match the lifeline / activation look on uml-diagrams.org:\n'   * lifeline = dashed black vertical line\n'   * activation bar = thin WHITE rectangle with black border (NOT yellow)\nskinparam SequenceLifeLineBorderColor #000000\nskinparam SequenceLifeLineBackgroundColor #FFFFFF\nskinparam SequenceLifeLineBorderThickness 0.75\nskinparam SequenceActivationBackgroundColor #FFFFFF\nskinparam SequenceActivationBorderColor #000000\nskinparam SequenceArrowColor #000000\nskinparam SequenceArrowThickness 0.75\nskinparam SequenceBoxBackgroundColor #FFFFFF\n\n' Default arrow / border colour everywhere\nskinparam ArrowColor #000000\nskinparam ArrowThickness 0.75\nskinparam DefaultTextColor #000000\n```\n\n**NEVER** apply colored themes (`!theme blueprint`, `!theme cerulean`, etc.), custom colors,\ngradients, shadows, or decorative styling — doing so breaks compliance with the\numl-diagrams.org reference style. If a user explicitly and unambiguously requests colour,\nadd it on top of this preamble rather than removing the preamble.\n\n### CJK (Chinese/Japanese/Korean) Font Support\n\nWhen diagrams contain CJK characters, `Helvetica` cannot render them — characters will appear as empty boxes (□) or tofu (▯).\n\n**In `.puml` files**: Replace `FontName Helvetica` in the CSS `<style>` block with a CJK-compatible font:\n```css\nroot {\n  FontName \"WenQuanYi Micro Hei\"\n}\n```\n\nFor the `skinparam` preamble (backward-compatible):\n```\nskinparam defaultFontName \"WenQuanYi Micro Hei\"\n```\n\n**When rendering**: Use the `--cjk` flag, which automatically applies the font substitution and configures Docker font mounting if needed:\n```bash\nbash generate-plantuml.sh diagram.puml ./output --cjk\n```\n\n**Host prerequisites** for CJK rendering:\n- **Docker method**: CJK fonts must exist on the host at `/usr/share/fonts` (or `/usr/local/share/fonts`, `/System/Library/Fonts`). The script mounts these into the container.\n- **Local JAR method**: CJK fonts must be installed system-wide (Java uses system fontconfig).\n- **Public server method**: The server handles font rendering automatically.\n\nCommon CJK font packages:\n| OS | Package |\n|---|---|\n| Debian/Ubuntu | `fonts-wqy-zenhei` |\n| Fedora/RHEL | `wqy-zenhei-fonts` |\n| Arch | `wqy-zenhei` |\n| Alpine | `font-wqy-zenhei` |\n| macOS | Built-in (PingFang SC / Hiragino Sans) |\n\n---\n\n## Error Recovery\n\nIf the PlantUML server returns an error:\n1. Check for syntax errors in the `.puml` file\n2. Validate that `@startuml` / `@enduml` are properly paired\n3. Ensure diagram-type-specific syntax is correct (e.g., `@startmindmap` for mind maps)\n4. Try the Docker fallback: `docker pull plantuml/plantuml:latest && bash generate-plantuml.sh ...`\n5. If all else fails, offer to install Java + plantuml.jar\n\nIf CJK characters render as empty boxes (□):\n1. Ensure the `--cjk` flag was passed when rendering\n2. Verify CJK fonts are installed on the host: `fc-list :lang=zh`\n3. If using Docker, check that font directories are mounted (the script handles this automatically with `--cjk`)\n\nIf aspect ratio warnings appear:\n1. The script applies up to 3 automatic corrections (direction toggle + scale)\n2. If warnings persist, manually adjust the `.puml`:\n   - For too-wide diagrams: add `top to bottom direction` and reduce `skinparam BoxPadding`\n   - For too-tall diagrams: add `left to right direction` and reduce `skinparam ParticipantPadding`\n   - Try `scale 0.75` or `scale 0.5` for extreme cases\n3. For sequence diagrams with many participants: consider splitting into multiple diagrams or abbreviating participant names\n\nIf A4 fit warnings appear (the script prints `📄 A4 fit: ... exceeds A4 ...`):\n1. The script has already re-rendered once with a `scale N` directive computed from the smaller required factor. Check the loop output for \"A4 fit ✓\" on the second render — if present, the diagram now fits within A4.\n2. If \"Estimated font ≈ Npt on A4\" message shows a value BELOW your `--min-font-pt` threshold (default 8 pt), further down-scaling will not make the diagram readable on print. To fix manually:\n   - Split the diagram at a natural boundary (per use case, per subsystem, per actor).\n   - Shorten long labels — e.g. replace `client_id, redirect_uri` with shortened param names.\n   - For sequence diagrams with many participants: group messages into sub-diagrams, or abbreviate participant display names.\n3. If you do not need A4 conformance for the current output, re-run with `--no-a4-check` (`-NoA4Check`) to keep the larger original.\n4. To let the diagram stretch across multiple A4 sheets, set `--min-font-pt 6` (or lower) and accept reduced legibility — the script will warn but still emit the smaller-than-A4 final image.\n\n---\n\n## Output Expectations\n\nAfter successful generation:\n1. Show the generated PlantUML source (collapsed if long)\n2. Show the rendered output (SVG inline if possible)\n3. Report the saved file paths for both `.puml` and the rendered image\n4. Note any aspect ratio corrections that were applied (with dimensions before/after)\n5. Note whether A4 fit was met natively, applied a re-scale (report the `scale N` factor and the post-fix dimensions), or skipped due to legibility threshold; if the legibility warning fired, surface it and propose splitting the diagram\n6. Offer to make adjustments\n\nFile v1.7.0:_meta.json\n\n{\n  \"ownerId\": \"kn77wr1nhm7a4w5nw4kev80d49881www\",\n  \"slug\": \"plantuml-skill\",\n  \"version\": \"1.7.0\",\n  \"publishedAt\": 1783450862791\n}\n\nFile v1.7.0:skill-card.md\n\n## Description: <br>\nTurn natural language into uml-diagrams.org style PlantUML diagrams such as sequence, class, activity, use case, component, and state diagrams, and render them to SVG, PNG, PDF, or text. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[samonysh](https://clawhub.ai/user/samonysh) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and engineers use this skill to convert natural-language architecture, workflow, and data-model descriptions into strict black-and-white PlantUML diagrams and rendered assets. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Optional public-server rendering can expose PlantUML source that contains confidential architecture, credentials, customer data, or proprietary diagrams. <br>\nMitigation: Keep rendering local for sensitive diagrams, or point the override to a trusted self-hosted Kroki instance. <br>\nRisk: The skill runs local rendering tools such as Docker or Java. <br>\nMitigation: Install only in environments where those local tools are approved, and review generated PlantUML before rendering. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/samonysh/skills/plantuml-skill) <br>\n- [Publisher Profile](https://clawhub.ai/user/samonysh) <br>\n- [uml-diagrams.org](https://www.uml-diagrams.org) <br>\n- [Kroki](https://kroki.io) <br>\n- [PlantUML Style Evolution](https://plantuml.com/style-evolution) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown with PlantUML code blocks, shell commands, and rendered diagram file paths.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May produce SVG, PNG, PDF, or text diagram artifacts through local rendering tools; optional remote rendering must be explicitly enabled.] <br>\n\n## Skill Version(s): <br>\n1.7.0 (source: frontmatter and release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.6.1: 5 files, 39193 bytes\n\nFiles: scripts/generate-plantuml.ps1 (42997b), scripts/generate-plantuml.sh (47591b), skill-card.md (2122b), SKILL.md (39704b), _meta.json (133b)\n\nFile v1.6.1:SKILL.md\n\n---\nname: plantuml\ndescription: Turn natural language into uml-diagrams.org style PlantUML diagrams (sequence, class, activity, use case, component, state…) and render to SVG/PNG/PDF. Use when the user asks to draw a UML diagram.\nversion: 1.6.1\nemoji: \"📐\"\nhomepage: https://github.com/samonysh/plantuml-skill\nmetadata:\n  openclaw:\n    # The render script is local-first: it tries Docker, then a local plantuml.jar.\n    # The Kroki public server is OPT-IN ONLY (--use-public-server / -UsePublicServer)\n    # because it uploads diagram source to a third-party service (kroki.io by default,\n    # overridable to a self-hosted Kroki via PLANTUML_PUBLIC_SERVER).\n    requires:\n      anyBins:\n        - docker\n        - java\n        - curl\n    # This skill reads no environment variables and writes no secrets; nothing to\n    # declare under primaryEnv / envVars / requires.env.\n---\n\n# PlantUML Diagram Generator\n\nGenerate professional PlantUML diagrams from natural language descriptions. This skill handles\nthe full pipeline: requirement analysis → PlantUML code generation → image rendering.\n\n## Trigger Phrases\n\nUse this skill when the user asks to:\n- \"Generate/draw/create a PlantUML diagram for...\"\n- \"Create a sequence/class/activity/... diagram sho\n\nArchive v1.6.0: 5 files, 37095 bytes\n\nFiles: scripts/generate-plantuml.ps1 (40321b), scripts/generate-plantuml.sh (42866b), skill-card.md (2327b), SKILL.md (39090b), _meta.json (133b)\n\nArchive v1.5.0: 5 files, 37791 bytes\n\nFiles: scripts/generate-plantuml.ps1 (40321b), scripts/generate-plantuml.sh (42866b), skill-card.md (2773b), SKILL.md (40505b), _meta.json (133b)\n\nArchive v1.4.1: 5 files, 33011 bytes\n\nFiles: scripts/generate-plantuml.ps1 (32056b), scripts/generate-plantuml.sh (35090b), skill-card.md (2303b), SKILL.md (38048b), _meta.json (133b)\n\nArchive v1.4.0: 5 files, 31412 bytes\n\nFiles: scripts/generate-plantuml.ps1 (30552b), scripts/generate-plantuml.sh (33505b), skill-card.md (2614b), SKILL.md (36073b), _meta.json (133b)\n\nArchive v1.3.0: 5 files, 26135 bytes\n\nFiles: scripts/generate-plantuml.ps1 (24667b), scripts/generate-plantuml.sh (25451b), skill-card.md (2088b), SKILL.md (31802b), _meta.json (133b)\n\nArchive v1.2.0: 5 files, 23739 bytes\n\nFiles: scripts/generate-plantuml.ps1 (22605b), scripts/generate-plantuml.sh (22532b), skill-card.md (2168b), SKILL.md (28687b), _meta.json (133b)","readmeExcerpt":"Skill: Plantuml Owner: samonysh Summary: Turn natural language into uml-diagrams.org style PlantUML diagrams (sequence, class, activity, use case, component, state…) and render to SVG/PNG/PDF. Use w... Tags: latest:1.7.2 Version history: v1.7.2 | 2026-07-12T08:55:11.880Z | user Release v1.7.2 v1.7.1 | 2026-07-09T03:37:10.011Z | user Release v1.7.1 v1.7.0 | 2026-07-07T19:01:02.791Z | user Release v1.7.0 v1.6.1 | 2026-","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"bash skills/plantuml/scripts/generate-plantuml.sh <input.puml> <output_dir> --format <svg|png|pdf|txt>"},{"language":"powershell","snippet":"powershell -ExecutionPolicy Bypass -File skills\\plantuml\\scripts\\generate-plantuml.ps1 <input.puml> <output_dir> -Format <svg|png|pdf|txt>"},{"language":"bash","snippet":"bash generate-plantuml.sh diagram.puml ./output --format svg --cjk"},{"language":"bash","snippet":"bash generate-plantuml.sh diagram.puml ./output --no-fix"},{"language":"bash","snippet":"bash generate-plantuml.sh diagram.puml ./output --min-aspect 0.6 --max-aspect 1.5"},{"language":"bash","snippet":"bash generate-plantuml.sh diagram.puml ./output --format svg --dark-mode"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\r\nname: plantuml\r\ndescription: Turn natural language into uml-diagrams.org style PlantUML diagrams (sequence, class, activity, use case, component, state…) and render to SVG/PNG/PDF. Use when the user asks to draw a UML diagram.\r\nversion: 1.7.2\r\nemoji: \"📐\"\r\nhomepage: https://github.com/samonysh/plantuml-skill\r\nmetadata:\r\n  openclaw:\r\n    # The render script is local-first: it tries Docker, then a local plantuml.jar.\r\n    # The Kroki public server is OPT-IN ONLY (--use-public-server)\r\n    # because it uploads diagram source to a third-party service (kroki.io by default,\r\n    # overridable to a self-hosted Kroki via PLANTUML_PUBLIC_SERVER).\r\n    requires:\r\n      anyBins:\r\n        - docker\r\n        - java\r\n        - curl\r\n    # This skill reads no environment variables and writes no secrets; nothing to\r\n    # declare under primaryEnv / envVars / requires.env.\r\n---\r\n\r\n# PlantUML Diagram Generator\r\n\r\nGenerate professional PlantUML diagrams from natural language descriptions. This skill handles\r\nthe full pipeline: requirement analysis → PlantUML code generation → image rendering.\r\n\r\n## Trigger Phrases\r\n\r\nUse this skill when the user asks to:\r\n- \"Generate/draw/create a PlantUML diagram for...\"\r\n- \"Create a sequence/class/activity/... diagram showing...\"\r\n- \"Visualize this flow/architecture/process as...\"\r\n- \"Turn this description into a UML diagram\"\r\n- \"Make a flowchart / ERD / Gantt chart from...\"\r\n- Any request involving diagram generation from text descriptions\r\n\r\n## Mandatory Style Requirements\r\n\r\nALL diagrams generated by this skill MUST adhere to the **uml-diagrams.org reference style** —\r\nstrict OMG UML 2.x rendered with Visio UML 2.x stencils (black-and-white, no decoration).\r\nThis is the canonical style used throughout https://www.uml-diagrams.org and serves as the\r\nauthoritative visual reference for every diagram this skill produces.\r\nNo exceptions unless the user explicitly requests otherwise.\r\n\r\n- **Black and white only**: Pure black lines (`#000000`) on a pure white background (`#FFFFFF`). No colors, no grayscale fills, no gradients, no themed accents.\r\n- **Thin uniform line weight**: All borders, arrows and connectors use the default hair-line stroke (≈0.75pt). Never thicken or stylize lines.\r\n- **No circle visibility icons**: Class attributes MUST NOT show colored circle icons (● public / ◐ protected / ○ private). Enforced via `skinparam classAttributeIconSize 0`. Use `+ - # ~` text markers only.\r\n- **No circle stereotype icons**: Class and interface headers MUST NOT show circle-with-letter icons (Ⓒ / Ⓘ / Ⓐ / Ⓔ). Instead of relying on `skinparam style strictuml` (which degrades actors into plain text and use cases into rectangles — see [Common Failure Patterns](#common-failure-patterns)), we suppress the circle adornments purely at the **syntax level**: always declare interfaces / abstract classes / enumerations via a `class <<interface>>` / `class <<abstract>>` / `class <<enumeration>>` text stereotype — never use the `interface` / `"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn77wr1nhm7a4w5nw4kev80d49881www\",\n  \"slug\": \"plantuml-skill\",\n  \"version\": \"1.7.2\",\n  \"publishedAt\": 1783846511880\n}"},{"path":"skill-card.md","content":"## Description:\n\nTurn natural language into uml-diagrams.org style PlantUML diagrams and render them to SVG, PNG, PDF, or ASCII text.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[samonysh](https://clawhub.ai/user/samonysh)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and engineers use this skill to turn text descriptions of systems, workflows, and interactions into PlantUML source and rendered diagrams. It is useful for producing sequence, class, activity, use case, component, deployment, state, Gantt, and mind map diagrams in a consistent UML reference style.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The renderer can execute a local PlantUML JAR from the working directory or use a mutable Docker image.\n\nMitigation: Use a pinned, trusted Docker image or an explicitly verified PlantUML JAR, and avoid running the renderer from untrusted project directories.\n\nRisk: Opt-in public server rendering sends diagram source to a third-party service.\n\nMitigation: Do not use public server rendering for confidential diagrams; review PLANTUML_PUBLIC_SERVER before enabling remote rendering and prefer local or trusted self-hosted backends.\n\n## Reference(s):\n\n- [ClawHub Plantuml Skill](https://clawhub.ai/samonysh/skills/plantuml-skill)\n- [uml-diagrams.org UML Reference Style](https://www.uml-diagrams.org)\n- [Kroki Diagram Rendering](https://kroki.io)\n- [PlantUML Style Evolution](https://plantuml.com/style-evolution)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Code, Shell commands, Files, Markdown]\n\n**Output Format:** [Markdown guidance with PlantUML code blocks and rendered SVG, PNG, PDF, or TXT diagram files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Default rendering is local-first with Docker or a local PlantUML JAR; remote Kroki rendering is opt-in.]\n\n## Skill Version(s):\n\n1.7.2 (source: frontmatter and release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Turn natural language into uml-diagrams.org style PlantUML diagrams (sequence, class, activity, use case, component, state…) and render to SVG/PNG/PDF. Use w... Skill: Plantuml Owner: samonysh Summary: Turn natural language into uml-diagrams.org style PlantUML diagrams (sequence, class, activity, use case, component, state…) and render to SVG/PNG/PDF. Use w... Tags: latest:1.7.2 Version history: v1.7.2 | 2026-07-12T08:55:11.880Z | user Release v1.7.2 v1.7.1 | 2026-07-09T03:37:10.011Z | user Release v1.7.1 v1.7.0 | 2026-07-07T19:01:02.791Z | user Release v1.7.0 v1.6.1 | 2026-","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1173,"uniquenessScore":53,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T04:01:34.738Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T04:01:34.738Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T07:42:14.412Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}