d2-diagram

Generate D2 diagram scripts from textual descriptions of system architectures.

3|Updated Oct 21, 2025
One-click install
npx skills add https://github.com/neuro-synapse/network-topology-agent --skill d2-diagram
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: d2-diagram
Source: https://github.com/neuro-synapse/network-topology-agent/tree/main/.claude/skills/d2-diagram
Command: npx skills add https://github.com/neuro-synapse/network-topology-agent --skill d2-diagram

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires d2, and includes references (resource) components.

What problem does it solve?

Manually drawing and maintaining complex diagrams is time-consuming, prone to inconsistencies, and difficult to version control. This Skill automates the creation of professional D2 diagrams from simple text descriptions, making visualization fast, accurate, and easily maintainable.

Core Features & Use Cases

  • Text-to-Diagram Generation: Converts natural language descriptions and structured text into D2 diagram code, supporting various diagram types like system architectures, data flows, and network topologies.
  • Rich Styling & Icons: Allows extensive customization with shapes, colors, and a wide range of validated icons (AWS, GCP, Tech, etc.) to create visually appealing and informative diagrams.
  • Complex Layouts: Handles hierarchical, grid, and custom layouts, ensuring clarity even for intricate system designs.
  • Version Control Friendly: D2's text-based nature enables easy tracking of diagram changes in version control systems, facilitating collaboration and auditability.
  • Use Case: A software architect needs to quickly visualize a new microservices architecture. Instead of using a GUI tool, they provide a textual description to this skill, which generates a D2 diagram that can be easily shared, reviewed, and version-controlled alongside their code.

Quick Start

Create a D2 diagram showing a user connecting to a web server, which then connects to a database. Label the connections appropriately.

Frequently Asked Questions about d2-diagram

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate D2 diagrams from text descriptions?

D2 diagram generation converts natural language descriptions into D2 code automatically. Provide a textual description of your system architecture, data flow, or network topology, and the Skill produces valid D2 scripts ready to render. This eliminates manual diagram creation and keeps designs version-controllable.

Can I create system architecture and microservices diagrams with D2?

D2 supports system architecture, microservices, data-flow, network topology, and flowchart diagrams through text-based definitions. The Skill handles complex layouts, hierarchical relationships, and component connections, making it ideal for visualizing distributed systems and software component relationships.

What styling and icon options are available for D2 diagrams?

D2 diagrams support extensive customization including shapes, colors, and validated icons from AWS, GCP, and Tech libraries. The Skill applies styling and icon selection automatically based on your description, enabling visually professional and semantically accurate diagrams without manual formatting.

How do I version control and collaborate on diagrams with D2?

D2's text-based format integrates seamlessly with version control systems, enabling diagram changes to be tracked, reviewed, and audited alongside code. This eliminates binary file conflicts and makes diagram evolution transparent and collaborative across teams.

Can D2 handle complex layouts for intricate system designs?

D2 supports hierarchical, grid, and custom layouts designed for complex systems. The Skill interprets your textual requirements and produces diagrams that maintain clarity and readability even for intricate architectures with many components and relationships.

What diagram types can I create automatically from descriptions?

Supported diagram types include system architectures, data flows, network topologies, software component relationships, flowcharts, and database schemas. The Skill automatically selects appropriate shapes, connections, and layouts based on your textual input and functional requirements.