Mermaid 图表绘制
mermaid-diagrams
为 Markdown 文档和 PR 描述中的变更、架构、生命周期与依赖关系创建或优化清晰易读的 Mermaid 图表。
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 469
- Forks
- 117
01 前言 Front Matter
- name
- mermaid-diagrams
- description
- Create or refine readable Mermaid diagrams for changes, architecture, lifecycles, and dependencies in Markdown documents and PR descriptions.
02 资源文件 1
- 参考文档references/flowchart-template.md2.4 KB
03 SKILL.md 正文
Mermaid diagrams
Use a diagram when relationships, phases, or boundaries are easier to understand visually. Keep the surrounding explanation short. A simple edit or single fact usually needs only prose.
Establish the meaning
- Check the relevant implementation or design before drawing. State whether the diagram describes current behavior, a proposal, or a before/after comparison.
- Show the important relationships and major boundaries, not every function. Name subgraphs for the phases or boundaries they explain.
- Use solid arrows for implemented connections and dashed arrows for pending or unconnected integration. Label arrows with short verbs or conditions. Express asynchronous behavior in words rather than repurposing dashed arrows.
- Make blockers, missing connections, and out-of-scope work explicit. A proposed connection stays dashed even when its components already exist.
- Match claims to the evidence: implemented source does not by itself prove a working deployment. If that distinction matters, include it in the diagram or its caption. Do not infer a completed path from neighboring components.
Draw compactly
Use a native Markdown mermaid code block. Prefer flowchart TB; choose another
diagram type when it better explains the relationship, such as sequence order.
Keep any alternate notation's meaning clear in the caption.
For flowcharts, start from the flowchart template. Its sample behavior is illustrative; replace its nodes and connections with the actual subject.
- Enable
htmlLabels: truein Mermaid's YAML frontmatter. - Give nodes short bold headings with
<b>...</b>and separate supporting lines with<br/>. Aim for roughly 15–25 characters per line and 2–3 lines per node where practical. Preserve precise names when shortening would obscure meaning. - Avoid long single-line labels, fixed-width HTML containers, complex inline CSS, and excessive text. Split an overfull diagram into focused views.
- Use muted, desaturated fills with dark labels and thin borders; start with
1px strokes. Keep phase outlines neutral so they do not compete with the nodes.
Define reusable
classDefstyles and reinforce color with words and line styles. - Start with 14–16px text and balanced spacing. Set
subGraphTitleMarginseparately from nodepaddingso phase headings have room above their nodes. TunenodeSpacingandrankSpacingrather than adding empty label lines. - Align parallel phases when practical. An extra hyphen on an existing solid
arrow (
--->) can span another layout rank without adding a relationship. Keep its meaning and endpoints unchanged; avoid inventing edges to force layout.
| Color | Meaning |
|---|---|
| Blue | APIs, configuration, persisted state |
| Purple | Operator inputs, secrets, external dependencies |
| Teal | Processing, protected operations, implemented capabilities |
| Amber | Gates, blockers, conditions requiring attention |
| Gray with a dashed border | Pending or out-of-scope integration |
Verify and report
Check that every edge reflects the relevant evidence and that labels distinguish implemented behavior from pending work. Keep confidential details out of diagrams destined for a public document or PR, just as in the surrounding text.
When available, render at the intended document width and inspect label contrast, phase-title clearance, node padding, large empty areas, and confusing crossings. Compare before/after views at the same viewport; a narrower SVG may be enlarged by its viewer. Prefer the destination's renderer; local rendering can differ from the published result. Adjust labels or layout when needed.
Report validation precisely: reviewing source text, passing a Mermaid syntax check, and visually inspecting a rendered diagram are separate checks. If rendering is unavailable, say so; do not describe the diagram as visually verified. Diagram checks do not establish runtime behavior.
04 同仓库更多 Skills
Google Workspace 命令行操作
oce-google
在专用工作节点(worker)上使用托管的 Google Workspace CLI。
测试审查与质量把关
test-audit
对新增或变更的企业测试进行把关,并审查现有测试的可观察行为、可信回归、重复覆盖以及仅供测试使用的生产代码接口。
企业技术文档撰写与审查
technical-writing
撰写、组织、命名、编辑或审查企业开发者文档、规范和技术说明;让论断基于当前源码,并以通俗语言润色收尾。
RFC 与实施方案撰写
spec
按照仓库编号和生命周期规则,起草或更新 OpenClaw Enterprise 的 RFC 和实施方案。
PR 演示流程录制
pr-walkthrough
为拉取请求(PR)录制易读的 Console 演示流程。当评审者需要查看交互、状态转换、恢复过程或键盘操作流程时使用。
OpenClaw 企业端到端集成测试
oceinteg
针对真实且受支持的安装环境,运行指定的 OpenClaw Enterprise 端到端集成场景。仅在明确调用时使用。