← 返回 Skills 市场
28195
总下载
46
收藏
238
当前安装
7
版本数
在 OpenClaw 中安装
/install diagram-generator
功能描述
Generate and edit diagrams with the mcp-diagram-generator MCP server. Use this skill for new diagrams, existing .drawio/.mmd/.excalidraw edits, network topol...
安全使用建议
Before installing, understand that this skill is meant to configure and use an external MCP diagram generator, which can create configuration files, output directories, and diagram files, including at custom paths you provide. Review the target path before generation, especially when editing existing files or using a non-default output location.
能力评估
Purpose & Capability
The stated purpose, supported formats, MCP tool use, and file-generation workflow fit together coherently for diagram creation and editing.
Instruction Scope
The activation text is broad for diagram-related requests, but it remains limited to drawing, revising, generating, or exporting diagrams and includes intake steps before generation.
Install Mechanism
The artifact contains markdown instructions only, but it asks the user to configure an external MCP server via npx or a local node path; that is disclosed and purpose-aligned.
Credentials
Creating diagram output directories and diagram files is proportionate to the skill's purpose and is described in the workflow.
Persistence & Privilege
The skill may create .diagram-config.json, default output directories, and files at default or custom paths, but it does not request background execution, credential access, or broad local indexing.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install diagram-generator - 安装完成后,直接呼叫该 Skill 的名称或使用
/diagram-generator触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.6
- Major update: Added modular playbook system and improved workflow description for all diagram types.
- New reference guides added: multiple playbooks for architecture, network topology, flowchart, swimlane, UML, Excalidraw, plus layout and intake guides.
- Removed outdated setup, troubleshooting, and topology/layout spec references; incorporated guidance into more focused playbooks.
- Intake workflow redefined: now explicitly references an intake guide and mandates gathering all required options before processing.
- Detailed best practices and troubleshooting for file formats, geometry, container nesting, and MCP tool/interface use.
- Reference index clarified; directs users to read only relevant files per use case.
v1.1.5
- Clarified the local MCP server configuration instructions by making the path generic.
- Added top-level name and description fields for improved documentation structure.
- No changes to functionality or core workflow.
v1.1.4
# Changelog - v1.1.2
This release focuses on fixing severe layout issues and arrow binding bugs in Excalidraw and Draw.io, improving user experience for manual dragging, and extending Mermaid diagram rendering capabilities.
### Bug Fixes & Improvements
#### 1. Excalidraw Generator
* **Fix Messy Layouts**: Respects JSON spec coordinates and cascades relative child coordinates to absolute coordinates during canvas rendering instead of using messy accumulated offsets.
* **Bidirectional Binding & Auto-Stick**: Adds the `boundElements` property to Node/Container shapes referencing connected Arrow IDs. When dragging elements in Excalidraw, arrows will now stretch and follow automatically.
* **Refactored Point Vectors**: Standardizes the start `x`/`y` of arrows to the center of the source node and sets the points array as relative offsets `[[0, 0], [dx, dy]]` for full compatibility with Excalidraw protocols.
#### 2. Draw.io Generator
* **Grid Auto-Layout**: Implements a grid layout fallback. If elements lack coordinates ($x=0, y=0$), they are automatically laid out in structured grids ($4 \times N$ for top level, $3 \times M$ for container children).
* **Smart Parent Container Binding**: Automatically binds Edge elements to their shared parent container ID instead of the root page, enabling edges to move along with the container during manual dragging.
* **Adaptive Connection Anchors**: Calculates relative positions of nodes and appends adaptive entry/exit anchors (top-to-bottom or left-to-right) to prevent lines from passing through the text center.
#### 3. Mermaid Generator
* **Fix Diagram Type Inference**: Corrects the logic where `nodes.length > 0` incorrectly overrode all inferences to flowchart, enabling sequence diagram rendering.
* **UML Class & ER Diagram Support**: Adds dedicated generator modules for rendering Class and ER diagrams, auto-mapping `edge.style` properties to UML relationship types (inheritance, aggregation, association, etc.).
#### 4. Schema & Configuration
* **`diagramType` Validation**: Supports explicit `diagramType` validation in TS definitions and JSON Schemas.
* **Optional Geometry & Relative Coordinates**: Standardizes container child geometries as relative offsets to their parent containers, and makes geometry optional to support coordinate-free grid layout.
v1.1.3
# Changelog - v1.1.2
## English Version
This release focuses on fixing severe layout issues and arrow binding bugs in Excalidraw and Draw.io, improving user experience for manual dragging, and extending Mermaid diagram rendering capabilities.
### Bug Fixes & Improvements
#### 1. Excalidraw Generator
* **Fix Messy Layouts**: Respects JSON spec coordinates and cascades relative child coordinates to absolute coordinates during canvas rendering.
* **Bidirectional Binding & Auto-Stick**: Adds the `boundElements` property to Node/Container shapes referencing connected Arrow IDs. When dragging elements in Excalidraw, arrows will now stretch and follow automatically.
* **Refactored Point Vectors**: Standardizes the start `x`/`y` of arrows to the center of the source node and points array to relative offsets `[[0, 0], [dx, dy]]`.
#### 2. Draw.io Generator
* **Grid Auto-Layout**: Implements a grid layout fallback. If elements lack coordinates ($x=0, y=0$), they are automatically laid out in structured grids ($4 \times N$ for top level, $3 \times M$ for container children).
* **Smart Parent Container Binding**: Automatically binds Edge elements to their shared parent container ID instead of the root page, enabling edges to move along with the container during manual dragging.
* **Adaptive Connection Anchors**: Calculates relative positions of nodes and appends adaptive entry/exit anchors (top-to-bottom or left-to-right) to prevent lines from passing through the text center.
#### 3. Mermaid Generator
* **Fix Diagram Type Inference**: Corrects the logic where `nodes.length > 0` incorrectly overrode all inferences to flowchart, enabling sequence diagram rendering.
* **Extended Class and ER Diagrams**: Supports new rendering branches for `classDiagram` and `erDiagram` structures, mapping relationship arrows (inheritance, dependency, aggregation, etc.) dynamically via edge styles.
#### 4. Specification & Schema
* **Support diagramType Schema**: Adds the optional `diagramType` validation field in TypeScript interfaces and JSON schemas.
* **Relative Coordinates Standardization**: Documented and standardized that all child elements inside containers use relative offsets rather than absolute coordinates. Made `geometry` optional for Nodes/Containers.
---
## 中文版
本次更新重点修复了 Excalidraw 与 Draw.io 的布局重叠与连线不跟随等严重影响用户体验的缺陷,并扩展了 Mermaid 渲染能力。
### 修复与优化
#### 1. Excalidraw 渲染器重构
* **修复布局混乱**:尊重并基于 Spec 原生相对坐标,将其级联累加转换为 Excalidraw 画布的绝对坐标,不再忽略用户设定的几何位置。
* **实现双向吸附与拖拽跟随**:在生成节点与容器时,引入 `boundElements` 双向引用属性。现在在 Excalidraw 网页端导入图表后,拖拽任意节点或容器,连线(箭头)会自动拉伸并跟随,彻底解决了悬空和连线脱节问题。
* **重构防偏差连线算法**:规范了箭头的起点基准与相对向量点集定义,完全契合 Excalidraw 官方标准数据协议。
#### 2. Draw.io 渲染器优化
* **支持未定义坐标自排版**:新增极简网格 (Grid) 自动布局算法。对于未指定坐标的 Spec 元素,自动按行列矩阵进行规整排列,避免图表全部堆积在左上角。
* **智能 Parent 容器绑定**:当连线的源节点和目标节点在同一个父容器中时,自动将连线的 mxCell 的 parent 设为该容器 ID。现在整体移动某区域容器时,连线将同步平移。
* **自适应连线锚点**:基于源与目标节点的相对几何位置,自适应在 mxCell Style 中注入进出锚点(上下/左右),彻底消除了连线横跨并穿透节点中部文字的现象。
#### 3. Mermaid 渲染器增强
* **修复时序图推导 Bug**:修正了 `inferDiagramType` 只要存在节点便无条件强制返回 flowchart 的缺陷,引入了显式指定和自适应降级推导机制。
* **增加类图与 ER 图生成能力**:补齐了类图和关系图的具体解析与生成分支,能根据 edge.style 属性自动转换继承、聚合、关联等类图关系。
#### 4. 规范与类型定义
* **支持 diagramType 属性校验**:在 TS 接口及 JSON Schema 校验参数中增加可选的 `diagramType`。
* **相对坐标写入规范**:将 Container 内子节点的 `geometry` 统一规整为相对于其直接父容器左上角坐标,并将 Node 与 Container 的 `geometry` 设置为可选属性,以支持空坐标的极简生成。
v1.1.1
- Minor update with documentation improvements and increased clarity in description.
- Added contact information for user support.
- Enhanced the English description for easier understanding of features and usage.
- No changes to features or code; functionality remains the same.
v1.0.1
diagram-generator 1.0.1
- Added detailed setup and troubleshooting instructions for the required `mcp-diagram-generator` MCP server
- Included configuration examples for both npx-based automatic install and local development workflows
- Provided step-by-step verification and common issue resolutions to help users ensure the MCP server is properly integrated
- Maintained all previous features and diagram generation capabilities
v1.0.0
Initial release of diagram-generator: generate and edit multiple diagram types with auto-configuration.
- Generates and edits diagrams in drawio, mermaid, and excalidraw formats from natural language or file input.
- Supports common diagram types: flowcharts, sequence diagrams, class diagrams, ER diagrams, mindmaps, architecture, network topology diagrams.
- Auto-configuration: default output paths created automatically; supports custom paths and auto-creates directories.
- Uses a dedicated MCP server for diagram file generation to ensure consistency and reduce token usage.
- Fixes duplicate ID issue in drawio generation.
元数据
常见问题
diagram-generator 是什么?
Generate and edit diagrams with the mcp-diagram-generator MCP server. Use this skill for new diagrams, existing .drawio/.mmd/.excalidraw edits, network topol... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 28195 次。
如何安装 diagram-generator?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install diagram-generator」即可一键安装,无需额外配置。
diagram-generator 是免费的吗?
是的,diagram-generator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
diagram-generator 支持哪些平台?
diagram-generator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 diagram-generator?
由 nssa.io(@matthewyin)开发并维护,当前版本 v1.1.6。
推荐 Skills