Back to Skills

graphviz

Create directed/undirected graphs using DOT language with automatic layout. Best for dependency trees, call graphs, package hierarchies, and module relationships requiring fine-grained edge routing.

2,884stars171forksUpdated 6/2/2026

Security Assessment

Safe(100/100)
Security Score100/100

About graphviz

The graphviz skill generates directed and undirected diagrams using the Graphviz DOT language with automatic layout handling. It is designed to help users create structured visual representations of relationships, dependencies, and hierarchies without manually positioning elements. The skill focuses on producing DOT-based diagrams that support clear edge routing and organized layouts, making it suitable for technical diagrams such as dependency trees, call graphs, package hierarchies, and module relationship maps. It also emphasizes correct DOT syntax usage, including graph types, node definitions, cluster naming conventions, and edge syntax.

The skill provides guidance for building DOT diagrams with proper formatting and rendering behavior. It supports directed graphs using `digraph` and undirected graphs using `graph`, along with node attributes such as shape, color, and labels. The documentation highlights critical syntax rules, including cluster naming requirements, quoted node identifiers, comma-separated attributes, and HTML label formatting. It also includes recommendations for improving diagram readability through layout controls such as `rankdir`, `nodesep`, `ranksep`, and spline configuration. The skill standardizes output formatting by requiring diagrams to be wrapped in `dot` code fences.

This skill is useful for software developers, technical writers, architects, and engineering teams who need to document system structures and relationships visually. Common use cases include generating architecture diagrams, dependency graphs, workflow maps, module relationships, and package organization charts. It is particularly valuable for users who need fine-grained control over diagram layout while maintaining compatibility with Graphviz rendering tools and Markdown-based documentation workflows.

FAQ

What code fence should be used for Graphviz diagrams?

The skill requires diagrams to be wrapped using the `dot` code fence identifier, not `graphviz`.

How do I create directed versus undirected graphs?

Use `digraph` with the `->` edge operator for directed graphs, and use `graph` with the `--` operator for undirected graphs.

Why is my cluster not rendering as a box?

Cluster subgraph names must start with the `cluster_` prefix for Graphviz to render them as clusters.

How can I improve overlapping nodes or poor layout?

You can increase `nodesep` and `ranksep`, change `rankdir`, use `{rank=same}`, or adjust spline settings such as `splines=ortho`.

Are node IDs with spaces supported?

Yes, but node IDs containing spaces must be quoted, or you can use underscore-based identifiers with separate labels.

All Files

2 files
references/syntax.md5.1 KB
View
SKILL.md2.2 KB
View

Install graphviz

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill