A Claude Code plugin that generates infrastructure and architecture diagrams (and documentation) from your codebase using D2. Command: /d2:diagram
FAQ
d2 is a Claude Code plugin with hand-picked skills for documentation work, indexed on Flowy. Install it with the command on its page. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
> /plugin marketplace add heathdutton/claude-d2-diagrams> /plugin install d2@claude-d2-diagrams
Repo: heathdutton/claude-d2-diagrams
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
.claude-plugin/ marketplace.json plugin.json .gitignore agents/ documenter.md enhancer.md renderer.md scanner.md verifier.md commands/ diagram.md diagrams/ animations.css icons.d2 examples/ architecture-simplified-dark.svg architecture-simplified-light.svg architecture-simplified.d2 infrastructure-simplified-dark.svg infrastructure-simplified-light.svg infrastructure-simplified.d2 hooks/ hooks.json README.md scripts/ check-d2.sh context-recovery.sh d2-validator.sh enhance-svg.sh inject-icons.sh inline-svg-icons.go inline-svg-icons.sh keyword-trigger.sh optimize-svg.sh todo-continuation.sh
ยฉ 2026 Flowy ยท Free and open source
Built for Claude Code ยท Not affiliated with Anthropic