Skip to content
Agentmart
Submit a tool

drawio-headless

Generate architecture diagrams with draw.io in headless/server environments (WSL2, VPS, Docker)

Skill by kevinnft

IndexedMIT★ 14
Write a review

Chalk Labs

Need help deploying drawio-headless?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/kevinnft-drawio-headless

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Generate architecture diagrams with draw.io in headless/server environments (WSL2, VPS, Docker)

Use cases: backend, devops

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/drawio-headless

What's inside

Skill name
drawio-headless
Description
Generate architecture diagrams with draw.io in headless/server environments (WSL2, VPS, Docker)
License
MIT
Instructions
270 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (4)

  • SKILL.md
  • electricity-consumption-analysis.md · references/
  • system-services-diagram-pattern.md · references/
  • vps-resource-diagram-pattern.md · references/

SKILL.md (first lines)

# Draw.io Headless Diagram Generation

Generate professional architecture diagrams from .drawio XML files in headless environments (WSL2, VPS, Docker) where GUI is not available.

## When to Use

- Server/VPS without X11 display
- WSL2 Ubuntu (no native GUI)
- Docker containers
- CI/CD pipelines
- Automated diagram generation

## Prerequisites

**Required packages:**
```bash
# Install draw.io (snap - easiest)
sudo snap install drawio

# Install Xvfb (virtual framebuffer for headless rendering)
sudo apt-get update
sudo apt-get install -y xvfb
```

**Alternative: .deb package**
```bash
# Download latest .deb
wget https://github.com/jgraph/drawio-desktop/releases/download/v28.2.5/drawio-amd64-28.2.5.deb

# Install
sudo dpkg -i drawio-amd64-28.2.5.deb
sudo apt-get install -f  # Fix dependencies
```

## Verification

```bash
# Check draw.io installation
which drawio
# Expected: /snap/bin/drawio or /usr/bin/drawio

# Test with xvfb-run
xvfb-run -a drawio --version
# Expected: draw.io version number (e.g., 28.2.5)
```

## Usage

### Basic Export

```bash
# Export .drawio to PNG
xvfb-run -a drawio -x -f png -o output.png input.drawio

# Export to SVG
xvfb-run -a drawio -x -f svg -o output.svg input.drawio

# Export to PDF
xvfb-run -a drawio -x -f pdf -o output.pdf input.drawio
```

### Flags Explained

- `xvfb-run -a` — Run in virtual framebuffer (headless)
- `-x` — Export mode
- `-f <format>` — Output format (png, svg, pdf, jpg)
- `-o <output>` — Output file path
- `<input>` — Input .drawio file

## Pitfalls

### 1. Snap Confinement (File Access)

**Problem:** Snap-installed draw.io cannot access `/tmp` or arbitrary directories due to confinement.

**Solution:** Use home directory or snap-accessible paths:
```bash
# ❌ FAILS (snap cannot access /tmp)
xvfb-run -a drawio -x -f png -o /tmp/diagram.png /tmp/input.drawio

# ✅ WORKS (home directory accessible)
cd ~/diagrams
xvfb-run -a drawio -x -f png -o diagram.png input.drawio
```

**Snap-accessible paths:**
- `~/` (home directory)
- `/home/<user>/`
- `/media/` (removable media)
- `/mnt/` (mounted filesystems)

### 2. OpenGL/dbus Warnings

**Symptoms:** Errors like:
```
libGL error: No matching fbConfigs or visuals found
dbus[]: Failed to connect to socket
```

**Impact:** These are **warnings only** — export still succeeds. Safe to ignore in headless environments.

**Suppress (optional):**
```bash
xvfb-run -a drawio -x -f png -o output.png input.drawio 2>/dev/null
```

### 3. Missing Xvfb

**Symptom:**
```
Error: Cannot open display: :99
```

**Fix:**
```bash
sudo apt-get install -y xvfb
```

### 4. Large Diagrams (Memory)

From kevinnft/ai-agent-skills, MIT.

Signals

Stars
14
Forks
2
Open issues
1
Last commit (this folder)
May 15, 2026 (5 months ago)
Last release
Jul 22, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from kevinnft

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get drawio-headless running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying drawio-headless?

CallGet help
Cite this page

drawio-headless skill. Agent Mart. https://agentmart.dev/skills/kevinnft-drawio-headless (last updated 2026-10-24)