Mermaid Diagrams

作者 ccheney0eea7b060d12无许可证60 个星标收录于 2026年10月8日更新于 2026年10月8日仓库8天前更新

Create or fix Mermaid diagrams in Markdown. Use for requested flowcharts, sequence diagrams, ER diagrams, state machines, or system diagrams when Mermaid is the output format; not every visualization or explanation.

AI 生成的概览

在 Markdown 中创建或修复 Mermaid 图表,涵盖流程图、时序图、ER 图、状态图和架构图。

功能
把描述的过程、代码路径、数据库结构或关系转换为 Mermaid 图表源码,并选择与所要呈现事实相匹配的图表类型。它输出带 mermaid 标记的代码块,或按要求输出 .mmd 文件或渲染后的成品,并就节点 ID、标签、基数和版本兼容语法给出规范。它也能修复无法渲染或语法错误的 Mermaid 代码,并指向随附的各图表类型参考文件。
适用场景
当要求的输出格式是 Mermaid 图表时使用,例如流程图、时序图、ER 图、状态机或系统图。它并不适用于所有可视化或解释类请求;若用户明确指定了绘图工具或成品格式,应予以保留。
运行要求
不需要脚本,仅包含说明和参考文档。渲染或校验复杂语法时可借助 Mermaid 渲染器或 CLI,但简单的语法回答无需安装新的工具链。

Mermaid Diagrams

Turn the supplied process, code, schema, or relationships into the requested Mermaid diagram. The user's explicit instructions take precedence over this skill's guidelines, including their choice of output format.

Choose the representation

Establish the facts to show and the destination renderer. If the request leaves the format open and a text-based system/process diagram fits, Mermaid is a reasonable choice. Preserve an explicitly requested drawing tool or artifact format.

QuestionDiagram
What happens next or which path is taken?flowchart
Who calls whom, in what order?sequenceDiagram
What tables and cardinalities exist?erDiagram
What states and transitions exist?stateDiagram-v2
How are types or services related?classDiagram or flowchart with subgraphs
What is scheduled or measured?A matching planning/data type from the references

Use supplied evidence for nodes, edges, cardinalities, dates, and values. Mark conceptual assumptions; ask for missing facts that determine the diagram rather than inventing a system.

Produce a renderable result

  • Return a fenced mermaid block, or the requested .mmd/rendered artifact. Use one diagram declaration per block.
  • Prefer stable syntax supported by the destination. Examples were checked against Mermaid 11.16; a host can bundle an older version.
  • Give nodes stable IDs distinct from display labels and subgraph IDs. Quote labels with punctuation; avoid reserved end IDs and use %% comments on their own lines.
  • Keep ER attributes one per line and alias sequence participants whose names contain spaces.
  • Split diagrams when readability suffers, not at a fixed node count.

Validate nontrivial or repaired syntax with the project's renderer or an available Mermaid CLI. Inspect the rendered result when producing an artifact; if rendering is unavailable, state that limitation. A simple syntax answer does not require installing a new toolchain.

References

Load the diagram type or rendering topic required.

TaskReference
Flowcharts, subgraphs, shapes, edgesFLOWCHARTS.md [blocked]
Calls, activation, loops, alternativesSEQUENCE.md [blocked]
Classes, types, database relationshipsCLASS-ER.md [blocked]
State machines and user journeysSTATE-JOURNEY.md [blocked]
Gantt, timeline, pie, XY, sankey, mindmap, gitGraphDATA-CHARTS.md [blocked]
C4, architecture, block, kanban, packet, requirementsARCHITECTURE.md [blocked]
Configuration, styling, export, troubleshootingADVANCED.md [blocked]
Compact syntax and platform lookupCHEATSHEET.md [blocked]

Check Mermaid documentation and the destination's own support notes when a feature is version-sensitive.

来源与署名

来源:ccheney/robust-skills位于skills/mermaid-diagrams提交0eea7b0

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架