Skip to Content
ScribeKey Docs
All skills

Flowchart

What the Flowchart Skill writes, the apps it suits, and the instructions it follows.

Steps and decisions as a flowchart. Turns a process or a choice someone talked through into a diagram; use after explaining how something works or what to do when.

  • Version: 1.2.0
  • Catalogue name: flowchart

Example

Input:

so when a return comes in first we check the receipt if there’s no receipt we offer store credit only if there is a receipt we check whether it’s within thirty days if it is we refund to the card otherwise it’s store credit too and then either way we log it in the returns sheet

Output, drawn as a diagram:

NoYesYesNoHas a receipt?Offer store credit onlyWithin 30 days?Refund to the cardLog it in the returns sheet

Instructions

These are the instructions the Skill follows, as the catalogue publishes them.

Draw the process or decision in the text as a Mermaid flowchart someone can follow on a phone screen.

1. The first line is `flowchart TD`. The output is Mermaid source and nothing else: no code fence, no line before or after it.
2. One node per step, in the order the speaker gave them. Give each node a short id (`n1`, `n2`…) and its words in double quotes: `n2["Check the order number"]`. A step starts with its verb, or with who acts when several people do, and keeps to six words, in the speaker's terms.
3. The step the process starts from and every final outcome, a step no arrow leaves, are stadiums: `n1(["Customer reports a fault"])`. Those are the only stadiums: a step with an arrow in and an arrow out is a rectangle, however important it is. A process that opens with a question starts at its diamond.
4. A question or choice is a diamond holding a short question of five words at most, `n3{"Under warranty?"}`, with one labelled arrow per answer: `n3 -->|"Yes"| n4`. Plain steps join with `-->`.
5. Where paths meet again, point them at the same node rather than repeating it. The chart is one piece: following the arrows from the first node reaches every other node.
6. Inside a label, write a double quote as `#quot;`. Leave out styling, colours, themes, links, click actions, images, comments and `%%` lines; ScribeKey draws the diagram.

A long session keeps the main path: at most 25 nodes, merging small steps into the one they belong to and leaving out asides. A talk or lesson that covers several separate processes gets the one the speaker spent longest on, and the others stay out. When the text describes a single step, the chart is that one stadium. When it describes no process at all, the chart is one stadium naming its topic.

Example of the shape only; its steps are not in the text:
flowchart TD
    n1(["Customer reports a fault"]) --> n2{"Under warranty?"}
    n2 -->|"Yes"| n3["Book a repair"]
    n2 -->|"No"| n4["Send a quote"]
    n4 --> n3
    n3 --> n5(["Close the ticket"])

Check: the source starts with `flowchart TD`, every label is in double quotes, every node can be reached from the first, the first step and every final outcome are stadiums and no other step is, each decision is a short question and each step six words at most, every step and decision the speaker gave appears once, there are no more than 25 nodes, and nothing appears that the speaker did not say.

Every name, number, date and fact comes from the text exactly as given, in the language of the text.

View on GitHub