Token导航 LogoToken导航TokenDH.com
前端设计执行命令github未标认证来源可访问clear审计通过

graphviz-diagrams图形可视化图

Agent Skill

graphviz-diagrams 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

760

周安装

32

GitHub Stars

2

下载量

266
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:graphviz-diagrams(图形可视化图)
来源仓库:https://github.com/mindmorass/reflex
仓库路径:skills/graphviz-diagrams
安装命令:
npx skills add https://github.com/mindmorass/reflex --skill graphviz-diagrams
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/mindmorass/reflex --skill graphviz-diagrams

简介

用于生成基于 Graphviz 的流程图与结构可视化图表。

  • 适合展示系统架构、数据流向或组件依赖关系。graphviz-diagrams 属于前端设计类 Skill,可作为该场景下的辅助能力补充。
  • 使用时需提供节点列表、边关系或 DOT 语言草稿。
  • 可自动渲染为 PNG/SVG 并提供布局优化建议。
  • 安装前请确认是否允许写入临时图片文件到本地目录。

SKILL.md

Graphviz Diagrams Skill

Purpose

Create complex graph visualizations using Graphviz DOT language, with both source code and pre-rendered images.

When to Use

  • Complex dependency graphs
  • Call graphs and code flow
  • Network topologies
  • Hierarchical structures
  • State machines with complex transitions
  • Any graph needing precise layout control

Output Format

Every Graphviz diagram should include:

  1. Inline DOT source - For reference and future editing
  2. Pre-rendered image - For viewing in any markdown renderer

Document Structure

## Diagram: [Name]

### Source

digraph G { A -> B }


### Rendered
![Diagram Name](./attachments/diagram-name.png)

Rendering Workflow

Step 1: Write DOT Source

dot_source = """
digraph G {
    rankdir=LR;
    A -> B -> C;
}
"""

Step 2: Render to Image

import subprocess
from pathlib import Path

def render_graphviz(
    dot_source: str,
    output_path: Path,
    format: str = "png",
    engine: str = "dot"
) -> Path:
    """
    Render DOT source to image file.

    Args:
        dot_source: DOT language source code
        output_path: Output file path (without extension)
        format: Output format (png, svg, pdf)
        engine: Layout engine (dot, neato, fdp, circo, twopi, sfdp)

    Returns:
        Path to rendered image
    """
    output_file = output_path.with_suffix(f".{format}")

    result = subprocess.run(
        [engine, f"-T{format}", "-o", str(output_file)],
        input=dot_source,
        text=True,
        capture_output=True
    )

    if result.returncode != 0:
        raise RuntimeError(f"Graphviz error: {result.stderr}")

    return output_file

Step 3: Embed in Markdown

def create_diagram_markdown(
    name: str,
    dot_source: str,
    image_path: str
) -> str:
    """Create markdown with both source and rendered image."""
    return f"""## Diagram: {name}

### Source

{dot_source}


### Rendered

![{name}](/api/image-proxy?url=https%3A%2F%2Fgithub.com%2Fmindmorass%2Freflex%2Fblob%2FHEAD%2Fplugins%2Freflex%2Fskills%2Fgraphviz-diagrams%2F%257Bimage_path%257D&s=eaa626c800f703e4) """

DOT Language Reference

Basic Graph Types

Directed Graph (digraph)

digraph G {
    A -> B;
    B -> C;
    A -> C;
}

Undirected Graph (graph)

graph G {
    A -- B;
    B -- C;
    A -- C;
}

Graph Attributes

digraph G {
    // Graph attributes
    rankdir=LR;           // Direction: TB, BT, LR, RL
    splines=ortho;        // Edge style: line, polyline, curved, ortho, spline
    nodesep=0.5;          // Space between nodes
    ranksep=1.0;          // Space between ranks
    bgcolor="white";      // Background color
    fontname="Helvetica"; // Font for labels

    // Nodes and edges
    A -> B;
}

Node Attributes

digraph G {
    // Node defaults
    node [shape=box, style=filled, fillcolor=lightblue];

    // Individual node styling
    A [label="Start", shape=ellipse, fillcolor=green];
    B [label="Process
Data", shape=box];
    C [label="Decision", shape=diamond, fillcolor=yellow];
    D [label="End", shape=ellipse, fillcolor=red];

    A -> B -> C;
    C -> D;
}

Common Node Shapes

ShapeUse Case
boxProcess, action
ellipseStart/end, terminal
diamondDecision
circleState
recordStructured data
MrecordRounded record
cylinderDatabase
folderDirectory/collection
componentComponent
noteAnnotation

Edge Attributes

digraph G {
    // Edge defaults
    edge [color=gray, fontsize=10];

    A -> B [label="step 1", color=blue, penwidth=2];
    B -> C [label="step 2", style=dashed];
    C -> D [label="step 3", arrowhead=empty];
    D -> A [label="loop", style=dotted, constraint=false];
}

Arrow Styles

ArrowheadDescription
normalFilled triangle (default)
emptyOpen triangle
dotFilled circle
odotOpen circle
diamondFilled diamond
noneNo arrowhead
veeV-shape
boxFilled square

Subgraphs and Clusters

digraph G {
    // Cluster (named subgraph with cluster_ prefix)
    subgraph cluster_frontend {
        label="Frontend";
        style=filled;
        fillcolor=lightgray;

        UI -> Components -> State;
    }

    subgraph cluster_backend {
        label="Backend";
        style=filled;
        fillcolor=lightyellow;

        API -> Service -> Database;
    }

    // Cross-cluster edges
    State -> API [label="HTTP"];
}

Records (Structured Nodes)

digraph G {
    node [shape=record];

    user [label="User|{id: int|name: string|email: string}"];
    order [label="Order|{id: int|user_id: int|total: decimal}"];

    user -> order [label="1:N"];
}

HTML Labels

digraph G {
    node [shape=none];

    table [label=<
        <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
            <TR><TD BGCOLOR="lightblue"><B>User</B></TD></TR>
            <TR><TD ALIGN="LEFT">id: int</TD></TR>
            <TR><TD ALIGN="LEFT">name: string</TD></TR>
            <TR><TD ALIGN="LEFT">email: string</TD></TR>
        </TABLE>
    >];
}

Layout Engines

EngineBest ForDescription
dotHierarchiesDirected graphs, trees, DAGs
neatoNetworksUndirected graphs, spring model
fdpLarge networksForce-directed, scalable
sfdpVery largeMultiscale force-directed
circoCircularCircular layouts
twopiRadialRadial layouts from root

Usage

# Different engines produce different layouts
dot -Tpng graph.dot -o graph-hierarchical.png
neato -Tpng graph.dot -o graph-spring.png
circo -Tpng graph.dot -o graph-circular.png

Common Patterns

Dependency Graph

digraph Dependencies {
    rankdir=BT;
    node [shape=box, style=filled, fillcolor=lightblue];

    // Packages
    app [label="app"];
    api [label="api"];
    core [label="core"];
    utils [label="utils"];
    db [label="database"];

    // Dependencies (arrows point to dependency)
    app -> api;
    app -> core;
    api -> core;
    api -> db;
    core -> utils;
    db -> utils;
}

State Machine

digraph StateMachine {
    rankdir=LR;
    node [shape=circle];

    // Start state
    start [shape=point, width=0.2];

    // States
    idle [label="Idle"];
    loading [label="Loading"];
    success [label="Success", shape=doublecircle];
    error [label="Error"];

    // Transitions
    start -> idle;
    idle -> loading [label="fetch()"];
    loading -> success [label="200 OK"];
    loading -> error [label="error"];
    error -> idle [label="retry()"];
    success -> idle [label="reset()"];
}

Call Graph

digraph CallGraph {
    rankdir=TB;
    node [shape=box, fontname="Courier"];

    main [style=filled, fillcolor=lightgreen];
    main -> init;
    main -> process;
    main -> cleanup;

    init -> loadConfig;
    init -> connectDB;

    process -> validateInput;
    process -> transform;
    process -> save;

    transform -> normalize;
    transform -> enrich;

    save -> connectDB [style=dashed, label="reuse"];
}

Network Topology

graph Network {
    layout=neato;
    overlap=false;
    node [shape=box];

    // Nodes
    internet [shape=cloud, label="Internet"];
    firewall [shape=box3d, label="Firewall"];
    lb [label="Load
Balancer"];
    web1 [label="Web 1"];
    web2 [label="Web 2"];
    app1 [label="App 1"];
    app2 [label="App 2"];
    db [shape=cylinder, label="Database"];

    // Connections
    internet -- firewall;
    firewall -- lb;
    lb -- web1;
    lb -- web2;
    web1 -- app1;
    web1 -- app2;
    web2 -- app1;
    web2 -- app2;
    app1 -- db;
    app2 -- db;
}

Entity Relationship

digraph ERD {
    rankdir=LR;
    node [shape=record, fontname="Helvetica"];
    edge [arrowhead=none];

    user [label="<pk> User|id: PK\lname: string\lemail: string\l"];
    order [label="<pk> Order|id: PK\luser_id: FK\ltotal: decimal\l"];
    item [label="<pk> OrderItem|id: PK\lorder_id: FK\lproduct_id: FK\l"];
    product [label="<pk> Product|id: PK\lname: string\lprice: decimal\l"];

    user:pk -> order:pk [label="1:N", arrowhead=crow];
    order:pk -> item:pk [label="1:N", arrowhead=crow];
    product:pk -> item:pk [label="1:N", arrowhead=crow];
}

Flowchart

digraph Flowchart {
    rankdir=TB;
    node [fontname="Helvetica"];

    start [shape=ellipse, label="Start", style=filled, fillcolor=lightgreen];
    input [shape=parallelogram, label="Get Input"];
    validate [shape=diamond, label="Valid?"];
    process [shape=box, label="Process Data"];
    error [shape=box, label="Show Error", style=filled, fillcolor=lightyellow];
    output [shape=parallelogram, label="Output Result"];
    end [shape=ellipse, label="End", style=filled, fillcolor=lightcoral];

    start -> input;
    input -> validate;
    validate -> process [label="Yes"];
    validate -> error [label="No"];
    error -> input;
    process -> output;
    output -> end;
}

Integration with Publishers

Obsidian Integration

def publish_graphviz_to_obsidian(
    vault_path: str,
    folder: str,
    filename: str,
    diagram_name: str,
    dot_source: str
):
    """Publish Graphviz diagram to Obsidian with source and image."""
    from pathlib import Path

    vault = Path(vault_path)
    target_dir = vault / folder
    attachments_dir = vault / "attachments"

    target_dir.mkdir(parents=True, exist_ok=True)
    attachments_dir.mkdir(parents=True, exist_ok=True)

    # Render image
    image_name = f"{filename}-diagram.png"
    image_path = attachments_dir / image_name
    render_graphviz(dot_source, image_path.with_suffix(""), "png")

    # Create markdown with both source and image
    content = f"""# {diagram_name}

## Source

{dot_source}


## Rendered

![[{image_name}]] """

note_path = target_dir / f"{filename}.md" note_path.write_text(content)

Joplin Integration

def publish_graphviz_to_joplin(
    notebook: str,
    title: str,
    diagram_name: str,
    dot_source: str
):
    """Publish Graphviz diagram to Joplin with source and image."""
    import tempfile
    from pathlib import Path

    with tempfile.TemporaryDirectory() as tmpdir:
        tmpdir = Path(tmpdir)

        # Render image
        image_path = tmpdir / "diagram.png"
        render_graphviz(dot_source, image_path.with_suffix(""), "png")

        # Create markdown
        content = f"""# {diagram_name}

## Source

{dot_source}


## Rendered

![{diagram_name}](/api/image-proxy?url=https%3A%2F%2Fgithub.com%2Fmindmorass%2Freflex%2Fblob%2FHEAD%2Fplugins%2Freflex%2Fskills%2Fgraphviz-diagrams%2F.%2Fdiagram.png&s=6d86d6e5a149920e) """

md_path = tmpdir / f"{title}.md" md_path.write_text(content)

# Import to Joplin (imports markdown and referenced images) subprocess.run([ "joplin", "import", str(tmpdir), "--notebook", notebook ], check=True)

Graphviz vs Mermaid

FeatureGraphvizMermaid
Layout controlPrecise, many enginesAutomatic only
ComplexityHandles very large graphsBetter for simpler diagrams
RenderingExternal tool requiredBrowser-native
StylingExtensive optionsLimited but sufficient
Learning curveSteeperEasier
Use caseComplex dependencies, call graphsQuick diagrams, sequences

Use Graphviz when:

  • You need precise layout control
  • Graph is large or complex
  • You need specific node arrangements
  • Creating dependency or call graphs

Use Mermaid when:

  • Quick inline diagrams
  • Sequence diagrams
  • Simple flowcharts
  • Native browser rendering preferred

Prerequisites

Install Graphviz

# macOS
brew install graphviz

# Ubuntu/Debian
sudo apt-get install graphviz

# Windows (chocolatey)
choco install graphviz

# Verify installation
dot -V

Checklist

Before creating Graphviz diagrams:

  • Graphviz installed (dot -V)
  • Output directory writable
  • DOT syntax validated
  • Appropriate layout engine selected
  • Both source and image included in output
  • Image path correct for target (Obsidian/Joplin)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.14%
按下载量换算75

Gemini CLI

23.92%
按下载量换算64

Antigravity

17.26%
按下载量换算46

windsurf

11.92%
按下载量换算32

trae

8.15%
按下载量换算22

Codex

2.94%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/mindmorass/reflex --skill graphviz-diagrams;npx skills add mindmorass/reflex --skill "graphviz-diagrams" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills