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 從公開儲存庫中收錄這些內容。

檢舉或申請下架