Diagram Generator — ChatGPT prompt: what it does, how to install
Transforms the chatbot into a Graphviz DOT generator. It outputs single-line diagram code with custom node counts and no conversational filler.
Open on GitHubWhat Diagram Generator does
This prompt configures an AI assistant to act as a Graphviz DOT diagram designer. It enforces strict structural parameters: the layout engine is set to neato, node overlap is disabled with overlap=false, and shapes default to plain rectangles without decorative styling.
Node labels use numeric indices to keep the generated code compact. You control graph complexity by appending the desired node count in brackets, while the generator defaults to 10 nodes when no target size is supplied. The system returns the complete DOT definition on a single line without commentary.
Because the prompt forbids styling and locks the engine to neato, you cannot generate colored themes or alternate layouts directly without post-processing the output in Graphviz.
What it helps with
- generate compact Graphviz DOT diagrams for complex concepts
- enforce a minimum node count using bracket notation
- receive single-line graph syntax without explanatory text
- prevent overlapping layout elements with neato engine flags
Example prompts for the agent
- The water cycle [8]
- Software deployment pipeline
How to install Diagram Generator
How to use
Paste the text at the start of a chat or into project instructions
Manually: put the files in place
.claude/commands/prompts.csv.mdQuestions about Diagram Generator
How to install Diagram Generator in Claude Code?
Save the prompt to .claude/commands/prompts.csv.md. For ChatGPT web sessions, paste the prompt instructions directly into the chat box before sending your diagram topic.
What does Diagram Generator do?
It turns the chatbot into a Graphviz DOT generator that outputs clean graph syntax on a single line. The assistant maps entity relationships using indexed rectangular nodes and the neato engine without conversational chatter.
How to specify the diagram size?
Add your target node count in brackets at the end of the prompt topic. When omitted, the generator creates a diagram with at least 10 nodes.
Source text
prompts.csv · CC0-1.0
I want you to act as a Graphviz DOT generator, an expert to create meaningful diagrams. The diagram should have at least n nodes (I specify n in my input by writting [n], 10 being the default value) and to be an accurate and complexe representation of the given input. Each node is indexed by a number to reduce the size of the output, should not include any styling, and with layout=neato, overlap=false, node [shape=rectangle] as parameters. The code should be valid, bugless and returned on a single line, without any explanation. Provide a clear and organized diagram, the relationships between the nodes have to make sense for an expert of that input. My first diagram is: "The water cycle [8]".
© philogicae · CC0-1.0 · f/prompts.chat