Diagram Drawing

v1.0.0

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

0· 128·0 current·0 all-time
byJialin@0xcjl

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for 0xcjl/diagram-drawing.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Diagram Drawing" (0xcjl/diagram-drawing) from ClawHub.
Skill page: https://clawhub.ai/0xcjl/diagram-drawing
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install diagram-drawing

ClawHub CLI

Package manager switcher

npx clawhub@latest install diagram-drawing
Security Scan
Capability signals
Crypto
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name and description (generate SVG/PNG diagrams) match the provided assets: an extensive SKILL.md describing SVG generation, style/icon references, and a local svg2png conversion script. There are no unrelated required binaries, env vars, or config paths.
Instruction Scope
Runtime instructions focus on classifying diagram types, building SVG content, loading local style/icon reference files included in the bundle, and converting SVG→PNG using a local script or rsvg-convert. The instructions do write files to disk (expected for an image generator) but do not instruct reading arbitrary system files, environment variables, or transmitting data to external endpoints.
Install Mechanism
No install spec; this is instruction-only plus a small included Python script. No downloads from external URLs or archive extraction are present. Conversion backends referenced (rsvg-convert, cairosvg, svglib) are standard and optional dependencies.
Credentials
The skill declares and uses no environment variables or credentials. The SKILL.md and included script do not reference secrets or unrelated services.
Persistence & Privilege
always is false, and the skill does not request persistent/global agent privileges or attempt to modify other skills or agent-wide configuration. It runs local generation/conversion only.
Assessment
This skill appears coherent for generating diagrams: it uses local templates and a small included converter script and does not request credentials or network endpoints. Before installing, review and be aware that: (1) the skill will create SVG/PNG files on disk — check any output paths used in examples (the SKILL.md shows '/path/to/output.svg' as a placeholder); (2) converting to PNG may require rsvg-convert or Python libraries (cairosvg, svglib, reportlab, Pillow) which you may need to install; (3) the source is 'unknown' — if you require stronger assurance, inspect scripts/svg2png.py and the reference files yourself or run the skill in an isolated environment; and (4) if you need to limit file writes, restrict the agent's filesystem permissions or run it in a sandbox. Overall there are no red flags suggesting credential access or data exfiltration.

Like a lobster shell, security has layers — review code before you run it.

agentvk9729m0m48njye2bxzvk3xqv3n84qbvvai-diagramsvk9729m0m48njye2bxzvk3xqv3n84qbvvarchitecturevk9729m0m48njye2bxzvk3xqv3n84qbvvclaude-codevk9729m0m48njye2bxzvk3xqv3n84qbvvdiagramvk9729m0m48njye2bxzvk3xqv3n84qbvvflowchartvk9729m0m48njye2bxzvk3xqv3n84qbvvlatestvk9729m0m48njye2bxzvk3xqv3n84qbvvopenclaw-skillvk9729m0m48njye2bxzvk3xqv3n84qbvvpngvk9729m0m48njye2bxzvk3xqv3n84qbvvragvk9729m0m48njye2bxzvk3xqv3n84qbvvsvgvk9729m0m48njye2bxzvk3xqv3n84qbvvtechnical-diagramvk9729m0m48njye2bxzvk3xqv3n84qbvv
128downloads
0stars
1versions
Updated 2w ago
v1.0.0
MIT-0

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

ConceptShape
User / HumanCircle head + body path
LLM / ModelRounded rect, double border, ⚡
AgentHexagon or double-border rect
Memory (short-term)Dashed-border rounded rect
Memory (long-term)Solid cylinder
Vector StoreCylinder with grid lines
Graph DB3 overlapping circles
Tool / FunctionRect with ⚙ icon
API GatewayHexagon
Queue / StreamHorizontal pipe/tube
DocumentFolded-corner rect
Browser / UIRect with 3-dot titlebar
DecisionDiamond

Arrow Semantics

Flow TypeColorStrokeDash
Primary data#2563eb blue2px solidnone
Control/trigger#ea580c orange1.5px solidnone
Memory read#059669 green1.5px solidnone
Memory write#059669 green1.5px5,3
Async/event#6b7280 gray1.5px4,2
Embedding#7c3aed purple1px solidnone
Feedback/loop#7c3aed purple1.5px curvednone

Always include a legend when 2+ arrow types are used.

Workflow (Always Follow)

  1. Classify diagram type
  2. Extract structure — layers, nodes, edges, flows
  3. Plan layout
  4. Load style reference from references/styles.md for exact colors
  5. Map nodes to shapes
  6. Check references/icons.md for known products
  7. Generate SVG
  8. Validate: run python3 scripts/svg2png.py <file.svg> or rsvg-convert
  9. Export PNG at 1920px width
  10. Report output paths

SVG Generation Strategy

Estimate complexity:

  • Count nodes: N, arrows: A
  • Estimated SVG lines: L = 50 (header) + N×15 + A×3 + 20 (legend)

Generation method:

  • L < 150: Write tool directly (single call, most reliable)
  • L ≥ 150: Python script via exec tool (avoids heredoc issues)

Python method (recommended for complex SVGs):

python3 << 'EOF'
svg_content = '''<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 600">
...complete SVG here...
</svg>'''

with open('/path/to/output.svg', 'w') as f:
    f.write(svg_content)
print("Generated output.svg")
EOF

SVG Technical Rules

  • ViewBox: 0 0 960 600 default; 0 0 960 800 tall; 0 0 1200 600 wide
  • Fonts: <style>font-family: system-ui, Helvetica, sans-serif</style>no external @import
  • <defs>: arrow markers, gradients, filters, clip paths
  • Text: minimum 12px, prefer 13-14px labels
  • All arrows: <marker> with markerEnd, sized markerWidth="10" markerHeight="7"
  • Drop shadows: <feDropShadow> sparingly
  • Curved paths: M x1,y1 C cx1,cy1 cx2,cy2 x2,y2 cubic bezier

Built-in Patterns

RAG Pipeline: Query → Embed → VectorSearch → Retrieve → LLM → Response Agentic RAG: Query → Embed → VectorSearch → Agent loop (Tool use) → LLM → Response Agentic Search: Query → Planner → [Search / Calculator / Code] → Synthesizer → Response Mem0 Memory: Input → Memory Manager → [Write: VectorDB + GraphDB] → [Read: Retrieve+Rank] → Context Multi-Agent: Orchestrator → [SubAgent A / B / C] → Aggregator → Output Tool Call Flow: LLM → Tool Selector → Tool Execution → Parser → LLM (loop)

Error Recovery

ProblemFix
PNG blank/blackRemove @import url() — use system fonts only
rsvg-convert not foundUse python3 scripts/svg2png.py fallback
SVG cut off at bottomIncrease ViewBox height
Text overflowingtext-anchor="middle" + shorten label
Marker undefinedEnsure <marker id="..."> in <defs>
Arrow crossing nodesUse orthogonal routing or bezier detour

Output

  • Default: ./[derived-name].svg and ./[derived-name].png
  • Custom: user specifies --output /path/

Styles

#NameBackgroundBest For
1Flat Icon (default)WhiteBlogs, docs, slides
2Dark Terminal#0f0f1aGitHub, dev articles
3Blueprint#0a1628Architecture docs
4Notion CleanWhiteNotion, wikis
5Glassmorphism#0d1117 gradientProduct sites, keynotes
6Claude Official#f8f6f3 warm creamAnthropic-style diagrams
7OpenAI OfficialPure whiteOpenAI-style diagrams

Load references/styles.md for exact color tokens and patterns.

Comments

Loading comments...