← Back to Skills Marketplace
opietaylor911

AI Mermaid Diagrams

by OpieTaylor911 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
320
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install ai-mermaid-diagrams
Description
Generate architecture diagrams (network, system, cloud, microservices) and sequence diagrams (API flows, auth flows, data flows) as PNG files using Mermaid....
README (SKILL.md)

Mermaid Diagrams Skill

Generates Mermaid diagrams and renders them to PNG using the mmdc CLI.

Reference Files

  • Architecture patterns (flowchart, C4, cloud, network, microservices) → references/architecture-patterns.md
  • Sequence diagram patterns (API flows, auth, CI/CD, DLP flows) → references/sequence-patterns.md

Load the relevant reference file based on diagram type requested.

Rendering Tool

Use mermaid.ink (free online renderer, no browser/install needed):

mkdir -p /home/bcaddy/.openclaw/workspace/diagrams
ENCODED=$(cat \x3Cinput.mmd> | base64 -w 0)
curl -s "https://mermaid.ink/img/${ENCODED}?bgColor=white&width=2048" \
  -o /home/bcaddy/.openclaw/workspace/diagrams/\x3Cname>.png
  • Output directory: /home/bcaddy/.openclaw/workspace/diagrams/
  • Width: 2048px default; increase for very wide diagrams (&width=3000)
  • Always create output directory first: mkdir -p /home/bcaddy/.openclaw/workspace/diagrams

Workflow

1. Identify Diagram Type

  • Network/system/cloud/microservices → use flowchart or C4Context
  • API/auth/data flows, step-by-step processes → use sequenceDiagram
  • When in doubt: sequence for "how does X work step by step", architecture for "what does X look like"

2. Load Reference File

  • Architecture → references/architecture-patterns.md
  • Sequence → references/sequence-patterns.md

3. Generate Mermaid Code

  • Write complete, valid Mermaid syntax
  • Use descriptive node labels (not just A, B, C)
  • Use subgraphs to group related components in architecture diagrams
  • Use alt/loop/note blocks to add clarity in sequence diagrams
  • Match the style of the patterns in the reference file

4. Save .mmd File

Save to: /home/bcaddy/.openclaw/workspace/diagrams/\x3Cdescriptive-name>.mmd

Use kebab-case, descriptive filenames: auth-flow.mmd, aws-architecture.mmd, api-gateway-sequence.mmd

5. Render to PNG via mermaid.ink

ENCODED=$(cat /home/bcaddy/.openclaw/workspace/diagrams/\x3Cname>.mmd | base64 -w 0)
curl -s "https://mermaid.ink/img/${ENCODED}?bgColor=white&width=2048" \
  -o /home/bcaddy/.openclaw/workspace/diagrams/\x3Cname>.png

6. Confirm Output

Report the full path to the saved PNG. Offer to adjust layout, add components, or generate a .mmd file for further editing in mermaid.live or VS Code.

Tips

  • flowchart LR for left-to-right pipelines and network flows
  • flowchart TD for top-down hierarchies and cloud stacks
  • Wide diagrams: increase -w (width); tall diagrams: increase -H (height)
  • For very complex diagrams, break into multiple diagrams
  • Always include a title comment at the top of the .mmd file: %% Title: ...
Usage Guidance
This skill will produce Mermaid .mmd files locally but then sends the diagram source to mermaid.ink by embedding the base64-encoded .mmd in the URL. Before installing or using it, consider: (1) Do not include any sensitive information (internal hostnames, IP ranges, credentials, tokens, or proprietary architecture text) in diagrams you render with this skill, because that content will be transmitted to a third-party service and may appear in logs or proxies. (2) The use of a GET URL with base64 can leak content in web server logs, referrers, or proxies and may hit URL length limits; prefer rendering methods that POST the payload or render locally. (3) The SKILL.md hardcodes /home/bcaddy/...; update the output directory to a path appropriate for your environment to avoid accidental writes or permission errors. (4) If you need offline/private rendering, use a local renderer (mermaid-cli mmdc or a self-hosted renderer) instead of mermaid.ink. If you want me to, I can suggest a safer SKILL.md that renders locally or uses a POST-based renderer, or point you to commands to install mermaid-cli for offline rendering.
Capability Analysis
Type: OpenClaw Skill Name: ai-mermaid-diagrams Version: 1.0.0 The skill provides instructions for the agent to execute shell commands (`cat`, `base64`, `curl`) to transmit file contents to an external third-party service (mermaid.ink) for rendering. While this is functionally necessary for the stated purpose of generating diagrams without a local renderer, it creates a high-risk pathway for data exfiltration if the agent is manipulated into processing sensitive files instead of Mermaid code. The skill also relies on hardcoded absolute paths for a specific user directory (/home/bcaddy/), which is a common indicator of poorly scoped or environment-specific scripts.
Capability Assessment
Purpose & Capability
The name/description match the instructions: generate Mermaid .mmd files and render PNGs. The required capabilities are minimal and consistent. Note: SKILL.md hardcodes a user-specific path (/home/bcaddy/.openclaw/workspace/diagrams), which is an operational assumption that may not fit other environments.
Instruction Scope
Instructions require encoding the entire .mmd content and invoking https://mermaid.ink/img/<BASE64> via curl. This sends diagram source to an external service (third party). Diagrams often contain sensitive internal details (hostnames, IPs, architecture notes, or credentials if accidentally included), so this is a potential data‑exfiltration/privacy risk. Using a GET path with base64 also exposes content in logs, referrers, and proxies and may hit URL length limits. The skill does not instruct any local/offline rendering alternative.
Install Mechanism
Instruction-only skill; no install spec or downloaded code. Low installation risk because nothing is written to disk by an installer beyond the .mmd and .png files the agent would create per instructions.
Credentials
No environment variables or credentials are required — appropriate and minimal. Observe however the hardcoded filesystem path using a specific username (bcaddy), which is unexpected and could cause failures or accidental writes in other environments.
Persistence & Privilege
Does not request persistent privileges, always:false, and doesn't modify other skills or system-wide settings. It will write output files to the workspace directory per its instructions (normal for this functionality).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ai-mermaid-diagrams
  3. After installation, invoke the skill by name or use /ai-mermaid-diagrams
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release — generate architecture diagrams (network, system, cloud, microservices) and sequence diagrams (API flows, auth flows, CI/CD) as PNG using mermaid.ink renderer. No local browser required.
Metadata
Slug ai-mermaid-diagrams
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is AI Mermaid Diagrams?

Generate architecture diagrams (network, system, cloud, microservices) and sequence diagrams (API flows, auth flows, data flows) as PNG files using Mermaid.... It is an AI Agent Skill for Claude Code / OpenClaw, with 320 downloads so far.

How do I install AI Mermaid Diagrams?

Run "/install ai-mermaid-diagrams" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is AI Mermaid Diagrams free?

Yes, AI Mermaid Diagrams is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does AI Mermaid Diagrams support?

AI Mermaid Diagrams is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created AI Mermaid Diagrams?

It is built and maintained by OpieTaylor911 (@opietaylor911); the current version is v1.0.0.

💬 Comments