graphviz-dive

Create professional ByteByteGo-style system architecture diagrams using Graphviz DOT format with Excalidraw aesthetics

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "graphviz-dive" with this command: npx skills add ccalita/graphviz-dive/ccalita-graphviz-dive-graphviz-dive

Purpose

This skill produces exhaustive, expert-grade visualizations of any codebase. It generates complete analysis across all architectural aspects without requiring user interaction or selection.

Target: A new-grad should produce diagrams as if they'd written the system from scratch.

Core Principle

Generate ALL aspects by default. No selection, no minimal. Every diagram an expert would need to fully understand the system.


Complete Workflow

Step 1: Entry Point Discovery

1. Find main entry point (main.py, index.ts, main.go, etc.)
2. Identify language and framework
3. Determine project type (library, application, service)

Step 2: Module Decomposition

1. Map directory structure to module boundaries
2. Identify packages, namespaces, or module groups
3. Find configuration and dependency injection setup

Step 3: Pattern Detection

Automatically detect architecture pattern from structure:

PatternKey IndicatorsFiles to Prioritize
Layeredcontroller/, service/, repository/Flow + Types
DDDdomain/, application/, infrastructure/Types + Storage
Event-Drivenevents/, handlers/, queues/Flow + Concurrency
Microservicesindependent service directoriesContext + Deployment
Monolithicsingle large codebaseAll 8 aspects
Hexagonalports/, adapters/, core/Types + Flow

Step 4: Generate All Aspects

Always produce these 8+ diagrams:

AspectFile SuffixFocusWhat It Reveals
Context_contextExternal users, systems, boundariesSystem scope, external deps
Components_componentsModules, services, boundariesArchitecture, module deps
Types_typesClasses, interfaces, domain modelCore abstractions, relationships
Flow_flowRequest pipeline, data journeyRuntime behavior, processing
Concurrency_concurrencyThreads, async, eventsParallelism, synchronization
Storage_storageDatabases, caches, schemasPersistence, data model
Security_securityAuth, trust boundariesProtection mechanisms
Deployment_deploymentInfrastructure, containersRuntime environment
Memory_memoryBuffers, GC, pointersLow-level efficiency (if applicable)
State_stateLifecycle, transitionsResource management

Step 5: Expert Annotation

For each generated diagram, add analysis:

## [Diagram Name] Analysis

**Architecture Pattern Detected:** [pattern type]
**Key Design Decisions:**
  - [Decision 1] → evidenced by [component/pattern]
  - [Decision 2] → evidenced by [component/pattern]
**Critical Relationships:**
  - [A] → [B]: [why this matters for system behavior]
  - [C] → [D]: [why this matters for system behavior]
**Domain-Specific Insights:**
  - [For this pattern type, experts would focus on...]

Aspect Specifications

1. Context Diagram (_context.dot)

Focus: External boundaries and users

Nodes:

  • External Users (end users, other systems)
  • External Services (APIs, databases, message queues)
  • System Boundary (the analyzed system)

Edges:

  • User → System: "uses", "authenticated"
  • System → External Service: "calls", "publishes"

Example:

subgraph cluster_external {
  label="External Systems";
  style="dashed,rounded";
  color="#dc3545";
  bgcolor="#fff5f5";
  
  user [label="End User", shape="person"];
  ext_api [label="Third-party API", shape="ellipse", style="dashed"];
}

subgraph cluster_system {
  label="Your System";
  style="rounded";
  color="#0d6efd";
  bgcolor="#e7f1ff";
  
  api_gateway [label="API Gateway"];
  auth_service [label="Auth Service"];
}

user -> api_gateway [xlabel="HTTPS"];
api_gateway -> auth_service [xlabel="validate"];
api_gateway -> ext_api [xlabel="REST"];

2. Components Diagram (_components.dot)

Focus: Module boundaries and internal structure

Nodes:

  • Application Layer (controllers, handlers)
  • Domain Layer (business logic, entities)
  • Infrastructure Layer (DB, external clients)
  • Shared/Kernel (utilities, constants)

Edges:

  • Layer dependencies (top-down)
  • Cross-cutting concerns

3. Types Diagram (_types.dot)

Focus: Class hierarchy and interfaces

Nodes:

  • Abstract classes (italic label)
  • Concrete classes
  • Interfaces (diamond)
  • Value objects

Edges:

  • Inheritance (solid, arrow)
  • Composition (diamond)
  • Association (arrow)

4. Flow Diagram (_flow.dot)

Focus: Request lifecycle and data journey

Nodes:

  • Entry points (HTTP, CLI, Worker)
  • Processing stages
  • Decision points (gates)
  • Exit points

Edges:

  • Primary flow (solid)
  • Error paths (dashed)
  • Async triggers

5. Concurrency Diagram (_concurrency.dot)

Focus: Parallelism and synchronization

Nodes:

  • Thread/Worker pools
  • Event loops
  • Message queues
  • Lock/Scope boundaries

Edges:

  • Spawns
  • Waits on
  • Signals
  • Locks

6. Storage Diagram (_storage.dot)

Focus: Data persistence and schemas

Nodes:

  • Databases
  • Tables/Collections
  • Cache layers
  • File stores

Edges:

  • Read/Write
  • Sync/Async
  • Replication

7. Security Diagram (_security.dot)

Focus: Authentication and authorization

Nodes:

  • Trust boundaries (dashed ovals)
  • Auth mechanisms
  • Permission layers
  • Sensitive data stores

Edges:

  • Authentication flows
  • Authorization checks
  • Data access

8. Deployment Diagram (_deployment.dot)

Focus: Infrastructure and scaling

Nodes:

  • Servers/Containers
  • Load balancers
  • Service instances
  • External services

Edges:

  • Network paths
  • Replication
  • Scaling groups

The "ByteByteGo" Style (MUST USE)

Every file MUST include these attributes:

digraph "aspect_name" {
  // 1. Layout Engine
  layout="dot";
  rankdir="LR";
  
  // 2. Global Graph Attributes
  graph [
    fontname="Virgil";
    fontsize=20;
    splines="ortho";
    nodesep=1.0;
    ranksep=1.5;
    pad=0.5;
    style="filled";
    color="white";
    label="Diagram Title";
    labelloc="t";
  ];

  // 3. Node Attributes
  node [
    shape="box";
    style="rounded,filled";
    fillcolor="#ffffff";
    fontname="Virgil";
    fontsize=16;
    penwidth=2.0;
    color="#000000";
    margin=0.2;
  ];

  // 4. Edge Attributes
  edge [
    fontname="Virgil";
    fontsize=12;
    penwidth=1.5;
    color="#000000";
    arrowhead="vee";
  ];

  // Use xlabel for edge labels (never label!)
  node_a -> node_b [xlabel="Action"];
}

Color Reference

Element TypeStroke ColorFill Color
External#dc3545 (red)#fff5f5
Services#0d6efd (blue)#e7f1ff
Domain#198754 (green)#e8f5e9
Data#fd7e14 (orange)#fff3e0
Security#6f42c1 (purple)#f3e5f5
Infrastructure#6c757d (grey)#f8f9fa

Expert Mental Models

How Experts Decompose Systems

  1. Start at boundaries: What enters? What leaves?
  2. Find the core: Where is the business logic?
  3. Trace the flow: How does data move through?
  4. Identify patterns: What architecture does it follow?
  5. Map the scale: How does it handle load?

Questions Each Aspect Answers

AspectQuestions It Answers
ContextWhat depends on this? What does it depend on?
ComponentsWhat are the major modules? How do they interact?
TypesWhat are the core abstractions? How do they relate?
FlowHow does a request move through the system?
ConcurrencyHow does it handle parallelism?
StorageHow is data persisted and accessed?
SecurityHow is access controlled?
DeploymentWhere does it run? How does it scale?

Pattern → Aspect Priority

PatternPrimary AspectsSecondary Aspects
LayeredTypes + FlowComponents + Storage
DDDTypes + StorageFlow + Components
Event-DrivenFlow + ConcurrencyContext + Components
MicroservicesContext + DeploymentComponents + Storage
MonolithicAll 8-

Output Requirements

File Naming

All output files follow: {project}_{aspect}.dot

Examples:

  • myapp_context.dot
  • myapp_components.dot
  • myapp_types.dot
  • myapp_flow.dot
  • myapp_concurrency.dot
  • myapp_storage.dot
  • myapp_security.dot
  • myapp_deployment.dot

Required Output

For every codebase analyzed, generate:

  1. All 8+ .dot files
  2. A summary README.md explaining:
    • Architecture pattern detected
    • Key design decisions
    • How the aspects connect
    • Domain-specific insights

Rendering Instructions

Always provide rendering guidance:

  1. Online: Paste DOT code into Edotor.net or GraphvizOnline
  2. Local: Use dot -Tsvg file.dot -o file.svg
  3. Excalidraw: Convert to SVG, drag into Excalidraw for hand-drawn editing

Red Flags - Stop and Correct

  • Edge Labels: MUST use xlabel instead of label for edges
  • Curved Lines: splines="ortho" is NON-NEGOTIABLE
  • Font Missing: fontname="Virgil" must be present
  • Single Graph: Never try to fit all 8 aspects in one diagram
  • Reserved Keywords: Never name nodes graph, node, edge

Reference Files

  • template/ - Reusable templates for each aspect type
  • examples/ - Complete multi-file examples for different architecture types

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

architecture

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

tracer-dev

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

architecture

No summary provided by upstream source.

Repository SourceNeeds Review