← 返回
未分类

handdraw-flowchart

Create hand-drawn workflow diagrams from natural-language process descriptions by generating strictly validated Mermaid flowchart, sequenceDiagram, or classD...
根据自然语言的过程描述生成手绘工作流图,严格验证的 Mermaid 流程图、时序图或类图。
zengiai zengiai 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 1
Stars
📥 296
下载
💾 1
安装
1
版本
#latest

概述

Handdraw Flowchart

Workflow

  1. Convert the user's natural-language process into one supported Mermaid diagram:
    • flowchart TD or flowchart LR for business processes, decision trees, and state transitions.
    • sequenceDiagram for actor/system interactions over time.
    • classDiagram for domain objects, DTOs, entities, interfaces, and relationships.
  2. Generate raw Mermaid only. Do not wrap it in Markdown fences when writing .mmd files.
  3. Read references/mermaid-generation-rules.md before producing non-trivial Mermaid, especially for sequence or class diagrams.
  4. Save the Mermaid source as .mmd.
  5. Run the renderer script. It performs strict Mermaid parsing before conversion:

```bash

cd

npm install

node scripts/render-mermaid-handdraw.mjs --input /path/to/.mmd --out-dir /path/to/output --name

```

The script writes:

  • .mmd: normalized Mermaid source
  • .excalidraw: editable Excalidraw scene
  • .png: rendered PNG

Conversion Contract

  • Treat flowchart as the primary hand-drawn path. It converts to native Excalidraw elements and gives the best editable sketch-style result.
  • Treat sequenceDiagram as supported but still verify output visually when the diagram is complex.
  • Treat classDiagram as supported with possible image fallback inside the Excalidraw scene. If the script reports image-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 --validate-only after 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.json unless there is a specific reason to upgrade and retest the renderer.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-11 04:55 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

Video Frames

steipete
使用 ffmpeg 从视频中提取帧或短片。
★ 134 📥 52,813
design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 216 📥 47,250
design-media

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 429 📥 116,718