Xpersona
D

Diagram Drawing

CLAWHUB · Unverified

Generate high-quality SVG and PNG technical diagrams from natural language, including architecture, flowchart, sequence, UML, mind maps, and AI agent systems. Skill: Diagram Drawing Owner: 0xcjl Summary: Generate high-quality SVG and PNG technical diagrams from natural language, including architecture, flowchart, sequence, UML, mind maps, and AI agent systems. Tags: agent:1.0.0, ai-diagrams:1.0.0, architecture:1.0.0, claude-code:1.0.0, diagram:1.0.0, flowchart:1.0.0, latest:1.0.0, openclaw-skill:1.0.0, png:1.0.0, rag:1.0.0, svg:1.0.0, technical-diagram:1.0.0 Version histor

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17c0swjv7p83sgyqfwvqqkbed83hk19:diagram-drawing
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-0xcjl-diagram-drawing/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

21,175 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: diagram-drawing
description: Generate production-quality SVG+PNG technical diagrams from natural language. Use when user wants to create any technical diagram — architecture, data flow, flowchart, sequence, agent/memory, UML, mind map, or concept map — and export as SVG+PNG. Triggers (EN): "generate diagram", "draw diagram", "create chart", "visualize", "architecture diagram", "flowchart", "sequence diagram", "data flow", "tech graph". Triggers (中文): "画图", "帮我画", "生成图", "做个图", "架构图", "流程图", "可视化", "出图", "技术图". Also triggers on any system/flow description the user wants illustrated, especially for AI/Agent systems (RAG, Agentic Search, Mem0, Multi-Agent, Tool Call).
---

# Diagram Drawing

Generate production-quality SVG+PNG technical diagrams from natural language descriptions.

## Quick Start

1. **Classify** diagram type from user request
2. **Extract** layers, nodes, edges, flows
3. **Plan** layout (top→bottom for most, left→right for wide flows)
4. **Generate** SVG with semantic shapes and arrows
5. **Export** PNG at 1920px width

## Diagram Types & Layout

### Architecture
Nodes = services/components. Group into **horizontal layers** (top→bottom or left→right).
- Typical: Client → Gateway → Services → Data/Storage
- Dashed `<rect>` containers group related services
- ViewBox: `0 0 960 600` or `0 0 960 800`

### Data Flow
Label every arrow with data type ("embeddings", "query", "context"). Wider arrows for primary paths.

### Flowchart / Process
Top-to-bottom preferred. Diamond = decision, rounded rect = process, parallelogram = I/O.

### Agent Architecture
5 layers: Input → Agent Core (LLM) → Memory → Tools → Output
- Show iterative reasoning with **loop arcs** (curved arrows)
- Separate memory read/write paths visually

### Memory Architecture (Mem0-style)
- Show memory **write path** and **read path** separately
- Tiers: Working → Short-term → Long-term → External Store
- Operations: `store()`, `retrieve()`, `forget()`, `consolidate()`

### Sequence Diagram
- Vertical **lifelines** (dashed lines)
- Horizontal arrows = messages, top-to-bottom time order
- Activation boxes (thin filled rects on lifeline)
- ViewBox height = 80 + (num_messages × 50)

### Comparison Matrix
- Column headers = systems, row headers = attributes
- Checked: `#dcfce7` fill + ✓; unsupported: `#f9fafb` fill

### Mind Map
- Central node at `cx=480, cy=280`
- Curved bezier branches, not straight lines
- First-level: 360/N degrees apart

### UML Diagrams
- **Class**: 3-compartment rect (name / attributes / methods)
- **Use Case**: Ellipse + stick figure actors
- **State Machine**: Rounded rects + transitions with guards
- **ER**: Rect entities + diamond relationships + cardinality

## Shape Vocabulary

| Concept | Shape |
|---------|-------|
| User / Human | Circle head + body path |
| LLM / Model | Rounded rect, double border, ⚡ |
| Agent | Hexagon or double-border rect |
| Memory (short-term) | Dashed-border rounded rect |
| Memory (long-term) | Solid cylinder

_meta.json

{
  "ownerId": "kn76bp2jsdmb25t3egd28hhj6181mz2n",
  "slug": "diagram-drawing",
  "version": "1.0.0",
  "publishedAt": 1775961582707
}

references/icons.md

# Icon Reference

## Compatibility Rule
**Never use `@import url()` for fonts** — rsvg-convert does not fetch external resources.
Use `<style>font-family: system-ui, Helvetica, sans-serif</style>` only.
**Never use external CDN URLs for icons** — use inline SVG paths.

---

## Semantic Shapes

### LLM / Model (double-border rounded rect)
```xml
<rect x="x" y="y" width="w" height="h" rx="10" fill="FILL" stroke="STROKE-OUTER" stroke-width="2.5"/>
<rect x="x+3" y="y+3" width="w-6" height="h-6" rx="8" fill="none" stroke="STROKE-INNER" stroke-width="0.8" opacity="0.5"/>
<text x="cx" y="cy-6" text-anchor="middle" font-size="14">⚡</text>
<text x="cx" y="cy+10" text-anchor="middle" fill="TEXT" font-size="13" font-weight="600">GPT-4o</text>
```

### Agent / Orchestrator (hexagon)
```xml
<!-- r=circumradius. For r=36: points at 36,0  18,31.2  -18,31.2  -36,0  -18,-31.2  18,-31.2 -->
<polygon points="cx,cy-r  cx+r*0.866,cy-r*0.5  cx+r*0.866,cy+r*0.5  cx,cy+r  cx-r*0.866,cy+r*0.5  cx-r*0.866,cy-r*0.5"
         fill="FILL" stroke="STROKE" stroke-width="1.5"/>
<text x="cx" y="cy+5" text-anchor="middle" fill="TEXT" font-size="12" font-weight="600">Agent</text>
```

### Vector Store (cylinder with rings)
```xml
<ellipse cx="cx" cy="top" rx="w/2" ry="w/6" fill="FILL" stroke="STROKE" stroke-width="1.5"/>
<rect x="cx-w/2" y="top" width="w" height="h" fill="FILL" stroke="none"/>
<line x1="cx-w/2" y1="top" x2="cx-w/2" y2="top+h" stroke="STROKE" stroke-width="1.5"/>
<line x1="cx+w/2" y1="top" x2="cx+w/2" y2="top+h" stroke="STROKE" stroke-width="1.5"/>
<ellipse cx="cx" cy="top+h*0.33" rx="w/2" ry="w/6" fill="none" stroke="STROKE" stroke-width="0.7" opacity="0.5"/>
<ellipse cx="cx" cy="top+h*0.66" rx="w/2" ry="w/6" fill="none" stroke="STROKE" stroke-width="0.7" opacity="0.5"/>
<ellipse cx="cx" cy="top+h" rx="w/2" ry="w/6" fill="FILL-DARK" stroke="STROKE" stroke-width="1.5"/>
```

### Memory (short-term, dashed border)
```xml
<rect x="x" y="y" width="w" height="h" rx="8"
      fill="FILL" stroke="STROKE" stroke-width="1.5" stroke-dasharray="6,3"/>
<text x="cx" y="cy-6" text-anchor="middle" fill="TEXT" font-size="10" opacity="0.7">MEMORY</text>
<text x="cx" y="cy+8" text-anchor="middle" fill="TEXT" font-size="13">Short-term</text>
```

### Tool / Function (rect with gear)
```xml
<rect x="x" y="y" width="w" height="h" rx="6" fill="FILL" stroke="STROKE" stroke-width="1.5"/>
<text x="cx" y="cy-4" text-anchor="middle" font-size="16">⚙</text>
<text x="cx" y="cy+12" text-anchor="middle" fill="TEXT" font-size="12">Tool Name</text>
```

### User / Human
```xml
<circle cx="cx" cy="cy-18" r="10" fill="FILL" stroke="STROKE" stroke-width="1.2"/>
<path d="M cx-14,cy+16 Q cx-14,cy-4 cx,cy-4 Q cx+14,cy-4 cx+14,cy+16"
      fill="FILL" stroke="STROKE" stroke-width="1.2"/>
<text x="cx" y="cy+30" text-anchor="middle" fill="TEXT" font-size="12">User</text>
```

### Browser / UI
```xml
<rect x="x" y="y" width="w" height="h" rx="6" fill="FILL" stroke="STROKE" stroke-width="1.5"/>
<rect x="x" 

references/styles.md

# Style Reference Guide

## Style 1 — Flat Icon (Default)
- **Background**: `#ffffff`
- **Primary text**: `#1f2937`
- **Node fill**: `#f3f4f6`
- **Node stroke**: `#374151`
- **Accent 1**: `#3b82f6` (blue)
- **Accent 2**: `#10b981` (green)
- **Accent 3**: `#f59e0b` (amber)
- **Accent 4**: `#ef4444` (red)
- **Font**: Helvetica, system-ui
- **Best for**: Blogs, slides, docs, presentations

## Style 2 — Dark Terminal
- **Background**: `#0f0f1a`
- **Primary text**: `#e5e7eb`
- **Node fill**: `#1f2937`
- **Node stroke**: `#6b7280`
- **Accent 1**: `#22d3ee` (cyan neon)
- **Accent 2**: `#a78bfa` (purple neon)
- **Accent 3**: `#34d399` (green neon)
- **Accent 4**: `#fb923c` (orange neon)
- **Font**: SF Mono, Fira Code, monospace
- **Best for**: GitHub README, dev articles

## Style 3 — Blueprint
- **Background**: `#0a1628`
- **Primary text**: `#94a3b8`
- **Node fill**: `#0f172a`
- **Node stroke**: `#1e40af`
- **Accent 1**: `#38bdf8` (cyan)
- **Accent 2**: `#818cf8` (indigo)
- **Grid lines**: `#1e3a5f` dashed
- **Font**: Courier New, monospace
- **Best for**: Architecture docs, engineering specs

## Style 4 — Notion Clean
- **Background**: `#ffffff`
- **Primary text**: `#37352f`
- **Node fill**: `#f7f6f3`
- **Node stroke**: `#e5e5e5`
- **Accent 1**: `#000000` (black)
- **Accent 2**: `#6b6b6b` (gray)
- **Arrow (all types)**: `#000000` single color
- **Font**: system-ui
- **Best for**: Notion, Confluence, wikis

## Style 5 — Glassmorphism
- **Background**: `#0d1117` to `#161b22` gradient (top to bottom)
- **Primary text**: `#f0f6fc`
- **Node fill**: `rgba(48,54,61,0.7)` with backdrop blur effect via opacity
- **Node stroke**: `rgba(240,246,252,0.1)`
- **Card glow**: `rgba(88,166,255,0.15)` border
- **Accent 1**: `#58a6ff` (blue)
- **Accent 2**: `#f778ba` (pink)
- **Accent 3**: `#7ee787` (green)
- **Font**: Inter, system-ui
- **Best for**: Product sites, keynotes, AI demos

## Style 6 — Claude Official
- **Background**: `#f8f6f3` (warm cream)
- **Primary text**: `#1a1a1a`
- **Node fill**: `#ffffff`
- **Node stroke**: `#e5e5e5`
- **Accent 1**: `#c96018` (Anthropic orange)
- **Accent 2**: `#82589F` (Anthropic purple)
- **Accent 3**: `#2a7f64` (teal)
- **Accent 4**: `#c94a1a` (warm red)
- **Font**: system-ui, -apple-system, sans-serif
- **Best for**: Anthropic projects, warm professional docs

## Style 7 — OpenAI Official
- **Background**: `#ffffff` (pure white)
- **Primary text**: `#1a1a1a`
- **Node fill**: `#fafafa`
- **Node stroke**: `#e5e5e5`
- **Accent 1**: `#10a37f` (OpenAI green)
- **Accent 2**: `#4f46e5` (indigo)
- **Accent 3**: `#6b7280` (gray)
- **Font**: system-ui
- **Best for**: OpenAI projects, clean modern docs

## Style-to-Diagram Quick Reference

| Diagram Type | Best Styles |
|--------------|------------|
| Architecture | 1, 2, 3, 5, 6 |
| Class / ER (UML) | 1, 3, 4, 6, 7 |
| Sequence | 2, 4, 6, 7 |
| Flowchart | 1, 2, 4 |
| Mind Map | 1, 4, 5 |
| Data Flow | 1, 2, 3 |
| Agent / Memory | 2, 5, 6 |
| Comparison Matrix | 1, 4, 6, 7 |

skill-card.md

## Description:

Generate high-quality SVG and PNG technical diagrams from natural language, including architecture, flowchart, sequence, UML, mind maps, and AI agent systems.

This skill is ready for commercial/non-commercial use.

## Publisher:

[0xcjl](https://clawhub.ai/user/0xcjl)

### License/Terms of Use:

MIT-0

## Use Case:

Developers, technical writers, and agents use this skill to turn natural-language system or process descriptions into SVG and PNG diagrams for documentation, presentations, and architecture review.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Broad activation phrases may cause an agent to generate diagram files when the user intended only a conceptual explanation.

Mitigation: Be explicit about whether a diagram should be created before invoking the skill.

Risk: The skill writes local SVG and PNG files, which can overwrite or clutter shared or important directories if paths are unclear.

Mitigation: Specify the output directory and filename before generation, especially in shared workspaces.

Risk: PNG export depends on locally available conversion backends such as rsvg-convert, CairoSVG, or svglib with Pillow.

Mitigation: Confirm a supported SVG-to-PNG converter is installed or keep the SVG as the primary output.

## Reference(s):

- [Icon Reference](references/icons.md)
- [Style Reference Guide](references/styles.md)
- [Diagram Drawing ClawHub Skill Page](https://clawhub.ai/0xcjl/skills/diagram-drawing)

## Skill Output:

**Output Type(s):** [Text, Markdown, Code, Shell commands, Files, Guidance]

**Output Format:** [Markdown response with generated SVG code, PNG conversion commands, and local SVG/PNG file paths]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Creates local SVG and PNG diagram files; PNG export defaults to 1920px width unless a custom output is requested.]

## Skill Version(s):

1.0.0 (source: server release evidence)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Diagram Drawing and adjacent AI workflows.