dialogue-graph
A library for building, validating, visualizing, and serializing dialogue graphs. Use this when parsing scripts or creating branching narrative structures.
Install / Use
npx skills add benchflow-ai/skillsbench --skill dialogue-graphInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OtherSupported Platforms
Tags
Our assessment of dialogue-graph
dialogue-graph scores 83/100 on our quality scale, 157th of 230 Other skills we index.
Its SKILL.md is 2.3 KB long, well organised into 21 sections with 8 code examples: moderately detailed.
With 1,813 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so dialogue-graph is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
dialogue-graph compared with similar skills
All 4 of these similar skills score higher than dialogue-graph; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| dialogue-graph (this skill)by benchflow-ai | 83 | 1.8k | 2mo ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 9d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 9d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 11d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 11d ago | SKILL.md |
Frequently asked questions
- How do I install dialogue-graph?
- Run
npx skills add benchflow-ai/skillsbench --skill dialogue-graph. The install tabs above show the steps for each supported agent. - Which AI agents does dialogue-graph work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is dialogue-graph safe to use?
- It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is dialogue-graph still maintained?
- The repository was last updated about 2 months ago, so dialogue-graph is actively maintained.
Skill content
View source on GitHubname: dialogue-graph description: A library for building, validating, visualizing, and serializing dialogue graphs. Use this when parsing scripts or creating branching narrative structures.
Dialogue Graph Skill
This skill provides a dialogue_graph module to easily build valid dialogue trees/graphs.
When to use
- Script Parsers: When converting text to data.
- Dialogue Editors: When building tools to edit conversation flow.
- Game Logic: When traversing a dialogue tree.
- Visualization: When generating visual diagrams of dialogue flows.
How to use
Import the module:
from dialogue_graph import Graph, Node, Edge
1. The Graph Class
The main container.
graph = Graph()
2. Adding Nodes
Define content nodes.
# Regular line
graph.add_node(Node(id="Start", speaker="Guard", text="Halt!", type="line"))
# Choice hub
graph.add_node(Node(id="Choices", type="choice"))
3. Adding Edges
Connect nodes (transitions).
# Simple transition
graph.add_edge(Edge(source="Start", target="Choices"))
# Choice transition (with text)
graph.add_edge(Edge(source="Choices", target="End", text="1. Run away"))
4. Export
Serialize to JSON format for the engine.
data = graph.to_dict()
# returns {"nodes": [...], "edges": [...]}
json_str = graph.to_json()
5. Validation
Check for integrity.
errors = graph.validate()
# Returns list of strings, e.g., ["Edge 'Start'->'Unk' points to missing node 'Unk'"]
6. Visualization
Generate a PNG/SVG graph diagram.
# Requires: pip install graphviz
# Also requires Graphviz binary: https://graphviz.org/download/
graph.visualize('dialogue_graph') # Creates dialogue_graph.png
graph.visualize('output', format='svg') # Creates output.svg
The visualization includes:
- Diamond shapes for choice nodes (light blue)
- Rounded boxes for dialogue nodes (colored by speaker)
- Bold blue edges for skill-check choices like
[Lie],[Attack] - Gray edges for regular choices
- Black edges for simple transitions
7. Loading from JSON
Load an existing dialogue graph.
# From file
graph = Graph.from_file('dialogue.json')
# From dict
graph = Graph.from_dict({'nodes': [...], 'edges': [...]})
# From JSON string
graph = Graph.from_json(json_string)
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
