Draw and edit Mermaid diagrams in Markdown. Use when the user wants to visualize processes, flows or sequences, or asks for a diagram. Load it before writing any Mermaid block, even when you know the syntax — that is why it gets skipped.
67
80%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./plugins/flowai-engineering/skills/draw-mermaid-diagrams/SKILL.mdWriting Mermaid is not the hard part; producing Mermaid that renders is. Measured on 2026-08-30/31 over twelve agent-written diagrams: without the check below, three of three broke on a task whose labels carried parentheses and whose sequence messages carried semicolons — and every draft written with the skill broke the same way at first. The diagrams that shipped correct were the ones where the check ran and the agent fixed what it reported. That is what this skill is for.
<step_by_step>
Pick the diagram type. Flowchart for processes and decision trees,
sequence for interactions between parties, state for lifecycles, ER for
schemas, Gantt for timelines, class for structure. references/SPEC.md
lists them with what each is for.
Read references/SPEC.md before writing. It is a hazard list, not a
syntax dump: which characters end a label early, which reserved words
cannot be node identifiers, and which characters are safe. Reading it first
is cheaper than fixing the draft afterwards.
Write the diagram inside a ```mermaid block in a Markdown file.
Run the check. Required, on the file you just wrote:
python3 scripts/validate.py path/to/diagram.mdIt needs Python 3 and nothing else — no network, no Node, no install — and finishes in milliseconds. Exit 0 means clean; exit 1 prints one line per problem with the line number and the fix.
Repair anything it reports and run it again. Repeat until it is clean. Only then present the diagram.
</step_by_step>
It is a hazard list, not a full parser. It catches the constructs measured to stop a diagram rendering — unquoted brackets in node labels, edge labels and subgraph titles; a literal quote inside a label; reserved words used as node identifiers; a semicolon in a sequence message; a stray pipe in an edge label. Across 43 synthetic probes and 12 agent-written diagrams it agreed with the official Mermaid parser on all 55, with no misses and no false alarms.
It will not catch a novel syntax error outside that list. When a diagram uses
a shape or directive you are not sure of, check Mermaid's own reference —
linked at the end of references/SPEC.md.
scripts/validate.py — the check from step 4ad81ae6
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.