D2 Diagram Creator for Openclaw

A powerful three-agent pipeline for generating, validating, and exporting professional D2 diagrams and system architectures.

huta0kj
v1.0.0
Apr 2, 2026
0
658
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install d2-diagram-creator

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install d2-diagram-creator using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is D2 Diagram Creator?

The D2 Diagram Creator is a specialized skill for Openclaw Skills designed to transform natural language descriptions into professional-grade diagrams. Utilizing the robust D2 syntax, it supports everything from simple flowcharts to complex cloud architectures and database schemas. The skill leverages a sophisticated multi-agent orchestration to ensure technical accuracy and visual clarity in every output.

By integrating this skill into your workflow, you can automate the tedious process of manual diagramming. Whether you need a sequence diagram for a protocol or a swimlane chart for business processes, this tool provides a structured approach to visualization. It is part of the growing ecosystem of Openclaw Skills that empower developers and architects to communicate complex ideas through code-driven design.

D2 Diagram Creator Use Cases

  • Mapping out complex system architectures and cloud infrastructure interactions.
  • Creating business process flowcharts and decision trees for technical documentation.
  • Visualizing database schemas and SQL table relationships with ER diagrams.
  • Generating state machine and sequence diagrams for software logic and protocol flows.
  • Designing organizational charts and hierarchical reporting structures for teams.

How D2 Diagram Creator Works

  1. Requirement Gathering: The main agent uses a structured question-and-answer flow within the Openclaw Skills environment to capture detail levels, layout directions, and export preferences.
  2. Analysis: An Analyzer subagent processes the user request into a structured JSON requirements document.
  3. Generation: A Generator subagent creates the D2 code based on specific diagram type references and the generated requirements.
  4. Validation and Export: A Validator subagent checks the code for errors, removes watermarks, and exports the final file in SVG, PNG, or D2 format.

D2 Diagram Creator Setup

To get started with this skill in your Openclaw Skills environment, ensure you have the D2 CLI installed and follow these steps:

# Install D2 if not already present
curl -fsSL https://d2lang.com/install.sh | sh

# Configure the skill path
# Ensure the /agents and /references directories are accessible

Configuration requires setting the base path for agent instruction files to allow the pipeline to reference the analyzer and generator logic.

D2 Diagram Creator Data Schema & Taxonomy

The skill manages data through a structured pipeline ensuring consistency across Openclaw Skills workflows:

Component Format Description
Requirements JSON Structured data capturing user intent and visual preferences.
Source Code .d2 The raw D2 language definition file for the diagram.
Export Assets SVG / PNG Rendered image files for documentation and presentations.
References Markdown Documentation templates for specific diagram types (Sequence, ER, etc.).

D2 Diagram Creator Advanced Features

  • Multi-agent pipeline orchestration for distinct analysis, generation, and validation phases.
  • Support for advanced layout engines including dagre, elk, and the powerful tala engine.
  • Automated watermark removal via custom Python scripts for professional-grade exports within Openclaw Skills.
  • Sketch mode support for hand-drawn aesthetic visualizations and UI prototyping.
  • Deep integration for seamless subagent spawning and task delegation.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*