# Mermaid flowchart to slide diagram: what an AI agent drew

For anyone with a Mermaid flowchart to put on a slide, this page records one run of an AI agent doing it with open-diagram. All three drafts passed the check; each change came from the picture's size.

## What was asked?

The user typed one sentence and pasted a flowchart:

```text
Turn this Mermaid flowchart into a diagram I can put on a slide.
```

Quillfern is an invented home-repair booking service. In its flowchart, dotted lines mark steps not built yet:

```mermaid
flowchart TD
    %% dotted = not built yet
    subgraph Office
        A[Customer books a repair] --> B{Job type known?}
        B -->|Yes| C[Match a fixer]
        B -->|No| D[Call the customer]
        D --> C
    end
    subgraph Field
        C --> E[Fixer accepts the job]
        E --> F[Visit and repair]
        F --> G{Customer happy?}
        G -->|No| I[Send a second fixer]
        I --> F
    end
    G -->|Yes| H[Take payment]
    H --> J[Ask for a review]
    H -.-> K[Text the invoice]
```

## What did the first draft get wrong?

Nothing the check measures: it reported `0 layout problem(s)`. The picture's size was the trouble.

The agent skill says to draw a Mermaid flowchart directly, so the first draft is the user's file with two changes. It has a title, since open-diagram titles a file without one "Flowchart". It reads `LR` in place of `TD`, since a slide is wide.


```mermaid
---
title: How Quillfern handles a repair request
---
flowchart LR
    %% dotted = not built yet
    subgraph Office
        A[Customer books a repair] --> B{Job type known?}
        B -->|Yes| C[Match a fixer]
        B -->|No| D[Call the customer]
        D --> C
    end
    subgraph Field
        C --> E[Fixer accepts the job]
        E --> F[Visit and repair]
        F --> G{Customer happy?}
        G -->|No| I[Send a second fixer]
        I --> F
    end
    G -->|Yes| H[Take payment]
    H --> J[Ask for a review]
    H -.-> K[Text the invoice]

```

![How Quillfern handles a repair request](https://open-diagram.dev/images/pages/prompts-mermaid-flowchart-to-slide-1.svg)

The check: 0 layout problems


The picture is 1,894 by 640 pixels. Each subgraph gets its own band, so the Field steps sit below and to the right of the Office steps, leaving two corners empty. The line back from "Send a second fixer" climbs above the Field group.

## What changed between drafts?

1. Draft 2 went back to the user's `TD`. The check reported `0 layout problem(s)`; the picture was 910 by 1,107 pixels, taller than wide.
2. Draft 3 is JSON, because open-diagram places the boxes of a Mermaid file itself. The steps sit in five columns, up to three deep, and the subgraphs became groups. The check reported `0 layout problem(s)`.

## What was the result?

Three rounds: three drafts, three runs of the check, 0 layout problems each time.


```json
{
  "title": "How Quillfern handles a repair request",
  "columns": [
    [{"id": "book", "title": "Customer books a repair"},
     {"id": "known", "title": "Job type known?"},
     {"id": "call", "title": "Call the customer"}],
    [{"id": "match", "title": "Match a fixer"}],
    [{"id": "accepts", "title": "Fixer accepts the job"},
     {"id": "visit", "title": "Visit and repair"},
     {"id": "second", "title": "Send a second fixer"}],
    [{"id": "happy", "title": "Customer happy?"}],
    [{"id": "review", "title": "Ask for a review"},
     {"id": "pay", "title": "Take payment"},
     {"id": "invoice", "title": "Text the invoice"}]
  ],
  "groups": [
    {"label": "Office", "members": ["book", "known", "call", "match"]},
    {"label": "Field", "members": ["accepts", "visit", "second", "happy"]}
  ],
  "links": [
    {"from": "book", "to": "known", "start": "bottom", "end": "top"},
    {"from": "known", "to": "call", "start": "bottom", "end": "top", "label": "No"},
    {"from": "known", "to": "match", "label": "Yes"},
    {"from": "call", "to": "match"},
    {"from": "match", "to": "accepts"},
    {"from": "accepts", "to": "visit", "start": "bottom", "end": "top"},
    {"from": "visit", "to": "happy"},
    {"from": "happy", "to": "second", "start": "bottom", "end": "right", "label": "No"},
    {"from": "second", "to": "visit", "start": "top", "end": "bottom"},
    {"from": "happy", "to": "pay", "label": "Yes"},
    {"from": "pay", "to": "review", "start": "top", "end": "bottom"},
    {"from": "pay", "to": "invoice", "start": "bottom", "end": "top", "kind": "planned"}
  ]
}

```

![How Quillfern handles a repair request](https://open-diagram.dev/images/pages/prompts-mermaid-flowchart-to-slide-2.svg)

The check: 0 layout problems


The picture is 1,388 by 472 pixels, still about three times as wide as tall. It is 27 percent narrower than the first draft, so at the same slide width its text is 36 percent larger.

Every node, line and label from the flowchart is there, and the dotted line is a planned connection. The diamonds are gone: open-diagram draws every node as the same box, so the question marks in the titles mark the decisions.

Drawn by Claude Opus 5.5 on November 25, 2026, with open-diagram 0.6.2's check command, the same check the MCP server's check tool runs.

Updated November 25, 2026. Web page: https://open-diagram.dev/prompts/mermaid-flowchart-to-slide.html

See also:

- [open-diagram vs Mermaid for architecture diagrams](https://open-diagram.dev/compare/mermaid.md)
- [Draw architecture diagrams with Claude Code and an MCP server](https://open-diagram.dev/guides/draw-diagrams-with-claude-code.md)
- [open-diagram MCP tools: names, arguments and results](https://open-diagram.dev/for-agents/mcp-tools.md)
