AGENT SKILL

create-diagram

Create or edit standalone Mermaid diagrams in a Design Studio prototype. Use only when Diagrams is enabled.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 161
Forks
25

01 前言 Front Matter

name
create-diagram
description
Create or edit standalone Mermaid diagrams in a Design Studio prototype. Use only when Diagrams is enabled.

03 SKILL.md 正文

Create Diagram

This skill applies to standalone prototype diagrams when Diagrams is enabled. Read the module README for file and rendering behavior.

  • Use a .mermaid file by default. Existing .mmd files work too.
  • Write plain Mermaid source without Markdown fences. One file holds one diagram.
  • Choose the diagram type for the relationship and the intended audience. Use standard Mermaid syntax; the platform does not restrict authors to a subset of diagram types.
  • Include accTitle and accDescr where the diagram type supports them.
  • Keep prototype diagrams inside that prototype, outside underscore helpers. No registration is needed.
  • Use Mermaid fences inside documents when a diagram belongs with an explanation. Use a standalone file when it needs its own navigation entry or canvas preview.
  • A standalone diagram page opens fitted and people can zoom and pan it, so a large diagram stays readable. Do not split or simplify a diagram only because it looks small when fitted; split it when its parts tell separate stories. Document fences and canvas previews stay fitted, so a large diagram belongs in a standalone file.
  • Link to standalone diagrams using relative paths with their file extensions. In a prototype document, use ![Description](./flow.mermaid) on its own line for a live embed with an Open diagram link. Keep the referenced file in the same prototype.
  • Reuse platform theme defaults. Apply explicit diagram colors only when they carry meaning, and check both light and dark modes.
  • To transfer a diagram to Excalidraw, use its existing Mermaid import. The imported canvas is a separate artifact; later source edits do not synchronize it.

Write the source directly. The local app discovers new files and reflects edits. Invalid syntax is shown as a render error. Inspect and repair it through the file menu’s Edit source action.

For new directly authored artifacts, preview and apply identity assignment. Preserve existing identity metadata when editing.

Verify

Inspect the rendered artifact, its links, and any embeds. Repair reported rendering errors and follow platform working context for required checks. Report the artifact link and unresolved content.

04 同仓库更多 Skills