graphviz
Generate GraphViz DOT files (.dot) for directed/undirected graphs, hierarchical layouts, network diagrams, dependency graphs, state machines, and complex graph visualizations. Use when precise node positioning is needed, when rendering to PNG/SVG/PDF is required, when complex graph algorithms (clustering, ranking) are needed, or when dealing with large graphs (100+ nodes). Triggers on requests mentioning GraphViz, DOT language, network diagrams, dependency graphs, or when sophisticated graph layout is required.
What this skill does
# GraphViz DOT Generation
Generate graph descriptions using DOT language. GraphViz provides powerful automatic layout algorithms for complex graphs.
## Quick Start
Minimal directed graph:
```dot
digraph G {
A -> B -> C;
}
```
## Output Formats
1. **DOT file** - `.dot` extension for source
2. **Rendered images** - Use Bash to render:
```bash
dot -Tpng graph.dot -o graph.png
dot -Tsvg graph.dot -o graph.svg
dot -Tpdf graph.dot -o graph.pdf
```
## Workflow
1. **Choose graph type** - `digraph` (directed) or `graph` (undirected)
2. **Define structure** - Nodes and edges
3. **Apply attributes** - Styling and layout hints
4. **Write file** - Save as `.dot`
5. **Render** (optional) - Convert to image format
## Graph Types
### Directed Graph (digraph)
```dot
digraph ProcessFlow {
rankdir=LR;
start [shape=circle, style=filled, fillcolor=green];
end [shape=doublecircle, style=filled, fillcolor=red];
start -> process1 -> decision;
decision -> process2 [label="yes"];
decision -> process3 [label="no"];
process2 -> end;
process3 -> end;
}
```
### Undirected Graph (graph)
```dot
graph Network {
layout=neato;
overlap=false;
server [shape=box3d];
client1 -- server;
client2 -- server;
client3 -- server;
client1 -- client2 [style=dashed];
}
```
## Common Patterns
### Hierarchical Layout (Default)
```dot
digraph Hierarchy {
rankdir=TB;
node [shape=box];
CEO -> {VP1, VP2, VP3};
VP1 -> {M1, M2};
VP2 -> {M3, M4};
VP3 -> {M5, M6};
}
```
### Dependency Graph
```dot
digraph Dependencies {
rankdir=LR;
node [shape=box, style=rounded];
app -> {libA, libB, libC};
libA -> {libD, libE};
libB -> libD;
libC -> libE;
}
```
### State Machine
```dot
digraph StateMachine {
rankdir=LR;
node [shape=circle];
start [shape=point];
end [shape=doublecircle];
start -> idle;
idle -> running [label="start"];
running -> paused [label="pause"];
paused -> running [label="resume"];
running -> idle [label="stop"];
idle -> end [label="exit"];
}
```
### Network Topology
```dot
graph Topology {
layout=fdp;
overlap=false;
splines=true;
subgraph cluster_dc1 {
label="Data Center 1";
style=dashed;
router1 [shape=box3d];
server1a, server1b;
}
subgraph cluster_dc2 {
label="Data Center 2";
style=dashed;
router2 [shape=box3d];
server2a, server2b;
}
internet [shape=cloud];
router1 -- server1a;
router1 -- server1b;
router2 -- server2a;
router2 -- server2b;
router1 -- internet;
router2 -- internet;
}
```
### Record-Based Nodes (Structs)
```dot
digraph Structs {
node [shape=record];
struct1 [label="{Name|{Field1|Field2|Field3}}"];
struct2 [label="{<f0>Head|{<f1>Left|<f2>Right}}"];
struct2:f1 -> struct1;
struct2:f2 -> struct1;
}
```
## Node Shapes
| Shape | Use Case |
|-------|----------|
| `box` | Process, component |
| `ellipse` | Default, general |
| `circle` | State, small node |
| `doublecircle` | Final state |
| `diamond` | Decision |
| `record` | Data structure |
| `Mrecord` | Rounded record |
| `box3d` | Server, database |
| `cylinder` | Database |
| `folder` | Directory |
| `note` | Comment |
| `tab` | Tab/window |
| `house` | Home/start |
| `invhouse` | Inverted house |
| `polygon` | Custom (sides=N) |
| `point` | Tiny/start point |
| `plaintext` | Text only |
## Edge Attributes
```dot
digraph Edges {
A -> B [label="labeled"];
A -> C [style=dashed];
A -> D [style=dotted];
A -> E [style=bold];
A -> F [color=red];
A -> G [penwidth=3];
A -> H [arrowhead=none];
A -> I [arrowhead=diamond];
A -> J [dir=both];
A -> K [constraint=false]; // Don't affect rank
}
```
## Subgraphs and Clusters
```dot
digraph Clusters {
subgraph cluster_0 {
label="Cluster A";
style=filled;
color=lightgrey;
a0 -> a1 -> a2;
}
subgraph cluster_1 {
label="Cluster B";
color=blue;
b0 -> b1 -> b2;
}
a2 -> b0;
}
```
Note: Subgraphs named `cluster_*` are drawn as boxes.
## Layout Engines
| Engine | Use Case |
|--------|----------|
| `dot` | Hierarchical (default) |
| `neato` | Spring model, undirected |
| `fdp` | Force-directed |
| `sfdp` | Large graph force-directed |
| `circo` | Circular layout |
| `twopi` | Radial layout |
Select via:
```dot
digraph G {
layout=neato;
// or use command: neato -Tpng graph.dot -o graph.png
}
```
## Rendering Commands
```bash
# Basic PNG
dot -Tpng input.dot -o output.png
# SVG for web
dot -Tsvg input.dot -o output.svg
# PDF for documents
dot -Tpdf input.dot -o output.pdf
# High-resolution PNG
dot -Tpng -Gdpi=300 input.dot -o output.png
# Using different layout engine
neato -Tpng input.dot -o output.png
fdp -Tpng input.dot -o output.png
# Validate syntax
dot -Tcanon input.dot
# Debug layout
dot -v input.dot
```
## Critical Rules
1. **Semicolons** - Optional but recommended for clarity
2. **Quotes** - Use for labels with spaces/special chars
3. **IDs** - No spaces, or use quotes: `"Node Name"`
4. **Attributes** - In square brackets: `[attr=value]`
5. **Cluster naming** - Must start with `cluster_` to be boxed
6. **Edge syntax** - `->` for digraph, `--` for graph
## When to Use GraphViz
- Complex dependency graphs
- Large graphs with many nodes
- Network topology diagrams
- State machines and automata
- When precise layout control is needed
- When rendering to image files is required
- Hierarchical structures (org charts, trees)
- When automatic layout is preferred over manual
## References
See `references/dot-syntax.md` for complete attribute reference.
See `references/layout-engines.md` for detailed layout engine comparison.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.