← 返回
开发者工具 中文

ISAI Mermaid Diagrams

Generate architecture diagrams (network, system, cloud, microservices) and sequence diagrams (API flows, auth flows, data flows) as PNG files using Mermaid....
使用Mermaid生成架构图(网络、系统、云、微服务)和时序图(API流程、认证流程、数据流程)并导出为PNG文件。
opietaylor911
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 538
下载
💾 9
安装
1
版本
#latest

概述

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 <input.mmd> | base64 -w 0)
curl -s "https://mermaid.ink/img/${ENCODED}?bgColor=white&width=2048" \
  -o /home/bcaddy/.openclaw/workspace/diagrams/<name>.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/.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/<name>.mmd | base64 -w 0)
curl -s "https://mermaid.ink/img/${ENCODED}?bgColor=white&width=2048" \
  -o /home/bcaddy/.openclaw/workspace/diagrams/<name>.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: ...

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 01:31 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,162
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,181
security-compliance

AI Compliance

opietaylor911
AI合规分析,涵盖欧盟AI法案、ISO 42001、NIST AI RMF、GDPR、OECD以及金融服务监管(SEC、FCA、FINRA、DORA、MiFID II)等其他框架。
★ 0 📥 1,110