By heathdutton
Generate infrastructure and architecture diagrams from your codebase using D2. Analyzes IaC patterns and documentation to produce annotated SVGs with light/dark themes, then validates and enhances them with animations for GitHub.
Specialized agent for creating comprehensive infrastructure and architecture documentation.
Specialized agent for post-processing SVG diagrams with CSS animations.
Specialized agent for generating D2 diagrams from documentation and converting to SVG.
Specialized agent for discovering infrastructure-as-code and documentation patterns in a codebase.
Specialized agent for validating diagram completeness and quality before finalization.
A Claude Code plugin that generates infrastructure and architecture diagrams (and documentation) from your codebase using D2.
Command: /d2:diagram
More advanced/complex outputs will be generated as well.
diagrams/
├── README.md <-- Will contain embedded diagrams
├── architecture-dark.svg
├── architecture-light.svg
├── architecture-simplified-dark.svg
├── architecture-simplified-light.svg
├── architecture-simplified.d2
├── architecture-simplified.md
├── architecture.d2
├── architecture.md
├── infrastructure-dark.svg
├── infrastructure-light.svg
├── infrastructure-simplified-dark.svg
├── infrastructure-simplified-light.svg
├── infrastructure-simplified.d2
├── infrastructure-simplified.md
├── infrastructure.d2
└── infrastructure.md
prefers-reduced-motion)git clone https://github.com/heathdutton/claude-d2-diagrams.git
claude --plugin-dir ./claude-d2-diagrams
# or
claude plugin marketplace add https://github.com/heathdutton/claude-d2-diagrams
claude plugin install d2@claude-d2-diagrams
Requires D2:
brew install d2 # macOS
# or
curl -fsSL https://d2lang.com/install.sh | sh -s -- # Linux
Note: the plugin will guide you through installing D2 if not available.
/d2:diagram # Full generation
/d2:diagram --incremental # Only regenerate changes
/d2:diagram --infrastructure-only # Skip architecture
/d2:diagram --architecture-only # Skip infrastructure
/d2:diagram --scope=src/ # Limit scan to directory
Create ./diagrams/rules.md to customize. Example:
## Naming
- Use "API Gateway" not "APIGW"
## Exclude
- test/
- examples/
## Include (even if not in IaC)
- Cloudflare CDN
- Datadog monitoring
MIT
Modifies files
Hook triggers on file write and edit operations
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub heathdutton/claude-d2-diagrams --plugin d2Generate, validate, render D2 diagrams from text or code
Codebase diagram generation for tldiagram.com
Analyse software architecture and generate C4 models using Structurizr DSL, with diagram export support.
Generate architecture diagrams and technical design documents
Diagrams-as-code tools for visualizing code, data, and systems using Mermaid and PlantUML
Excalidraw diagramming toolkit — auto-diagram any codebase, architecture diagrams, data flows, with PNG/SVG/URL export