d2-diagram

Generate D2 diagrams from natural language descriptions with type classification.

56|5|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/diegomarino/claude-toolshed --skill d2-diagram-diegomarino
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: d2-diagram
Source: https://github.com/diegomarino/claude-toolshed/tree/main/plugins/d2/skills/d2-diagram
Command: npx skills add https://github.com/diegomarino/claude-toolshed --skill d2-diagram-diegomarino

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation of D2 diagrams from natural language descriptions, simplifying the visualization of complex systems and data structures.

Core Features & Use Cases

  • Automated Diagram Generation: Creates D2 diagrams based on textual input describing system components, API calls, or data models.
  • Type Classification: Intelligently determines the appropriate diagram type (Sequence, Architecture, ER, Class) from the description.
  • Use Case: Describe a user authentication flow, and the Skill will generate a sequence diagram illustrating the interactions between the client, API gateway, and authentication service.

Quick Start

Use the d2-diagram skill to generate an architecture diagram for a microservices-based e-commerce platform.

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?

You can generate D2 diagrams from text by providing natural language descriptions of system components or data models. The Skill classifies the diagram type and structures components, groups, and edges automatically.

What types of diagrams can I create using D2 from natural language?

D2 supports sequence, architecture, ER, and class diagrams from natural language input. The Skill intelligently classifies the appropriate diagram type based on your textual description of system interactions or data structures.

Can I generate a sequence diagram for an API authentication flow using D2?

Yes, you can generate a sequence diagram for an API authentication flow using D2. Describe the interactions between the client, API gateway, and authentication service, and the Skill will structure the sequence diagram automatically.

Does the D2 diagram generator handle layout and visual clarity automatically?

The D2 diagram generator handles layout and visual clarity automatically through automated layout engine selection and budget checks. This ensures the generated diagrams maintain clear visual structure without manual layout adjustments.

What is the best way to visualize microservices architecture using D2?

The best way to visualize microservices architecture using D2 is to provide a natural language description of your platform. The Skill will classify it as an architecture diagram and structure the components, groups, and edges for visualization.