一键导入
mermaid-conventions
Conventions for creating consistent Mermaid diagrams including decision node layout, edge ordering, and flowchart direction rules.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Conventions for creating consistent Mermaid diagrams including decision node layout, edge ordering, and flowchart direction rules.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate interactive validation reports with quality scoring, missing data analysis, and type checking. Combines Pandas validation, Plotly visualization, and YAML configuration for comprehensive data quality reporting.
Class-level Hermes local configuration and setup workflows, including config audit gotchas and Windows installation.
Guide AI model selection based on task complexity, cost constraints, and latency requirements
Sub-skill of modular-architecture-documentation: 1. Module Definition Framework (+9).
Sub-skill of modular-architecture-documentation: Overview (+6).
Sub-skill of repo-structure: Tier Classification (Determines Which Rules Apply).
| name | mermaid-conventions |
| version | 1.0.0 |
| category | _internal |
| description | Conventions for creating consistent Mermaid diagrams including decision node layout, edge ordering, and flowchart direction rules. |
| tags | [] |
| scripts_exempt | true |
When creating mermaid flowcharts with decision nodes ({}), follow these rules for edge ordering:
The first edge from a decision node renders to the left in top-down (TD) flowcharts. Always list the positive/affirmative/happy-path edge first.
%% CORRECT: Yes listed first → renders left (prominent)
flowchart TD
A{Ready?}
A -- Yes --> B[Proceed]
A -- No --> C[Wait]
%% WRONG: No listed first → renders left (confusing)
flowchart TD
A{Ready?}
A -- No --> C[Wait]
A -- Yes --> B[Proceed]
The positive/expected path should continue straight down the main trunk of the diagram. Error handling, fallbacks, and edge cases should branch off to the side.
%% CORRECT: Happy path flows straight down
flowchart TD
A[Start] --> B{Valid?}
B -- Yes --> C[Process]
B -- No --> D[Show error]
C --> E[Done]
Place blocking, error, and "don't do this" paths lower in the visual hierarchy:
In mermaid, the order you list edges from a node controls layout:
Use this to control which path gets visual prominence.
List subgraphs in logical reading order:
Use connection styles to convey meaning:
--> solid arrow: active/primary connection-.-> dotted arrow: blocked/inactive/secondary connection-.- dotted line (no arrow): association/relationship (not a flow)--- solid line (no arrow): strong associationWhen documents will be converted to PDF:
generate_pdfs.py in the admin directory to regenerate PDFs after mermaid changesWhen converting chat-derived guidance into repo-maintained Mermaid artifacts, create a sanitized Markdown record rather than only returning the diagram in chat. Include frontmatter, a record log, one Mermaid block per process, a compact data-to-track table, assumptions/sensitivity notes, and an index/README link for discoverability. Avoid raw chat, personal identifiers, and high-sensitivity details; use role labels and concise operational summaries.
See references/sanitized-process-flowchart-records.md for the reusable record shape and template.
Before committing a mermaid diagram: