npx skills add https://github.com/markdown-viewer/skills --skill graphviz重要提示: 使用
dot` 作为代码围栏标识符,而不是graphviz`。
快速开始: 选择 digraph(有向图)或 graph(无向图)→ 定义带属性(形状、颜色、标签)的节点 → 使用 -> 或 -- 连接 → 设置布局(rankdir, spacing)→ 用 ````dot 围栏包裹。默认:从上到下(rankdir=TB),集群名称必须以 cluster_` 开头,使用分号。
❌ subgraph backend { } → 不会渲染为方框
✅ subgraph cluster_backend { } → 必须以 cluster_ 开头
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
❌ API Gateway [label="API"]; → 无效的 ID
✅ "API Gateway" [label="API"]; → 为 ID 加上引号
✅ api_gateway [label="API Gateway"]; → 使用下划线 ID
digraph: A -> B; → 有向箭头
graph: A -- B; → 无向线
❌ node [shape=box color=red] → 缺少逗号
✅ node [shape=box, color=red]; → 用逗号分隔
✅ 使用 shape=plaintext 用于 HTML 标签
✅ 使用 < > 而不是 " " 来包裹 HTML 内容
| 问题 | 解决方案 |
|---|---|
| 节点重叠 | 增加 nodesep 和 ranksep |
| 布局不佳 | 更改 rankdir 或添加 {rank=same} |
| 边交叉 | 使用 splines=ortho 或调整节点顺序 |
| 集群未显示 | 名称必须以 cluster_ 开头 |
| 标签未显示 | 检查引号转义 |
```dot
digraph G {
[图表代码]
}
```
如需高级布局控制和复杂样式,请参考以下参考资料:
每周安装量
84
代码仓库
GitHub 星标数
5
首次出现
2026 年 1 月 31 日
安全审计
安装于
opencode81
gemini-cli80
github-copilot80
codex79
kimi-cli77
amp77
Important: Use
dot` as the code fence identifier, NOTgraphviz`.
Quick Start: Choose digraph (directed) or graph (undirected) → Define nodes with attributes (shape, color, label) → Connect with -> or -- → Set layout (rankdir, spacing) → Wrap in ````dot fence. Default: top-to-bottom (rankdir=TB), cluster names must start with cluster_`, use semicolons.
❌ subgraph backend { } → Won't render as box
✅ subgraph cluster_backend { } → Must start with cluster_
❌ API Gateway [label="API"]; → Invalid ID
✅ "API Gateway" [label="API"]; → Quote the ID
✅ api_gateway [label="API Gateway"]; → Use underscore ID
digraph: A -> B; → Directed arrow
graph: A -- B; → Undirected line
❌ node [shape=box color=red] → Missing comma
✅ node [shape=box, color=red]; → Comma separated
✅ shape=plaintext for HTML labels
✅ Use < > not " " for HTML content
| Issue | Solution |
|---|---|
| Nodes overlapping | Increase nodesep and ranksep |
| Poor layout | Change rankdir or add {rank=same} |
| Edges crossing | Use splines=ortho or adjust node order |
| Cluster not showing | Name must start with cluster_ |
| Label not displaying | Check quote escaping |
```dot
digraph G {
[diagram code]
}
```
For advanced layout control and complex styling, refer to references below:
Weekly Installs
84
Repository
GitHub Stars
5
First Seen
Jan 31, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode81
gemini-cli80
github-copilot80
codex79
kimi-cli77
amp77
Claude技能创建器指南:构建模块化AI技能包,优化工作流与工具集成
5,700 周安装
Intercom自动化指南:通过Rube MCP与Composio实现客户支持对话管理
69 周安装
二进制初步分析指南:使用ReVa工具快速识别恶意软件与逆向工程
69 周安装
PrivateInvestigator 道德人员查找工具 | 公开数据调查、反向搜索与背景研究
69 周安装
TorchTitan:PyTorch原生分布式大语言模型预训练平台,支持4D并行与H100 GPU加速
69 周安装
screenshot 截图技能:跨平台桌面截图工具,支持macOS/Linux权限管理与多模式捕获
69 周安装
tmux进程管理最佳实践:交互式Shell初始化、会话命名与生命周期管理
69 周安装