Command Palette

Search for a command to run...

Назад к скиллам
скилл № 97483

diagram

Generate architecture diagrams using Python diagrams library

БесплатноБез исполняемых скриптов
DavidROliverBAот DavidROliverBA★ 53 звезды на GitHub

Установить diagram в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

/diagram Skill

Generate architecture diagrams in multiple formats (C4, System Landscape, Data Flow, AWS).

When to Use This Skill

Use /diagram when you need to create or update architecture visualizations:

  • Create new C4 context/container/component diagrams
  • Generate system landscape maps
  • Visualize data flow architectures
  • Create AWS infrastructure diagrams
  • Diagram integration patterns
  • Map system dependencies

Usage

/diagram <type> [options]

Diagram Types

Type Description Use Case
c4-context C4 Level 1 - System context Show external actors and system boundary
c4-container C4 Level 2 - System containers Show major components (services, databases)
c4-component C4 Level 3 - Component level Show detailed component interactions
system-landscape Enterprise system map Show all systems and connections
data-flow Data movement diagram Show how data moves through systems
aws-architecture AWS infrastructure Show EC2, RDS, S3, networking
integration-pattern Integration architecture Show message flows and patterns
dependency-graph System dependencies Show what depends on what

Workflow

Phase 1: Capture Requirements

When invoked, the skill asks:

  1. Diagram type (required)

    • Options: c4-context, c4-container, system-landscape, data-flow, aws-architecture, integration-pattern, dependency-graph
    • Default: c4-context
  2. Scope (required)

    • For C4: Which system/product?
    • For landscape: Which program/domain?
    • For AWS: Which account/region?
    • For data-flow: Which integration?
  3. Systems to include (optional)

    • Comma-separated list of systems
    • Leave blank to auto-detect from context
  4. Styling preferences (optional)

    • Color scheme: classic, muted, vibrant
    • Icon set: simple, detailed, minimalist
    • Default: classic, simple
  5. Output format (optional)

    • python — PNG via Python diagrams library (default for AWS/landscape types)
    • mermaid — Inline Mermaid (default for C4 types; renders natively in Obsidian)
    • plantuml — C4-PlantUML with directional hints (for complex C4 layouts, >15 elements)
    • For C4 types (c4-context, c4-container, c4-component), suggest Mermaid or PlantUML and cross-reference /c4-diagram for data-driven generation from System note frontmatter
  6. Output location (optional)

    • Save diagram in Canvas, Concept note, or embed in Note?
    • Default: Create standalone file

Phase 2: Generate Diagram

The skill generates a Python script using the diagrams package:

from diagrams import Diagram, Cluster, Edge
from diagrams.aws.compute import EKS, EC2
from diagrams.aws.database import RDS
from diagrams.aws.storage import S3
from diagrams.onprem.queue import Kafka
from diagrams.onprem.analytics import Spark

with Diagram("System Landscape", show=False, direction="TB"):
    # Your architecture here

Layout Science (Mermaid/PlantUML formats)

When generating Mermaid or PlantUML output (not Python):

  • Declaration order matters — declare elements in reading order (left-to-right or top-to-bottom). The Dagre/Sugiyama algorithm positions elements based on declaration sequence.
  • Tier-based ordering — Actors → Presentation → API → Services → Data → External
  • Edge crossing targets — <5 for complex diagrams, 0 for simple ones. Crossings are the strongest predictor of comprehension difficulty (Purchase et al.).
  • Use subgraphs/boundaries to group related elements (Gestalt proximity principle).

For C4-specific layout guidance including iterative refinement and PlantUML directional hints, see the /c4-diagram skill.

Phase 3: Render and Save

The skill:

  1. Executes the Python script
  2. Generates PNG image
  3. Creates markdown note with embedded diagram
  4. Saves to vault as Canvas or Concept note
  5. Links to related System/Integration notes

Phase 4: Validation Gate

After rendering, assess the diagram against each criterion and output a structured validation table with concrete results:

## Diagram Validation

| Criterion | Target | Result | Status |
|-----------|--------|--------|--------|
| Edge crossings | <5 complex, 0 simple | {count} | {PASS/FAIL} |
| Visual hierarchy | Boundary most prominent | {assessment} | {PASS/FAIL} |
| Grouping | Related elements proximate | {assessment} | {PASS/FAIL} |
| Flow direction | Consistent L-to-R or T-to-B | {direction} | {PASS/FAIL} |
| Traceability | Can follow each line | {assessment} | {PASS/FAIL} |
| Abstraction | One level per diagram | {level} | {PASS/FAIL} |

Replace {count}, {assessment}, {direction}, and {level} with the actual findings for the generated diagram. Every /diagram invocation must include this table in its output.

How to Assess Each Criterion

CRITICAL: You must read the rendered PNG back using the Read tool and visually inspect it. Do not

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл diagram?

Generate architecture diagrams using Python diagrams library

Как установить скилл diagram?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл diagram запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить diagram с