GitHub - kroegha/infrastructure-diagrams · GitHub
Skip to content

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

Infrastructure Diagrams Skill

License: MIT Python 3.9+

A Claude Skill for generating professional Azure, hybrid, and on-premises infrastructure architecture diagrams using Python's Diagrams library.

🚀 Quick Start

Choose your platform:

Platform Package Quick Install
Claude Code (Windows) packages/claude-code-windows/ .\install.ps1
Claude Code (Linux/macOS) packages/claude-code-linux/ ./install.sh
Claude Desktop (Windows) packages/claude-desktop-windows/ .\install.ps1

📦 Installation Instructions

Prerequisites (All Platforms)

  1. Python 3.9+ - Download Python
  2. Graphviz - Required for diagram rendering
  3. diagrams - Python package

Claude Code - Windows

Option 1: PowerShell Installer (Recommended)

# Clone the repository
git clone https://github.com/kroegha/infrastructure-diagrams.git
cd infrastructure-diagrams/packages/claude-code-windows

# Run the installer
.\install.ps1

Option 2: Manual Installation

  1. Install Graphviz:

    winget install graphviz
    # Or using Chocolatey
    choco install graphviz
  2. Add Graphviz to PATH (if not added automatically):

    # Add to system PATH
    $env:Path += ";C:\Program Files\Graphviz\bin"
  3. Install Python package:

    pip install diagrams
  4. Copy skill files:

    # Copy the skill to Claude Code skills directory
    Copy-Item -Recurse "packages\claude-code-windows\infrastructure-diagrams" "$env:USERPROFILE\.claude\skills\"
  5. Configure Claude Code - Add to your project's .claude/settings.json:

    {
      "permissions": {
        "skills": ["~/.claude/skills/infrastructure-diagrams"]
      }
    }

Option 3: Upload to Claude

  1. ZIP the packages/claude-code-windows/infrastructure-diagrams folder
  2. Go to Claude Settings > Capabilities
  3. Upload the ZIP file under Skills

Claude Code - Linux/macOS

Option 1: Bash Installer (Recommended)

# Clone the repository
git clone https://github.com/kroegha/infrastructure-diagrams.git
cd infrastructure-diagrams/packages/claude-code-linux

# Make executable and run
chmod +x install.sh
./install.sh

Option 2: Manual Installation

  1. Install Graphviz:

    # Ubuntu/Debian
    sudo apt-get update && sudo apt-get install -y graphviz
    
    # macOS
    brew install graphviz
    
    # RHEL/Fedora
    sudo dnf install graphviz
    
    # Arch Linux
    sudo pacman -S graphviz
  2. Install Python package:

    pip install diagrams
    # Or if you get "externally-managed-environment" error:
    pip install diagrams --break-system-packages
  3. Copy skill files:

    mkdir -p ~/.claude/skills
    cp -r packages/claude-code-linux/infrastructure-diagrams ~/.claude/skills/
  4. Configure Claude Code - Add to your project's .claude/settings.json:

    {
      "permissions": {
        "skills": ["~/.claude/skills/infrastructure-diagrams"]
      }
    }

Option 3: Upload to Claude

  1. ZIP the packages/claude-code-linux/infrastructure-diagrams folder
  2. Go to Claude Settings > Capabilities
  3. Upload the ZIP file under Skills

Claude Desktop - Windows

Option 1: PowerShell Installer (Recommended)

# Clone the repository
git clone https://github.com/kroegha/infrastructure-diagrams.git
cd infrastructure-diagrams/packages/claude-desktop-windows

# Run the installer
.\install.ps1

Option 2: Manual Installation

  1. Install Graphviz:

    winget install graphviz
  2. Install Python package:

    pip install diagrams
  3. Copy skill files:

    # Copy to Claude Desktop skills directory
    Copy-Item -Recurse "packages\claude-desktop-windows\infrastructure-diagrams" "$env:APPDATA\Claude\skills\"
  4. Restart Claude Desktop to load the new skill

Option 3: Upload to Claude Desktop

  1. ZIP the packages/claude-desktop-windows/infrastructure-diagrams folder
  2. Open Claude Desktop
  3. Go to Settings > Capabilities
  4. Upload the ZIP file under Skills

✅ Verify Installation

Check Prerequisites

# Check Graphviz
dot -V

# Check Python diagrams package
python -c "from diagrams import Diagram; print('Diagrams OK')"

Test the Skill

Open Claude and ask:

"Create a simple Azure architecture diagram with a VM and SQL database"

Claude should generate Python code using the diagrams library and produce a PNG file.


📦 Package Contents

Each package is a self-contained skill that can be zipped and uploaded directly to Claude:

packages/
├── claude-code-windows/
│   ├── install.ps1                     # PowerShell installer
│   ├── README.md                       # Platform-specific guide
│   └── infrastructure-diagrams/        # ← The skill (ZIP this for upload)
│       ├── SKILL.md                    # Skill definition + YAML frontmatter
│       ├── references/
│       │   ├── azure-nodes.md          # Azure provider reference
│       │   ├── onprem-nodes.md         # On-premises provider reference
│       │   └── patterns.md             # Architecture patterns
│       └── scripts/
│           └── generate_diagram.py     # Helper script
├── claude-code-linux/
│   ├── install.sh                      # Bash installer
│   ├── README.md
│   └── infrastructure-diagrams/        # ← The skill
│       └── ...
└── claude-desktop-windows/
    ├── install.ps1                     # PowerShell installer
    ├── README.md
    └── infrastructure-diagrams/        # ← The skill
        └── ...

✨ Features

  • Azure Resources: VMs, networking, databases, storage, security, identity, integration
  • On-Premises Resources: Servers, databases, network equipment, monitoring
  • Kubernetes: Pods, deployments, services, ingress controllers
  • Hybrid Scenarios: VPN, ExpressRoute, site-to-site connectivity
  • Custom Icons: Support for custom PNG icons
  • Multiple Outputs: PNG, SVG, PDF, JPG formats

🎨 Supported Providers

Azure

  • Compute (VM, VMSS, AKS, Functions, Container Apps)
  • Networking (VNet, Firewall, Load Balancer, App Gateway, Front Door)
  • Database (SQL, Cosmos DB, PostgreSQL, MySQL, Redis)
  • Storage (Blob, File, Queue, Table, Data Lake)
  • Security (Key Vault, Sentinel, Security Center)
  • Identity (Entra ID, Managed Identities)
  • Integration (Logic Apps, Service Bus, Event Grid, API Management)

On-Premises

  • Compute (Physical servers, VMs)
  • Database (PostgreSQL, MySQL, MSSQL, Oracle, MongoDB)
  • Network (Cisco routers, firewalls, load balancers)
  • Monitoring (Grafana, Prometheus, Datadog, Splunk)

Generic

  • Network devices, storage, operating systems
  • Custom icons for any resource

📖 Usage Examples

Simply ask Claude to create diagrams using natural language. No coding required!

Basic Azure Architecture

Prompt:

Create a simple Azure architecture diagram with a virtual machine connecting to a SQL database


Three-Tier Web Application

Prompt:

Create a three-tier web application diagram with:

  • Users accessing through Application Gateway
  • Web tier with VM Scale Set
  • App tier with another VM Scale Set
  • Data tier with Azure SQL and Blob Storage

Hub-and-Spoke Network

Prompt:

Create an Azure hub-and-spoke network diagram with:

  • Hub VNet containing Azure Firewall and VPN Gateway
  • Two spoke VNets for web and database workloads
  • Show the peering connections between hub and spokes

Hybrid Cloud Architecture

Prompt:

Create a hybrid architecture showing:

  • On-premises data center with a Cisco router and PostgreSQL database
  • Site-to-site VPN connection to Azure
  • Azure VNet with web servers and Redis cache

Kubernetes on Azure (AKS)

Prompt:

Create an AKS architecture diagram showing:

  • Azure Load Balancer in front
  • AKS cluster with ingress controller
  • Three application pods
  • Cosmos DB backend
  • Key Vault for secrets

Multi-Region Disaster Recovery

Prompt:

Create a multi-region disaster recovery diagram with:

  • Primary region with App Service and SQL Database
  • Secondary region with standby resources
  • Traffic Manager for DNS-based routing
  • Geo-replication between the SQL databases

Enterprise API Integration

Prompt:

Create an enterprise API integration diagram with:

  • Azure Front Door with WAF
  • API Management for authentication
  • Logic App for business workflow
  • On-premises SQL Server via Data Gateway
  • Key Vault and Application Insights

Customization Options

You can specify additional options in your prompts:

Option Example Prompt
Layout "Create a left-to-right diagram..." or "Create a top-to-bottom diagram..."
Format "...and save it as SVG" or "...export as PDF"
Labels "...label all the connections"
Grouping "...group resources by tier" or "...cluster by region"

Example with options:

Create a hub-spoke network diagram in top-to-bottom layout, save as SVG, and label all the peering connections


Tips for Best Results

  1. Be specific — Use Azure service names (e.g., "Application Gateway" not just "load balancer")
  2. Describe groupings — Tell Claude how to organize: "Group by tier" or "Cluster by region"
  3. Specify layout — Use "top-to-bottom" for hierarchical, "left-to-right" for flow diagrams
  4. Request labels — Ask to "label the connections" for clarity
  5. Iterate — After the first diagram, ask Claude to "add Key Vault" or "change to SVG format"

🔧 Troubleshooting

Graphviz not found

Windows:

# Add to PATH
$env:Path += ";C:\Program Files\Graphviz\bin"
# Or reinstall
winget install graphviz

Linux/macOS:

# Check installation
which dot
# Reinstall if needed
sudo apt-get install graphviz  # Debian/Ubuntu
brew install graphviz          # macOS

Python diagrams module not found

pip install diagrams
# Or with user flag
pip install --user diagrams
# Or break system packages (Linux)
pip install --break-system-packages diagrams

Skill not loading in Claude

  1. Verify the skill directory structure includes SKILL.md at the root
  2. Check that SKILL.md has valid YAML frontmatter with name: and description:
  3. Restart Claude Desktop or reload Claude Code
  4. Try uploading the skill as a ZIP file directly

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

MIT License - see LICENSE for details.

🙏 Acknowledgments


Author: Craig Fisher Repository: kroegha/infrastructure-diagrams

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages