/install handdraw-flowchart
Handdraw Flowchart
Workflow
-
Convert the user's natural-language process into one supported Mermaid diagram:
flowchart TDorflowchart LRfor business processes, decision trees, and state transitions.sequenceDiagramfor actor/system interactions over time.classDiagramfor domain objects, DTOs, entities, interfaces, and relationships.
-
Generate raw Mermaid only. Do not wrap it in Markdown fences when writing
.mmdfiles. -
Read
references/mermaid-generation-rules.mdbefore producing non-trivial Mermaid, especially for sequence or class diagrams. -
Save the Mermaid source as
\x3Cname>.mmd. -
Run the renderer script. It performs strict Mermaid parsing before conversion:
cd \x3Cskill-directory> npm install node scripts/render-mermaid-handdraw.mjs --input /path/to/\x3Cname>.mmd --out-dir /path/to/output --name \x3Cname>
The script writes:
\x3Cname>.mmd: normalized Mermaid source\x3Cname>.excalidraw: editable Excalidraw scene\x3Cname>.png: rendered PNG
Conversion Contract
- Treat
flowchartas the primary hand-drawn path. It converts to native Excalidraw elements and gives the best editable sketch-style result. - Treat
sequenceDiagramas supported but still verify output visually when the diagram is complex. - Treat
classDiagramas supported with possible image fallback inside the Excalidraw scene. If the script reportsimage-fallback, the PNG is valid, but editability is limited. - Reject unsupported Mermaid diagram types instead of silently producing a lower-quality result.
- Do not claim success until the renderer has completed without validation or export errors.
Strict Validation Rules
- Run
node scripts/render-mermaid-handdraw.mjs --input \x3Cfile> --validate-onlyafter generating Mermaid if you need a fast syntax gate. - If validation fails, edit the Mermaid source and rerun. Do not bypass validation.
- Prefer simple Mermaid syntax over clever syntax. Avoid custom CSS, HTML labels, Markdown tables inside labels, YAML frontmatter, and experimental Mermaid shape declarations.
- Keep node IDs stable and ASCII where practical. Put user-facing Chinese text in labels, not IDs.
Rendering Notes
- The script uses browser execution because Excalidraw export utilities require DOM/canvas APIs.
- If Playwright has no bundled browser, the script tries common local Chrome/Chromium executable paths and honors
CHROME_PATH. - For reproducible results, keep the versions pinned in
package.jsonunless there is a specific reason to upgrade and retest the renderer.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install handdraw-flowchart - 安装完成后,直接呼叫该 Skill 的名称或使用
/handdraw-flowchart触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
handdraw-flowchart 是什么?
Create hand-drawn workflow diagrams from natural-language process descriptions by generating strictly validated Mermaid flowchart, sequenceDiagram, or classD... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 31 次。
如何安装 handdraw-flowchart?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install handdraw-flowchart」即可一键安装,无需额外配置。
handdraw-flowchart 是免费的吗?
是的,handdraw-flowchart 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
handdraw-flowchart 支持哪些平台?
handdraw-flowchart 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 handdraw-flowchart?
由 zengiai(@zengiai)开发并维护,当前版本 v1.0.0。