AI Agent Hub
Back to skills
Diagram Generator icon

Diagram Generator

Design & Media Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md and install @zcwl/diagram-generator.

About this skill

Problem

Engineers often need to turn verbal requirements, review notes, or documentation drafts into maintainable diagrams, but hand-writing Draw.io, Mermaid, or Excalidraw files tends to cause rework around node IDs, container nesting, edge connections, and coordinate layout. This skill targets that workflow: it first constrains natural language input into a structured JSON spec, then generates chart files in three formats, reducing the low-level description cost between “draw an architecture diagram” and a usable file.

How it works

  • Intent capture: before creating a chart, confirm diagram type, output format, layout direction, use case, and filename; when editing an existing file, read the target file and apply changes.
  • Playbook routing: network topology, system architecture, flowchart, swimlane, UML, and whiteboard sketches each use their own strategy document, avoiding mixed format rules.
  • Spec construction: organize nodes, containers, and edges in an elements array, with unique IDs, top-level edges, source / target pointing to defined nodes, and colors in #RRGGBB.
  • Quality gate: check format, hierarchy, container bounds, edge connections, and geometry fields before generation; complex Draw.io and Excalidraw charts require explicit geometry.
  • Service call: submit diagram_spec through mcp__mcp-diagram-generator__generate_diagram, then the service validates the schema, creates directories, and writes to diagrams/{format}/ or a specified path.

Boundaries and caveats

This skill does not handle bitmaps, SVG vector editing, PDF layout, PPT creation, 3D modeling, or animated visualization. Output quality depends on prompt detail and JSON spec completeness; missing connector tools, unwritable output directories, or mismatched file extensions can trigger tool, schema, or file-write errors.

Use Cases

  • Backend teams reviewing an e-commerce system can convert microservice tier notes into a vertical Draw.io architecture diagram.
  • Network planners describing active-active topologies across three data centers can generate Draw.io topology files with environment, datacenter, zone, and device nesting.
  • Finance teams can convert expense-approval handoff notes into a horizontal swimlane diagram with employee, manager, finance, and cashier lanes.
  • Documentation teams can generate Mermaid sequence diagrams for user login flows and embed them in repository Markdown.

Best For

  • Backend engineers owning architecture docs who need service-tier, gateway, and data-layer notes as review-ready Draw.io charts.
  • Technical writers maintaining repository docs who need login or order flows as Mermaid sequence diagrams embedded in Markdown.
  • Network engineers planning data centers who need environment, datacenter, zone, and device nesting as Draw.io topologies.
  • Finance process owners who need expense-approval and cross-team handoff steps as horizontal swimlane diagrams.