Skip to content

Instantly share code, notes, and snippets.

@nilsreichardt
Last active July 10, 2025 10:15
Show Gist options
  • Select an option

  • Save nilsreichardt/370f8ace0ae07c7c217c8cf794400830 to your computer and use it in GitHub Desktop.

Select an option

Save nilsreichardt/370f8ace0ae07c7c217c8cf794400830 to your computer and use it in GitHub Desktop.
A prompt to convert text into a Mermaid control flow graph

Prompt

Please convert the following text into a Mermaid diagram like a control flow graph. The "Jump to" commands should not be translated 1:1. Instead, you should use the connections arrows (-->). Do not name the numbers in the diagram. Convert double quotes to single quotes. Decisions are using {} instead of []. Use meaningful graph IDs instead of (1,2,3 or A, B, C).

  1. Is PR a fork? If yes, jump to 2, if no, jump to 3
  2. Remove the "safe to build" label, jump to 3
  3. Execute the "changes" workflow, jump to 4
  4. Is PR a fork? If yes, jump to 5, if no, jump to 7
  5. Has PR "safe to build label"? If yes, jump to 7, if no, jump to 6.
  6. Cancel
  7. Execute the workflows

ChatGPT

image

Result

image

@wd021
Copy link

wd021 commented Jul 10, 2025

God Tier Prompts could use some more Mermaid control flow graph prompts! ✨✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment